/* Lübeck lebt! – styles of the event list and all pages (cards, discover, filters, sheets, SEO pages).
   A static, cached file (formerly the EventListStyles/SeoStyles components, which put 115 KB
   of <style> into every page and every live connection). Loaded after app.css (App.razor). */

    /* ── Page background ── */
    body {
        background: var(--bg) !important;
    }

    /* ── Sticky header ── */
    .sticky-toolbar {
        position: sticky;
        top: 0;
        z-index: 200;
        padding: 8px 0 0 0;
        background: var(--bg);
        transition: padding 0.3s ease;
    }

    #filterAnchor .dropdown-menu {
        z-index: 500;
    }

    #filterAnchor {
        position: relative;
        z-index: 150;
        scroll-margin-top: 60px;
    }

    .page-content {
        position: relative;
        z-index: 1;
        margin-top: 0;
    }

    /* ── FAB ── */
    .fab-filter {
        position: fixed;
        bottom: 24px;
        right: 24px;
        z-index: 300;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--fab-a), var(--fab-b));
        border: 1px solid rgba(var(--accent-rgb), 0.35);
        color: var(--accent);
        font-size: 1.1rem;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
        transition: opacity 0.25s ease, transform 0.25s ease;
        opacity: 0;
        pointer-events: none;
        transform: translateY(12px);
    }

    .fab-filter.fab-visible {
        opacity: 1;
        pointer-events: all;
        transform: translateY(0);
    }

    .fab-filter:hover {
        background: linear-gradient(135deg, var(--fab-c), var(--fab-d));
        border-color: var(--accent);
        box-shadow: 0 4px 20px rgba(var(--accent-rgb), 0.3);
    }

    /* ── Page header ── */
    .page-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 16px;
        margin-bottom: 8px;
        background: var(--surface);
        border-radius: 12px;
        border: 1px solid rgba(var(--fg-rgb), 0.06);
        gap: 12px;
        transition: all 0.3s ease;
    }

    .page-header-left {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .page-header-center {
        flex: 0 1 auto;
        display: flex;
        justify-content: center;
    }

    .page-header-right {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-shrink: 0;
    }

    /* Big day number */
    .header-day-number {
        font-size: 3rem;
        font-weight: 800;
        line-height: 0.9;
        color: var(--accent);
        letter-spacing: -2px;
        min-width: 60px;
        font-variant-numeric: tabular-nums;
        text-align: center;
        transition: all 0.3s ease;
    }

    /* Search mode icon */
    .header-search-indicator {
        width: 42px;
        height: 42px;
        border-radius: 10px;
        background: rgba(var(--accent-rgb), 0.1);
        border: 1px solid rgba(var(--accent-rgb), 0.2);
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--accent);
        font-size: 1rem;
        flex-shrink: 0;
        transition: all 0.3s ease;
    }

    .header-text-group {
        display: flex;
        flex-direction: column;
        gap: 1px;
    }

    /* Brand line above the weekday */
    .header-logo { display: none; }

    .header-brand {
        font-size: 0.62rem;
        font-weight: 800;
        letter-spacing: 1.6px;
        text-transform: uppercase;
        color: var(--accent);
        opacity: 0.85;
        line-height: 1.2;
    }

    .page-header-title {
        font-size: 1.1rem;
        font-weight: 700;
        letter-spacing: -0.3px;
        color: var(--text);
        line-height: 1.2;
        margin: 0;
        display: flex;
        align-items: center;
        gap: 6px;
        transition: all 0.3s ease;
    }

    .page-header-subtitle {
        font-size: 0.68rem;
        color: var(--faint-2);
        letter-spacing: 0.5px;
        text-transform: uppercase;
        margin: 0;
    }

    /* Count group */
    .header-count-group {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 0;
    }

    .event-count-badge {
        font-size: 1.5rem;
        font-weight: 800;
        color: var(--accent);
        line-height: 1;
        letter-spacing: -0.5px;
        transition: all 0.3s ease;
    }

    .event-count-badge.loading {
        display: flex;
        gap: 4px;
        align-items: center;
        height: 24px;
    }

    .count-dot {
        width: 5px;
        height: 5px;
        border-radius: 50%;
        background: var(--accent);
        animation: countPulse 1s ease-in-out infinite;
    }

    .count-dot:nth-child(2) {
        animation-delay: 0.15s;
    }

    .count-dot:nth-child(3) {
        animation-delay: 0.3s;
    }

    @keyframes countPulse {
        0%, 100% {
            opacity: 0.3;
            transform: scale(0.8);
        }
        50% {
            opacity: 1;
            transform: scale(1.2);
        }
    }

    .event-count-label {
        font-size: 0.6rem;
        color: var(--muted);
        text-transform: uppercase;
        letter-spacing: 0.8px;
        font-weight: 600;
    }

    /* Scroll-to-top button */
    .header-scroll-btn {
        width: 34px;
        height: 34px;
        border-radius: 8px;
        border: 1px solid rgba(var(--fg-rgb), 0.08);
        background: var(--raised-4);
        color: var(--faint-2);
        font-size: 0.85rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
    }

    .header-scroll-btn:hover {
        background: rgba(var(--accent-rgb), 0.1);
        border-color: rgba(var(--accent-rgb), 0.3);
        color: var(--accent);
    }

    .today-indicator {
        display: inline-flex;
        align-items: center;
        background: rgba(35, 207, 119, 0.15);
        color: var(--green);
        font-size: 0.58rem;
        font-weight: 700;
        padding: 2px 7px;
        border-radius: 4px;
        border: 1px solid rgba(35, 207, 119, 0.25);
        letter-spacing: 0.5px;
        text-transform: uppercase;
    }

    /* ── Compact header on scroll ── */
    .sticky-toolbar.header-compact {
        padding: 2px 0 0 0;
    }

    .page-header-center .header-count-group {
        align-items: center;
    }

    .sticky-toolbar.header-compact .page-header {
        padding: 3px 16px;
        margin-bottom: 3px;
    }

    .sticky-toolbar.header-compact .header-day-number {
        font-size: 0.82rem;
        min-width: 20px;
    }

    .sticky-toolbar.header-compact .page-header-title {
        font-size: 0.82rem;
    }

    .sticky-toolbar.header-compact .event-count-badge {
        font-size: 0.82rem;
    }

    .sticky-toolbar.header-compact .header-scroll-btn {
        width: 22px;
        height: 22px;
        border-radius: 5px;
        font-size: 0.6rem;
    }

    .sticky-toolbar.header-compact .header-search-indicator {
        width: 24px;
        height: 24px;
        border-radius: 5px;
        font-size: 0.65rem;
    }

    /* Compact hide/show */
    .compact-hide {
        opacity: 1;
        max-height: 2em;
        transition: opacity 0.2s ease 0.1s, max-height 0.25s ease;
    }

    .sticky-toolbar.header-compact .compact-hide {
        opacity: 0;
        max-height: 0;
        margin: 0;
        overflow: hidden;
        transition: opacity 0.15s ease, max-height 0.2s ease;
    }

    /* ── Locale Switcher ── */
    .locale-switcher {
        position: relative;
        transition: opacity 0.25s ease, transform 0.25s ease;
    }

    .locale-hidden {
        opacity: 0;
        pointer-events: none;
        transform: translateY(-4px);
    }

    .locale-switcher-btn {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 6px 10px;
        border: 1px solid rgba(var(--fg-rgb), 0.15);
        border-radius: 8px;
        background: rgba(var(--fg-rgb), 0.06);
        color: inherit;
        font-size: 0.8rem;
        font-weight: 500;
        cursor: pointer;
        transition: background 0.2s, border-color 0.2s;
    }

    .locale-switcher-btn:hover {
        background: rgba(var(--fg-rgb), 0.12);
        border-color: rgba(var(--fg-rgb), 0.25);
    }

    .locale-chevron {
        font-size: 0.65rem;
        transition: transform 0.2s ease;
    }

    .locale-chevron.open {
        transform: rotate(180deg);
    }

    .locale-dropdown {
        position: absolute;
        top: calc(100% + 6px);
        right: 0;
        min-width: 160px;
        background: var(--surface-color, var(--surface-3));
        border: 1px solid rgba(var(--fg-rgb), 0.12);
        border-radius: 10px;
        padding: 4px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
        z-index: 100;
        animation: localeDropIn 0.15s ease-out;
    }

    @keyframes localeDropIn {
        from {
            opacity: 0;
            transform: translateY(-6px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .locale-option {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        padding: 8px 12px;
        border: none;
        border-radius: 7px;
        background: transparent;
        color: inherit;
        font-size: 0.85rem;
        cursor: pointer;
        transition: background 0.15s;
    }

    .locale-option:hover {
        background: rgba(var(--fg-rgb), 0.08);
    }

    .locale-option.active {
        background: rgba(var(--fg-rgb), 0.1);
    }

    .locale-option-flag {
        font-size: 1.1rem;
    }

    .locale-option-check {
        margin-left: auto;
        font-size: 0.85rem;
        opacity: 0.7;
    }

    /* ════════════════════════════════════════════
       FILTER BAR — Two-row layout
       ════════════════════════════════════════════ */

    .filter-row {
        background: var(--surface);
        border: 1px solid rgba(var(--fg-rgb), 0.06);
        padding: 8px 12px;
    }

    .filter-row-nav {
        border-radius: 12px 12px 0 0;
        border-bottom: none;
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: nowrap;
    }

    .filter-row-filters {
        border-radius: 0 0 12px 12px;
        border-top: 1px solid rgba(var(--fg-rgb), 0.04);
        display: flex;
        flex-direction: column;
        gap: 4px;
        padding: 6px 10px 8px;
        overflow: hidden;
    }

    /* ── Nav buttons ── */
    .nav-group {
        display: flex;
        align-items: center;
        gap: 2px;
        background: var(--raised-4);
        border-radius: 8px;
        padding: 2px;
        flex-shrink: 0;
    }

    .nav-btn {
        width: 34px;
        height: 34px;
        border-radius: 6px;
        border: none;
        background: transparent;
        color: var(--faint);
        font-size: 0.85rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.15s ease;
        flex-shrink: 0;
    }

    .nav-btn:hover {
        background: rgba(var(--fg-rgb), 0.08);
        color: var(--text);
    }

    .nav-btn-today.is-today {
        background: rgba(35, 207, 119, 0.2);
        color: var(--green);
    }

    .layout-btn {
        background: var(--raised-4);
        border-radius: 8px;
    }

    /* ── Time buttons ── */
    .time-group {
        display: flex;
        align-items: center;
        gap: 2px;
        background: var(--raised-4);
        border-radius: 8px;
        padding: 2px;
        flex-shrink: 0;
    }

    .time-btn {
        width: 34px;
        height: 34px;
        border-radius: 6px;
        border: none;
        background: transparent;
        color: var(--faint-2);
        font-size: 0.8rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.15s ease;
        position: relative;
    }

    .time-btn:hover {
        color: var(--text-3);
    }

    .time-btn.active {
        background: rgba(var(--accent-rgb), 0.12);
        color: var(--accent);
    }

    .time-btn.active::after {
        content: '';
        position: absolute;
        bottom: 3px;
        left: 50%;
        transform: translateX(-50%);
        width: 12px;
        height: 2px;
        border-radius: 1px;
        background: var(--accent);
    }

    /* ── Search group ── */
    .search-group {
        display: flex;
        align-items: center;
        gap: 6px;
        flex: 1;
        min-width: 0;
    }

    .search-input-wrap {
        position: relative;
        flex: 1;
        min-width: 0;
    }

    .search-icon {
        position: absolute;
        left: 10px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 0.75rem;
        color: var(--faint-2);
        pointer-events: none;
    }

    .search-input {
        width: 100%;
        height: 34px;
        background: var(--raised-4);
        border: 1px solid rgba(var(--fg-rgb), 0.08);
        border-radius: 8px;
        color: var(--text);
        font-size: 0.82rem;
        padding: 0 10px 0 30px;
        outline: none;
        transition: all 0.15s ease;
    }

    .search-input:focus {
        background: rgba(var(--fg-rgb), 0.07);
        border-color: rgba(var(--accent-rgb), 0.4);
        box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.1);
    }

    .search-input::placeholder {
        color: var(--faint-2);
    }

    .search-container input {
        width: 100%;
    }

    .blacklist-wrap {
        flex: 0.6;
    }

    .blacklist-icon {
        color: rgba(246, 99, 84, 0.5) !important;
    }

    .blacklist-input {
        border-color: rgba(246, 99, 84, 0.15) !important;
    }

    .blacklist-input:focus {
        border-color: rgba(246, 99, 84, 0.4) !important;
        box-shadow: 0 0 0 2px rgba(246, 99, 84, 0.1) !important;
    }

    .blacklist-input::placeholder {
        color: rgba(246, 99, 84, 0.3) !important;
    }

    /* ── Chip sections ── */
    .chip-section {
        display: flex;
        align-items: center;
        gap: 6px;
        max-width: 100%;
        width: 100%;
    }

    .chip-section-header {
        display: flex;
        align-items: center;
        gap: 4px;
        flex-shrink: 0;
    }

    .chip-section-label {
        font-size: 0.62rem;
        font-weight: 600;
        color: var(--faint-2);
        text-transform: uppercase;
        letter-spacing: 0.8px;
        white-space: nowrap;
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .chip-section-label i {
        font-size: 0.6rem;
    }

    .chip-section-actions {
        display: flex;
        gap: 2px;
    }

    .chip-action-btn {
        font-size: 0.58rem;
        font-weight: 600;
        color: var(--faint-2);
        background: none;
        border: none;
        cursor: pointer;
        padding: 1px 5px;
        border-radius: 4px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        transition: all 0.12s ease;
    }

    .chip-action-btn:hover {
        color: var(--accent);
        background: rgba(var(--accent-rgb), 0.08);
    }

    .chip-scroll {
        display: flex;
        gap: 4px;
        overflow-x: scroll;
        overflow-y: hidden;
        scrollbar-width: none;
        padding-bottom: 2px;
        padding-right: 24px;
        min-width: 0;
        flex: 1 1 0px;
        cursor: grab;
        mask-image: linear-gradient(to right, black calc(100% - 24px), transparent 100%);
        -webkit-mask-image: linear-gradient(to right, black calc(100% - 24px), transparent 100%);
    }

    .chip-scroll::-webkit-scrollbar {
        display: none;
    }

    /* ── Filter chips ── */
    .filter-chip {
        display: flex;
        align-items: center;
        gap: 4px;
        padding: 4px 10px;
        border-radius: 20px;
        border: 1px solid rgba(var(--fg-rgb), 0.08);
        background: var(--raised-3);
        color: var(--faint);
        font-size: 0.72rem;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.18s ease;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .filter-chip:hover {
        background: rgba(var(--fg-rgb), 0.06);
        border-color: rgba(var(--fg-rgb), 0.15);
        color: var(--text-3);
    }

    .filter-chip.active {
        background: color-mix(in srgb, var(--chip-color, var(--accent)) var(--chip-tint), transparent);
        border-color: color-mix(in srgb, var(--chip-color, var(--accent)) 45%, transparent);
        /* The category colours are pastels: as text on the light page they are darkened (see app.css) */
        color: color-mix(in srgb, var(--chip-color, var(--accent)) var(--chip-ink), var(--chip-ink-base));
    }

    .filter-chip.active .chip-icon {
        filter: drop-shadow(0 0 3px var(--chip-color, var(--accent)));
    }

    .chip-icon {
        font-size: 0.7rem;
        flex-shrink: 0;
    }

    .chip-dot {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        flex-shrink: 0;
        opacity: 0.5;
        transition: opacity 0.15s;
    }

    .filter-chip.active .chip-dot {
        opacity: 1;
        box-shadow: 0 0 4px var(--chip-color, var(--accent));
    }

    .chip-label {
        line-height: 1.1;
    }

    /* ── Dropdowns opened by site.js (data-dropdown-toggle, no Bootstrap script): below the button, right-aligned ── */
    .dropdown-menu.dropdown-menu-end-plain { top: 100%; right: 0; left: auto; margin-top: 4px; }

    /* ── Dropdown compact ── */
    .dropdown-menu-compact {
        min-width: auto;
        padding: 4px 0;
    }

    .dropdown-menu-compact .dropdown-item {
        font-size: 0.82rem;
        padding: 5px 16px;
    }

    /* ── Badge tags ── */
    .badge-tag {
        font-size: 0.65rem !important;
        opacity: 0.85;
        border: 1px solid rgba(var(--fg-rgb), 0.1);
    }

    /* ════════════════════════════════════════════
       FILTER PANEL — date + time of day, search + "Filter", categories
       ════════════════════════════════════════════ */
    .filter-panel {
        background: var(--surface);
        border: 1px solid rgba(var(--fg-rgb), 0.06);
        border-radius: 12px;
        padding: 10px 12px 12px;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    /* While the filter sheet is open it has to sit above the sticky header */
    #filterAnchor:has(.filter-sheet) {
        z-index: 1000;
    }

    .filter-row-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }

    /* Time of day: labelled segmented control */
    .daytime-toggle {
        display: flex;
        gap: 2px;
        background: var(--raised-4);
        border-radius: 10px;
        padding: 2px;
    }

    .daytime-btn {
        display: flex;
        align-items: center;
        gap: 6px;
        height: 36px;
        padding: 0 12px;
        border: none;
        border-radius: 8px;
        background: transparent;
        color: var(--faint);
        font-size: 0.8rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.15s ease;
    }

    .daytime-btn:hover {
        color: var(--text-3);
    }

    .daytime-btn.active {
        background: rgba(var(--accent-rgb), 0.14);
        color: var(--accent);
    }

    .filter-row-search {
        display: flex;
        gap: 8px;
    }

    .filter-row-search .search-input-wrap {
        flex: 1;
    }

    .search-input[type="search"]::-webkit-search-cancel-button {
        display: none;
    }

    .clear-input-btn {
        position: absolute;
        right: 6px;
        top: 50%;
        transform: translateY(-50%);
        width: 30px;
        height: 30px;
        border: none;
        border-radius: 50%;
        background: transparent;
        color: var(--faint);
        font-size: 0.8rem;
        cursor: pointer;
    }

    .clear-input-btn:hover {
        background: rgba(var(--fg-rgb), 0.08);
        color: var(--text);
    }

    /* "Filter" button with active-filter badge */
    .filter-toggle-btn {
        display: flex;
        align-items: center;
        gap: 7px;
        height: 36px;
        padding: 0 14px;
        border: 1px solid rgba(var(--fg-rgb), 0.1);
        border-radius: 10px;
        background: var(--raised-4);
        color: var(--text-3);
        font-size: 0.82rem;
        font-weight: 600;
        cursor: pointer;
        flex-shrink: 0;
        transition: all 0.15s ease;
    }

    .filter-toggle-btn:hover,
    .filter-toggle-btn.open {
        border-color: rgba(var(--accent-rgb), 0.4);
        color: var(--accent);
    }

    .filter-toggle-btn.has-filters {
        color: var(--accent);
    }

    .filter-count {
        min-width: 20px;
        height: 20px;
        padding: 0 6px;
        border-radius: 10px;
        background: var(--accent);
        color: var(--bg);
        font-size: 0.72rem;
        font-weight: 800;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .chip-section-count {
        margin-left: 4px;
        color: var(--faint-2);
        font-weight: 500;
        text-transform: none;
    }

    /* Chips that wrap (inside the filter panel) */
    .chip-wrap {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

    /* ── Filter panel: inline on desktop, bottom sheet on phones ── */
    .filter-sheet-backdrop {
        display: none;
    }

    .filter-sheet {
        border-top: 1px solid rgba(var(--fg-rgb), 0.06);
        padding-top: 10px;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .filter-sheet-handle,
    .filter-sheet-footer {
        display: none;
    }

    .filter-sheet-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .filter-sheet-title {
        font-size: 1rem;
        font-weight: 700;
        color: var(--text);
    }

    .filter-sheet-close {
        width: 36px;
        height: 36px;
        border: none;
        border-radius: 50%;
        background: rgba(var(--fg-rgb), 0.06);
        color: var(--text-3);
        cursor: pointer;
    }

    .filter-sheet-body {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .sheet-section {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .sheet-hint {
        font-size: 0.75rem;
        color: var(--faint);
    }

    .segmented {
        display: inline-flex;
        align-self: flex-start;
        gap: 2px;
        background: var(--raised-4);
        border-radius: 10px;
        padding: 2px;
    }

    .segmented-btn {
        display: flex;
        align-items: center;
        gap: 6px;
        height: 36px;
        padding: 0 14px;
        border: none;
        border-radius: 8px;
        background: transparent;
        color: var(--faint);
        font-size: 0.82rem;
        font-weight: 600;
        cursor: pointer;
    }

    .segmented-btn.active {
        background: rgba(var(--accent-rgb), 0.14);
        color: var(--accent);
    }

    .filter-sheet-done {
        width: 100%;
        height: 48px;
        border: none;
        border-radius: 12px;
        background: var(--accent);
        color: var(--bg);
        font-size: 1rem;
        font-weight: 700;
        cursor: pointer;
    }

    /* Language switch and other buttons in the burger menu look like the links */
    button.burger-menu-item {
        background: none;
        font: inherit;
        color: inherit;
        text-align: left;
        cursor: pointer;
    }

    .burger-menu-version {
        padding: 8px 12px 4px;
        margin-top: 4px;
        border-top: 1px solid rgba(var(--fg-rgb), 0.08);
        color: rgba(var(--fg-rgb), 0.4);
        font-size: 0.72rem;
        white-space: nowrap;
    }

    .burger-menu-divider {
        height: 1px;
        margin: 4px 0;
        background: rgba(var(--fg-rgb), 0.08);
    }

    /* ════════════════════════════════════════════
       SAVED EVENTS + FAVOURITE PLACES
       ════════════════════════════════════════════ */
    .event-card-wrap {
        position: relative;
        height: 100%;
    }

    .save-btn {
        position: absolute;
        top: 10px;
        right: 12px;
        z-index: 3;
        width: 40px;
        height: 40px;
        border: none;
        border-radius: 50%;
        background: rgba(var(--bg-rgb), 0.7);
        backdrop-filter: blur(4px);
        color: var(--text);
        font-size: 1.1rem;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: transform 0.15s ease, color 0.15s ease;
    }

    .save-btn:hover {
        transform: scale(1.08);
    }

    .save-btn.saved {
        color: var(--red);
    }

    .header-saved-btn {
        display: flex;
        align-items: center;
        gap: 5px;
        height: 34px;
        padding: 0 10px;
        border-radius: 8px;
        border: 1px solid rgba(248, 113, 113, 0.3);
        background: rgba(248, 113, 113, 0.08);
        color: var(--red);
        font-size: 0.85rem;
        font-weight: 700;
        text-decoration: none;
    }

    .header-saved-btn:hover {
        color: var(--red);
        background: rgba(248, 113, 113, 0.15);
    }

    .burger-menu-count {
        margin-left: auto;
        min-width: 22px;
        padding: 0 6px;
        border-radius: 11px;
        background: rgba(248, 113, 113, 0.2);
        color: var(--red);
        font-size: 0.75rem;
        font-weight: 700;
        text-align: center;
    }

    /* Source chip + star */
    .source-item {
        display: inline-flex;
        align-items: center;
        gap: 2px;
    }

    .favorite-btn {
        width: 36px;
        height: 36px;
        border: none;
        border-radius: 50%;
        background: transparent;
        color: var(--faint-2);
        font-size: 1rem;
        cursor: pointer;
    }

    .favorite-btn.active {
        color: var(--amber);
    }

    .favorites-toggle {
        display: flex;
        align-items: center;
        gap: 8px;
        align-self: flex-start;
        height: 36px;
        padding: 0 14px;
        border: 1px solid rgba(251, 191, 36, 0.25);
        border-radius: 18px;
        background: rgba(251, 191, 36, 0.06);
        color: var(--amber-2);
        font-size: 0.82rem;
        font-weight: 600;
        cursor: pointer;
    }

    .favorites-toggle.active {
        background: rgba(251, 191, 36, 0.18);
        border-color: rgba(251, 191, 36, 0.6);
        color: var(--amber);
    }

    .favorites-toggle-count {
        font-size: 0.72rem;
        opacity: 0.8;
    }

    /* Saved page */
    .saved-day {
        font-size: 1rem;
        font-weight: 700;
        color: var(--text-3);
        margin: 8px 0 10px;
    }

    .saved-empty {
        text-align: center;
        padding: 48px 16px;
        color: var(--muted);
    }

    .saved-empty i {
        font-size: 2.5rem;
        color: var(--red);
    }

    .saved-empty p {
        margin: 12px 0 20px;
    }

    .saved-empty-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: auto;
        padding: 0 24px;
        text-decoration: none;
    }

    /* ── Mobile ── */
    /* ════════════════════════════════════════════
       DISCOVER MODE (card stack)
       ════════════════════════════════════════════ */
    .discover-toggle-btn {
        display: flex;
        align-items: center;
        gap: 7px;
        height: 36px;
        padding: 0 14px;
        border: 1px solid rgba(var(--discover-rgb), 0.35);
        border-radius: 10px;
        background: rgba(var(--discover-rgb), 0.08);
        color: var(--accent-text);
        font-size: 0.82rem;
        font-weight: 600;
        cursor: pointer;
        flex-shrink: 0;
        transition: all 0.15s ease;
    }

    .discover-toggle-btn:hover,
    .discover-toggle-btn.active {
        background: linear-gradient(135deg, var(--discover-a), var(--discover-b));
        border-color: transparent;
        color: var(--on-discover);
    }

    .discover {
        max-width: 440px;
        margin: 12px auto 8px;
        user-select: none;
        -webkit-user-select: none;
    }

    .discover-top-row {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 10px;
        margin-bottom: 8px;
        padding: 0 4px;
    }

    .discover-progress {
        flex: 0 0 auto;
        white-space: nowrap;
        color: rgba(var(--fg-rgb), 0.85);
        font-weight: 700;
        font-size: 0.85rem;
        font-variant-numeric: tabular-nums;
    }

    .discover-hint {
        color: rgba(var(--fg-rgb), 0.45);
        font-size: 0.72rem;
        text-align: right;
    }

    .discover-deck {
        position: relative;
        height: calc(100vh - 230px);
        height: calc(100dvh - 230px);
        min-height: 400px;
        max-height: 640px;
    }

    .discover-card {
        position: absolute;
        inset: 0;
        display: flex;
        flex-direction: column;
        border-radius: 20px;
        overflow: hidden;
        background-color: var(--surface-2);
        border: 1px solid rgba(var(--fg-rgb), 0.08);
        border-top: 3px solid var(--accent-color, #7F90A1);
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
        transition: transform 0.25s ease, opacity 0.25s ease;
        will-change: transform;
    }

    .discover-card.depth-1 { transform: translateY(12px) scale(0.95); opacity: 0.85; z-index: 2; }
    .discover-card.depth-2 { transform: translateY(24px) scale(0.9); opacity: 0.6; z-index: 1; }

    .discover-card.is-top {
        z-index: 3;
        cursor: grab;
        touch-action: pan-y;
    }

    .discover-card.is-dragging { transition: none; cursor: grabbing; }
    .discover-card.is-flying { transition: transform 0.23s ease-in; pointer-events: none; }

    .discover-media {
        position: relative;
        flex: 1 1 auto;
        min-height: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        background: rgba(0, 0, 0, 0.15);
    }

    .discover-media img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        pointer-events: none;
    }

    .discover-media-icon {
        font-size: 4.5rem;
        color: rgba(var(--fg-rgb), 0.35);
    }

    .discover-saved-badge {
        position: absolute;
        top: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(0, 0, 0, 0.55);
        color: var(--red);
    }

    .discover-body {
        flex: 0 0 auto;
        padding: 14px 16px 16px;
        background: linear-gradient(180deg, rgba(var(--bg-rgb), 0.55), rgba(var(--bg-rgb), 0.92));
    }

    .discover-meta-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        margin-bottom: 8px;
    }

    .discover-title {
        font-size: 1.3rem;
        font-weight: 700;
        line-height: 1.25;
        color: var(--text);
        margin: 0 0 6px;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .discover-badges {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        margin-top: 8px;
    }

    /* The last card: all other ongoing offers in one (EventListDiscover) */
    .discover-summary { --accent-color: var(--accent); }
    .discover-summary .discover-media-icon { color: var(--accent); opacity: 0.8; }

    .discover-summary-sub {
        margin: 0;
        color: var(--muted);
        font-size: 0.95rem;
    }

    /* Details (tap on the card) */
    .discover-details {
        position: absolute;
        inset: 0;
        z-index: 4;
        padding: 20px 18px;
        overflow-y: auto;
        background: rgba(var(--bg-rgb), 0.96);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.2s ease, visibility 0.2s ease;
        display: flex;
        flex-direction: column;
    }

    .discover-card.show-details .discover-details {
        opacity: 1;
        visibility: visible;
    }

    .discover-details-title {
        font-size: 1.15rem;
        font-weight: 700;
        color: var(--text);
        margin-bottom: 8px;
    }

    .discover-details-text {
        color: rgba(var(--fg-rgb), 0.78);
        font-size: 0.92rem;
        line-height: 1.6;
        white-space: pre-line;
        flex: 1 1 auto;
    }

    .discover-details-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        text-decoration: none;
        margin-top: 12px;
    }

    /* "Save" / "Skip" stamps while dragging */
    .discover-stamp {
        position: absolute;
        top: 22px;
        z-index: 5;
        padding: 6px 14px;
        border: 3px solid currentColor;
        border-radius: 10px;
        font-size: 1.1rem;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        background: rgba(var(--bg-rgb), 0.6);
        pointer-events: none;
    }

    .stamp-like { left: 18px; color: #4ADE80; transform: rotate(-12deg); opacity: var(--like, 0); }
    .stamp-skip { right: 18px; color: #F87171; transform: rotate(12deg); opacity: var(--skip, 0); }

    /* Buttons below the stack */
    .discover-actions {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 18px;
        margin-top: 18px;
    }

    .discover-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 52px;
        height: 52px;
        border-radius: 50%;
        border: 1px solid rgba(var(--fg-rgb), 0.12);
        background: var(--raised-5);
        color: var(--text-2);
        font-size: 1.25rem;
        cursor: pointer;
        transition: transform 0.12s ease, background 0.15s ease;
    }

    .discover-btn:active { transform: scale(0.92); }
    .discover-btn:disabled { opacity: 0.3; cursor: default; }

    .discover-btn.btn-skip { width: 62px; height: 62px; font-size: 1.5rem; color: var(--red); border-color: rgba(248, 113, 113, 0.4); }
    .discover-btn.btn-like { width: 62px; height: 62px; font-size: 1.5rem; color: #fff; border-color: transparent; background: linear-gradient(135deg, #F472B6, #F87171); }
    .discover-btn.btn-undo,
    .discover-btn.btn-open { width: 44px; height: 44px; font-size: 1.05rem; }

    /* Empty stack / end of the day */
    .discover-end {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 12px;
        padding: 48px 20px;
        border-radius: 20px;
        background: linear-gradient(135deg, rgba(var(--discover-rgb), 0.08), rgba(var(--accent-rgb), 0.08));
        border: 1px solid rgba(var(--fg-rgb), 0.08);
    }

    .discover-end-icon { font-size: 3rem; color: var(--accent); }
    .discover-end-title { font-size: 1.15rem; font-weight: 700; color: var(--text); margin: 0; }
    .discover-end-sub { color: rgba(var(--fg-rgb), 0.6); margin: 0; }

    .discover-end .filter-sheet-done {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        width: auto;
        padding: 0 22px;
    }

    .discover-end-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .discover-end-links .chip-action-btn {
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }

    @media (max-width: 640px) {
        .discover-toggle-btn {
            height: 44px;
            padding: 0 13px;
            font-size: 1.05rem;
        }

        .discover-toggle-label { display: none; }

        /* At least one screen from the stack downwards, so it can always be scrolled up below the header */
        .discover { margin-top: 8px; }

        .discover:has(.discover-deck) {
            min-height: calc(100vh - 60px);
            min-height: calc(100dvh - 60px);
        }

        .discover-deck {
            height: calc(100vh - 200px);
            height: calc(100dvh - 200px);
        }
    }

    @media (max-width: 640px) {
        .filter-row-nav {
            flex-wrap: wrap;
        }

        .search-group {
            flex-basis: 100%;
            order: 10;
        }

        .blacklist-wrap {
            flex: 1;
        }

        /* Hide the "Category"/"Sources" text to give the chips more room; keep the icon as a hint */
        .chip-section-label {
            font-size: 0;
            letter-spacing: 0;
            gap: 0;
        }

        .chip-section-label i {
            font-size: 0.75rem;
        }

        .chip-section-actions {
            display: none;
        }

        .filter-chip {
            padding: 3px 7px;
            font-size: 0.65rem;
        }

        /* Page gutters: body padding (app.css), article.content.px-4 (MainLayout) and Bootstrap's
           .container padding stack up to ~56px per side on a phone. Keep a small 8px gutter instead.
           Only the event list is affected, since this style tag only exists while it is mounted. */
        body {
            padding: 0 !important;
        }

        .content {
            padding-left: 0 !important;
            padding-right: 0 !important;
        }

        .container {
            padding-left: 8px !important;
            padding-right: 8px !important;
        }

        /* Header: shrink so language switcher and menu stay inside the screen */
        .page-header {
            padding: 8px 10px;
            gap: 8px;
        }

        .page-header-left {
            gap: 10px;
            min-width: 0;
            flex: 1 1 auto;
        }

        .header-text-group {
            min-width: 0;
        }

        .header-day-number {
            font-size: 2.4rem;
            min-width: 0;
        }

        .page-header-title {
            font-size: 1rem;
            flex-wrap: wrap;
            row-gap: 2px;
        }

        .event-count-badge {
            font-size: 1.3rem;
        }

        .page-header-right {
            gap: 6px;
        }

        /* Language switcher: globe icon only */
        .locale-switcher-btn {
            padding: 0;
            width: 34px;
            height: 34px;
            justify-content: center;
        }

        .locale-current,
        .locale-chevron {
            display: none;
        }

        /* Filter bar: date navigation and time of day share one row, search below */
        .filter-row {
            padding: 8px;
        }

        .time-group {
            margin-left: auto;
        }

        /* ── Mobile header: "Lübeck lebt!" + menu on top, big date and event count below ──
           The left/text wrappers become "display: contents" so their children can be placed on the grid. */
        .page-header {
            display: grid;
            grid-template-columns: auto 1fr auto;
            grid-template-areas: "brand brand right" "day title count" "day sub count";
            column-gap: 12px;
            row-gap: 0;
            align-items: center;
            padding: 10px 12px 12px;
        }

        .page-header-left,
        .header-text-group {
            display: contents;
        }

        .header-brand {
            grid-area: brand;
            font-size: 1.3rem;
            font-weight: 800;
            letter-spacing: -0.2px;
            text-transform: none;
            color: var(--text);
            opacity: 1;
            line-height: 1.1;
            margin-bottom: 6px;
        }

        .page-header-right {
            grid-area: right;
            align-self: start;
        }

        .header-day-number,
        .header-search-indicator {
            grid-area: day;
            align-self: center;
        }

        .header-day-number {
            font-size: 3.2rem;
        }

        .page-header-title {
            grid-area: title;
            font-size: 1.2rem;
            align-self: end;
        }

        .page-header-subtitle {
            grid-area: sub;
            font-size: 0.78rem;
            color: var(--faint);
            align-self: start;
        }

        .page-header-center {
            grid-area: count;
            justify-content: flex-end;
        }

        .event-count-badge {
            font-size: 1.8rem;
        }

        .event-count-label {
            font-size: 0.68rem;
            color: var(--muted);
        }

        .today-indicator {
            font-size: 0.66rem;
            padding: 3px 8px;
        }

        .locale-switcher-btn,
        .header-burger-btn {
            width: 42px;
            height: 42px;
            font-size: 1.1rem;
        }

        /* Compact header while scrolling: one slim row */
        .sticky-toolbar.header-compact .page-header {
            grid-template-columns: auto 1fr auto auto;
            grid-template-areas: "day title count right";
            padding: 4px 12px;
        }

        .sticky-toolbar.header-compact .header-brand,
        .sticky-toolbar.header-compact .page-header-subtitle {
            display: none;
        }

        .sticky-toolbar.header-compact .header-day-number {
            font-size: 1.1rem;
        }

        .sticky-toolbar.header-compact .page-header-title {
            font-size: 1rem;
            align-self: center;
        }

        .sticky-toolbar.header-compact .event-count-badge {
            font-size: 1rem;
        }

        /* ── Mobile filter bar: 44px touch targets, 16px inputs (no iOS zoom on focus) ── */
        .nav-btn,
        .time-btn {
            width: 44px;
            height: 44px;
            font-size: 1.1rem;
        }

        .search-input {
            height: 44px;
            font-size: 16px;
            padding-left: 36px;
        }

        .search-icon {
            font-size: 0.95rem;
            left: 12px;
        }

        .blacklist-wrap {
            flex: 0.75;
        }

        /* Categories / sources: label row with All/None, then two scrolling rows of big chips */
        .filter-row-filters {
            gap: 14px;
            padding: 12px 8px;
        }

        .chip-section {
            flex-direction: column;
            align-items: stretch;
            gap: 8px;
        }

        .chip-section-header {
            justify-content: space-between;
        }

        .chip-section-label {
            font-size: 0.74rem;
            letter-spacing: 0.8px;
            gap: 6px;
            color: var(--muted);
        }

        .chip-section-label i {
            font-size: 0.85rem;
        }

        .chip-section-actions {
            display: flex;
            gap: 6px;
        }

        .chip-action-btn {
            font-size: 0.74rem;
            padding: 6px 12px;
            border: 1px solid rgba(var(--fg-rgb), 0.1);
            border-radius: 14px;
            color: var(--muted);
        }

        .chip-scroll {
            display: grid;
            flex: none;
            grid-auto-flow: column;
            grid-template-rows: repeat(2, auto);
            justify-content: start;
            gap: 6px;
            padding-right: 32px;
        }

        .filter-chip {
            padding: 8px 14px;
            font-size: 0.88rem;
            min-height: 40px;
            gap: 7px;
        }

        .chip-icon {
            font-size: 0.95rem;
        }

        .chip-dot {
            width: 9px;
            height: 9px;
        }

        /* ── Filter panel on phones ── */
        .filter-panel {
            padding: 10px 8px 12px;
            gap: 12px;
        }

        .nav-group .nav-btn {
            width: 38px;
        }

        .filter-row-top {
            gap: 6px;
        }

        /* Icon above a short label so all three fit next to the date buttons */
        .daytime-btn {
            flex-direction: column;
            justify-content: center;
            gap: 2px;
            width: 52px;
            height: 48px;
            padding: 0;
            font-size: 0.66rem;
        }

        .daytime-btn i {
            font-size: 1.05rem;
        }

        .filter-toggle-btn {
            height: 44px;
            font-size: 0.9rem;
        }

        /* Bottom sheet */
        .filter-sheet-backdrop {
            display: block;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.6);
            z-index: 1000;
            animation: sheetFade 0.2s ease;
        }

        .filter-sheet {
            position: fixed;
            left: 0;
            right: 0;
            bottom: 0;
            z-index: 1001;
            max-height: 85vh;
            padding: 6px 16px 0;
            border-top: none;
            background: var(--surface-2);
            border-radius: 18px 18px 0 0;
            box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.6);
            animation: sheetUp 0.25s ease;
            gap: 10px;
        }

        .filter-sheet-handle {
            display: block;
            width: 40px;
            height: 4px;
            margin: 4px auto 2px;
            border-radius: 2px;
            background: rgba(var(--fg-rgb), 0.2);
        }

        .filter-sheet-body {
            overflow-y: auto;
            overscroll-behavior: contain;
            padding-bottom: 8px;
        }

        .filter-sheet-footer {
            display: block;
            padding: 10px 0 calc(12px + env(safe-area-inset-bottom));
            border-top: 1px solid rgba(var(--fg-rgb), 0.06);
        }

        .segmented-btn {
            height: 44px;
        }

        .chip-wrap .filter-chip {
            min-height: 40px;
        }

        .favorites-toggle {
            height: 40px;
            font-size: 0.88rem;
        }

        .favorite-btn {
            width: 40px;
            height: 40px;
        }

        .header-saved-btn {
            height: 42px;
        }
    }

    @keyframes sheetUp {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }

    @keyframes sheetFade {
        from {
            opacity: 0;
        }
        to {
            opacity: 1;
        }
    }

    /* ── Skeleton loader ── */
    .skeleton-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1rem;
    }

    .skeleton-card {
        background: var(--surface-2);
        border-radius: 8px;
        overflow: hidden;
        height: 200px;
        position: relative;
    }

    .skeleton-card::after {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(90deg, transparent 0%, rgba(var(--fg-rgb), 0.04) 50%, transparent 100%);
        animation: shimmer 1.4s infinite;
    }

    @keyframes shimmer {
        0% {
            transform: translateX(-100%);
        }
        100% {
            transform: translateX(100%);
        }
    }

    /* "Zu den Terminen springen": the first stop for the keyboard, out of sight until it has the focus */
    .skip-link {
        position: absolute;
        top: 8px;
        left: 8px;
        z-index: 1000;
        padding: 10px 16px;
        border-radius: 10px;
        background: var(--accent);
        color: var(--on-accent);
        font-weight: 700;
        text-decoration: none;
        transform: translateY(-200%);
    }

    .skip-link:focus { transform: none; }
    #events:focus { outline: none; }

    /* ── Event cards: posters (EventCard.razor). The picture fills the card; time, title and place stand in
       white on a dark fade at the bottom, in both themes, like a poster on a wall. ── */
    .event-card.poster {
        position: relative;
        height: 290px;
        overflow: hidden;
        border: 0;
        border-radius: 16px;
        background: #1a0e18;
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
        cursor: pointer;
        transition: transform 0.18s ease, box-shadow 0.18s ease;
    }

    @media (min-width: 768px) { .event-card.poster { height: 310px; } }
    .event-card-wrap > a { display: block; }

    .event-card.poster:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3); }
    .event-card.poster:hover .poster-img { transform: scale(1.03); }

    .poster-img, .event-card.poster .poster-ph {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.4s ease;
    }

    /* Without a picture: the category's colour from the top right into the night, its sign large and faint */
    .event-card.poster .poster-ph {
        display: block;
        background: radial-gradient(120% 90% at 85% 10%, var(--accent-color, #7F90A1) 0%,
            color-mix(in srgb, var(--accent-color, #7F90A1) 55%, #1a0e18) 50%, #1a0e18 100%);
    }

    .event-card.poster .poster-ph::before { display: none; }
    .event-card.poster .poster-ph i { position: absolute; top: 18px; right: 22px; font-size: 5.5rem; color: #fff; opacity: 0.28; }
    .event-card.poster .img-fallback { display: none; }
    .event-card.poster img.img-failed + .img-fallback { display: block !important; }

    .poster-body {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1;
        padding: 90px 16px 14px;
        background: linear-gradient(to bottom, rgba(12, 6, 12, 0), rgba(12, 6, 12, 0.55) 38%, rgba(12, 6, 12, 0.92));
        color: #fff;
    }

    .event-card.poster .event-time-badge {
        display: inline-block;
        margin-bottom: 3px;
        padding: 0;
        border: 0;
        background: none;
        color: #FFB13B;
        font-size: 1rem;
        font-weight: 800;
        letter-spacing: 0.01em;
    }

    .event-card.poster .event-time-badge.is-ongoing,
    .event-card.poster .event-time-badge.is-running { background: none; color: #7EE2A8; }
    .event-card.poster .event-time-badge.is-ongoing.ends-soon { background: none; color: #FFB13B; }
    .poster-date { margin-right: 6px; color: rgba(255, 255, 255, 0.85); font-weight: 700; }

    .event-card.poster .poster-title {
        margin: 0 0 3px;
        color: #fff;
        font-size: 1.18rem;
        font-weight: 700;
        line-height: 1.22;
        text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
        -webkit-line-clamp: 3;
    }

    .poster-place {
        overflow: hidden;
        color: rgba(255, 255, 255, 0.75);
        font-size: 0.82rem;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .poster-place .source-fav { color: #FFD27A; }
    .event-card.poster .new-badge { font-size: 0.62rem; vertical-align: 3px; }

    /* Only what changes the plan: sold out or cancelled, top left on the picture */
    .poster-flag {
        position: absolute;
        top: 12px;
        left: 12px;
        z-index: 2;
        padding: 4px 10px;
        border-radius: 999px;
        background: rgba(12, 6, 12, 0.78);
        color: #fff;
        font-size: 0.75rem;
        font-weight: 700;
        backdrop-filter: blur(4px);
    }

    .poster-flag.fact-cancelled { background: rgba(185, 28, 28, 0.88); }

    .event-time-badge {
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.5px;
        background: rgba(var(--accent-rgb), 0.15);
        color: var(--accent);
        border: 1px solid rgba(var(--accent-rgb), 0.25);
        border-radius: 6px;
        padding: 2px 8px;
    }

    .event-source-pill {
        font-size: 0.7rem;
        color: var(--muted);
        background: rgba(var(--fg-rgb), 0.06);
        border-radius: 20px;
        padding: 2px 8px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 140px;
    }

    /* From one of the visitor's favourite places (star in the filter's sources) */
    .source-fav {
        color: var(--amber);
        font-size: 0.85em;
        margin-right: 4px;
    }

    .event-meta {
        color: var(--muted);
        font-size: 0.82rem;
    }

    .event-desc {
        color: var(--text-3);
        font-size: 0.85rem;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        line-height: 1.5;
    }

    .event-title {
        font-size: 0.97rem;
        font-weight: 600;
        color: var(--text);
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        line-height: 1.35;
    }

    .event-img {
        height: 160px;
        object-fit: cover;
        width: 100%;
        opacity: 0.85;
    }

    /* ── Sticky footer ── */
    .sticky-footer {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 10px 16px;
        margin-top: 12px;
        margin-bottom: 8px;
        background: var(--surface);
        border-radius: 12px;
        border: 1px solid rgba(var(--fg-rgb), 0.06);
    }

    .footer-updated {
        display: flex;
        align-items: center;
        gap: 5px;
        font-size: 0.7rem;
        color: rgba(var(--fg-rgb), 0.6);
    }

    .footer-legal {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 0.7rem;
        color: rgba(var(--fg-rgb), 0.55);
    }

    .footer-legal a {
        color: rgba(var(--fg-rgb), 0.7);
        text-decoration: none;
    }

    .footer-legal a:hover {
        color: rgba(var(--fg-rgb), 0.8);
        text-decoration: underline;
    }

    .footer-nav {
        display: flex;
        align-items: center;
        gap: 2px;
        background: var(--raised-4);
        border-radius: 8px;
        padding: 2px;
    }

    /* ===== Burger Menu ===== */

    .burger-menu-wrapper {
        position: relative;
    }

    .header-burger-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 34px;
        border-radius: 8px;
        border: 1px solid rgba(var(--fg-rgb), 0.08);
        background: var(--raised-4);
        color: var(--faint-2);
        font-size: 1.1rem;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .header-burger-btn:hover {
        background: rgba(var(--accent-rgb), 0.1);
        border-color: rgba(var(--accent-rgb), 0.3);
        color: var(--accent);
    }

    .burger-dropdown {
        position: absolute;
        top: calc(100% + 6px);
        right: 0;
        min-width: 180px;
        background: var(--surface-color, var(--surface-3));
        border: 1px solid rgba(var(--fg-rgb), 0.12);
        border-radius: 10px;
        padding: 4px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
        z-index: 1000;
        animation: localeDropIn 0.15s ease-out;
    }

    .burger-menu-item {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        padding: 8px 12px;
        border: none;
        border-radius: 7px;
        background: transparent;
        color: inherit;
        font-size: 0.85rem;
        text-decoration: none;
        cursor: pointer;
        transition: background 0.15s;
    }

    .burger-menu-item:hover {
        background: rgba(var(--fg-rgb), 0.08);
        text-decoration: none;
        color: inherit;
    }

    .burger-menu-item i {
        font-size: 0.9rem;
        opacity: 0.7;
        width: 20px;
        text-align: center;
    }

    /* Compact state */
    .sticky-toolbar.header-compact .header-burger-btn {
        width: 22px;
        height: 22px;
        border-radius: 5px;
        font-size: 0.7rem;
    }

    /* ════════════════════════════════════════════
       NEW LAYOUT: slim header, date strip, filters in a sheet/drawer
       (phones get a bottom tab bar, desktop has the actions in the header)
       ════════════════════════════════════════════ */
    .tab-bar,
    .mobile-only,
    .header-tools {
        display: none;
    }

    /* ── Shared by phones and desktop: logo, date strip, active-filter chips, filter sheet sections ── */
    .header-brand {
        display: flex;
        align-items: center;
        gap: 9px;
        margin-bottom: 0;
        text-decoration: none;
    }

    .header-brand:hover { text-decoration: none; opacity: 0.85; }

    .header-logo {
        display: block;
        width: 30px;
        height: 30px;
        border-radius: 8px;
        box-shadow: 0 0 0 1px rgba(var(--fg-rgb), 0.12), 0 2px 8px rgba(var(--accent-rgb), 0.25);
        flex: none;
    }

    /* ── Date strip ── */
    .date-strip {
        display: flex;
        gap: 6px;
        overflow-x: auto;
        padding: 6px 10px 10px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
    }

    .date-strip::-webkit-scrollbar { display: none; }

    /* Date strip + calendar button at its end */
    .date-strip-row {
        position: relative;
        display: flex;
        align-items: flex-start;
    }

    .date-strip-row > .date-strip { flex: 1 1 auto; min-width: 0; }

    .date-pick-wrap {
        position: relative;
        flex: 0 0 auto;
        display: flex;
    }

    .date-pick-btn {
        flex: 0 0 auto;
        margin: 6px 10px 10px 0;
        color: var(--accent);
        cursor: pointer;
    }

    .date-pick-btn i { font-size: 1.15rem; line-height: 1; margin-bottom: 4px; }

    /* The real date field, invisible over the button: tapping it opens the browser's calendar */
    .date-pick-input {
        position: absolute;
        inset: 6px 10px 10px 0;
        width: auto;
        height: auto;
        opacity: 0;
        border: 0;
        padding: 0;
        cursor: pointer;
        -webkit-appearance: none;
        appearance: none;
    }

    .date-chip {
        flex: 0 0 auto;
        min-width: 52px;
        height: 60px;
        padding: 4px 6px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0;
        border-radius: 14px;
        border: 1px solid rgba(var(--fg-rgb), 0.08);
        background: var(--raised-4);
        color: var(--text-2);
        scroll-snap-align: center;
        transition: background 0.15s ease, transform 0.12s ease;
    }

    .date-chip:active { transform: scale(0.95); }

    .date-chip-day {
        font-size: 0.66rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        color: rgba(var(--fg-rgb), 0.65); /* small text: needs 4.5:1 (WCAG AA) */
    }

    .date-chip-num {
        font-size: 1.2rem;
        font-weight: 800;
        line-height: 1.1;
    }

    .date-chip-month {
        font-size: 0.56rem;
        min-height: 0.7rem;
        color: rgba(var(--fg-rgb), 0.6);
        text-transform: uppercase;
    }

    .date-chip.weekend .date-chip-day { color: var(--pink-2); }

    .date-chip.active {
        background: var(--accent);
        border-color: var(--accent);
        color: var(--bg);
    }

    .date-chip.active .date-chip-day,
    .date-chip.active .date-chip-month {
        color: var(--on-accent);
    }

    .active-chips {
        display: flex;
        gap: 6px;
        overflow-x: auto;
        scrollbar-width: none;
        padding: 2px 2px 0;
    }

    .active-chips::-webkit-scrollbar { display: none; }

    .active-chip {
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        border-radius: 999px;
        background: rgba(var(--accent-rgb), 0.14);
        border: 1px solid rgba(var(--accent-rgb), 0.35);
        color: var(--accent-2);
        font-size: 0.8rem;
        font-weight: 600;
        overflow: hidden;
    }

    .active-chip-label {
        border: none;
        background: none;
        color: inherit;
        padding: 6px 4px 6px 12px;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        white-space: nowrap;
    }

    .active-chip-x {
        border: none;
        background: none;
        color: inherit;
        padding: 6px 10px 6px 4px;
        font-size: 1rem;
        line-height: 1;
    }

    .active-chips-hidden {
        flex: 0 0 auto;
        align-self: center;
        color: rgba(var(--fg-rgb), 0.55);
        font-size: 0.8rem;
        font-weight: 600;
        white-space: nowrap;
        padding: 0 4px;
    }

    /* Discover mode: chips in the row of the time of day, scrolled sideways with it */
    .quick-filters.is-discover { justify-content: flex-start; }
    .quick-filters.is-discover .quick-tools { margin-left: auto; }
    .active-chips-inline { flex: 0 0 auto; overflow: visible; padding: 0; flex-wrap: nowrap !important; }

    .active-chip-reset {
        flex: 0 0 auto;
        border: none;
        background: none;
        color: rgba(var(--fg-rgb), 0.55);
        font-size: 0.8rem;
        font-weight: 600;
        text-decoration: underline;
        padding: 6px 8px;
        white-space: nowrap;
    }

    /* ── Filter sheet: sections that moved in from the top bar ── */
    .filter-sheet .chip-section-label {
        font-size: 0.72rem;
        gap: 6px;
    }

    .filter-sheet .chip-section-actions { display: flex; }

    .filter-sheet .filter-chip {
        padding: 7px 12px;
        font-size: 0.85rem;
    }

    .sheet-daytime {
        display: flex;
        width: 100%;
    }

    .sheet-daytime .daytime-btn {
        flex: 1;
        height: 52px;
    }

    .filter-sheet .favorites-toggle {
        width: 100%;
        justify-content: center;
    }

    @media (max-width: 640px) {
        .mobile-only { display: block; }

        /* ── Header: "Lübeck lebt!" · event count · menu ── */
        .page-header {
            grid-template-columns: 1fr auto auto;
            grid-template-areas: "brand count right";
            padding: 8px 10px 4px 12px;
        }

        .header-day-number,
        .page-header-title,
        .page-header-subtitle,
        .header-search-indicator,
        .header-saved-btn,
        .header-scroll-btn,
        .fab-filter {
            display: none !important;
        }

        .page-header-center {
            grid-area: count;
        }

        .header-count-group {
            flex-direction: row;
            align-items: baseline;
            gap: 4px;
        }

        .event-count-badge {
            font-size: 1rem;
        }

        .event-count-label {
            font-size: 0.65rem;
        }

        /* Scrolled: only the date strip stays */
        .sticky-toolbar.header-compact .page-header {
            display: none;
        }

        .sticky-toolbar {
            padding-top: 4px;
        }

        /* ── Filter bar: hidden, only search (from the tab bar) and active-filter chips show ── */
        .filter-panel {
            background: none;
            border: none;
            padding: 0;
            gap: 8px;
            margin-bottom: 8px !important;
        }

        .filter-panel > .filter-row-top,
        .filter-panel > .filter-row-search,
        .filter-panel > .favorites-toggle,
        .filter-panel > .chip-section {
            display: none !important;
        }

        .mobile-search-row {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 4px 2px 0;
        }

        .mobile-search-row .search-input-wrap { flex: 1; }

        .mobile-search-cancel {
            border: none;
            background: none;
            color: var(--accent);
            font-weight: 600;
            font-size: 0.95rem;
            padding: 0 4px;
        }

        /* ── Bottom tab bar ── */
        .tab-bar {
            display: flex;
            position: fixed;
            left: 0;
            right: 0;
            bottom: 0;
            z-index: 900;
            align-items: flex-end;
            justify-content: space-around;
            padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
            background: rgba(var(--bg-rgb), 0.92);
            backdrop-filter: blur(14px);
            -webkit-backdrop-filter: blur(14px);
            border-top: 1px solid rgba(var(--fg-rgb), 0.08);
        }

        .tab-item,
        .tab-discover {
            position: relative;
            flex: 1 1 0;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 2px;
            border: none;
            background: none;
            color: rgba(var(--fg-rgb), 0.65); /* small text: needs 4.5:1 (WCAG AA) */
            font-size: 0.66rem;
            font-weight: 600;
            text-decoration: none;
            padding: 4px 0;
        }

        .tab-item i {
            font-size: 1.3rem;
            line-height: 1;
        }

        .tab-item.active { color: var(--accent-text); }
        .tab-heart { color: var(--red); }

        .tab-badge {
            position: absolute;
            top: 0;
            left: calc(50% + 6px);
            min-width: 17px;
            height: 17px;
            padding: 0 4px;
            border-radius: 9px;
            background: var(--accent);
            color: var(--bg);
            font-size: 0.62rem;
            font-weight: 800;
            line-height: 17px;
            text-align: center;
        }

        .tab-badge-heart { background: #F87171; color: #fff; }

        .tab-discover { color: var(--accent-text); }

        .tab-discover-circle {
            width: 54px;
            height: 54px;
            margin-top: -26px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(135deg, var(--discover-a), var(--discover-b));
            color: var(--on-discover);
            font-size: 1.45rem;
            box-shadow: 0 6px 18px rgba(var(--discover-rgb), 0.45), 0 0 0 4px var(--bg);
            transition: transform 0.15s ease;
        }

        .tab-discover:active .tab-discover-circle { transform: scale(0.92); }

        .tab-discover.active .tab-discover-circle {
            box-shadow: 0 0 0 4px var(--bg), 0 0 0 6px var(--discover-ring), 0 6px 22px rgba(var(--discover-rgb), 0.6);
        }

        /* Room for the tab bar */
        .container {
            padding-bottom: calc(84px + env(safe-area-inset-bottom)) !important;
        }

        /* Discover: smaller header (date strip only) but the tab bar at the bottom */
        .discover-deck {
            height: calc(100vh - 320px);
            height: calc(100dvh - 320px);
        }

        .discover-actions { margin-top: 10px; }

        .discover-btn { width: 48px; height: 48px; }

        /* Discover is a fixed screen on phones: no page scrolling, so the stack cannot
           slide under the tab bar. The height is measured in site.js (fitDiscover). */
        html:has(.discover-deck),
        html:has(.discover-deck) body {
            overflow: hidden;
            overscroll-behavior: none;
        }

        .discover[style*="--discover-h"]:has(.discover-deck) {
            display: flex;
            flex-direction: column;
            height: var(--discover-h);
            min-height: 0;
        }

        .discover[style*="--discover-h"] .discover-deck {
            flex: 1 1 auto;
            height: auto;
            min-height: 0;
            max-height: none;
        }

        /* The day navigation below the stack would only peek out between the buttons and the tab bar */
        .container:has(.discover-deck) .sticky-footer { display: none; }

        .discover[style*="--discover-h"] .discover-top-row,
        .discover[style*="--discover-h"] .discover-actions {
            flex: none;
        }
    }
    /* ════════════════════════════════════════════
       DESKTOP: logo · count · search · Discover · Filter · saved · menu,
       date strip below, filters in a drawer from the right
       ════════════════════════════════════════════ */
    .header-discover-btn {
        display: flex;
        align-items: center;
        gap: 8px;
        flex: none;
        height: 40px;
        padding: 0 18px;
        border: none;
        border-radius: 999px;
        background: linear-gradient(135deg, var(--discover-a), var(--discover-b));
        color: var(--on-discover);
        font-size: 0.88rem;
        font-weight: 700;
        cursor: pointer;
        box-shadow: 0 4px 16px rgba(var(--discover-rgb), 0.35);
        transition: transform 0.12s ease, box-shadow 0.15s ease;
    }

    .header-discover-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 6px 22px rgba(var(--discover-rgb), 0.5);
    }

    .header-discover-btn.active {
        box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--discover-ring), 0 6px 22px rgba(var(--discover-rgb), 0.55);
    }

    @media (min-width: 641px) {
        .page-header {
            padding: 10px 14px;
            gap: 14px;
        }

        .header-day-number,
        .page-header-title,
        .page-header-subtitle,
        .header-search-indicator,
        .fab-filter {
            display: none !important;
        }

        .header-brand {
            gap: 10px;
            font-size: 1.35rem;
            font-weight: 800;
            letter-spacing: -0.3px;
            text-transform: none;
            color: var(--text);
            opacity: 1;
            line-height: 1.1;
            white-space: nowrap;
        }

        .header-logo {
            width: 36px;
            height: 36px;
            border-radius: 10px;
        }

        .page-header-center { flex: none; }

        .header-count-group {
            flex-direction: row;
            align-items: baseline;
            gap: 5px;
        }

        .event-count-badge { font-size: 1.05rem; }

        .header-tools {
            display: flex;
            flex: 1 1 auto;
            align-items: center;
            justify-content: flex-end;
            gap: 8px;
            min-width: 0;
        }

        .header-search {
            flex: 1 1 auto;
            max-width: 460px;
        }

        .header-search .search-input {
            height: 40px;
            border-radius: 999px;
            padding-left: 34px;
            font-size: 0.88rem;
        }

        .header-search .search-icon {
            left: 14px;
            font-size: 0.8rem;
        }

        .header-filter-btn {
            height: 40px;
            border-radius: 999px;
        }

        /* The header keeps its size while scrolling */
        .sticky-toolbar.header-compact .page-header {
            padding: 10px 14px;
            margin-bottom: 8px;
        }

        .sticky-toolbar.header-compact .compact-hide {
            opacity: 1;
            max-height: none;
            overflow: visible;
        }

        .sticky-toolbar.header-compact .event-count-badge { font-size: 1.05rem; }

        .sticky-toolbar.header-compact .header-burger-btn,
        .sticky-toolbar.header-compact .header-scroll-btn {
            width: 34px;
            height: 34px;
            border-radius: 8px;
            font-size: 0.9rem;
        }

        /* Date strip */
        .date-strip {
            gap: 8px;
            padding: 0 2px 10px;
            scroll-snap-type: none;
        }

        .date-pick-btn { margin: 0 0 10px 8px; }
        .date-pick-input { inset: 0 0 10px 8px; }

        .date-chip {
            min-width: 62px;
            height: 64px;
            cursor: pointer;
        }

        .date-chip:hover:not(.active) {
            background: rgba(var(--fg-rgb), 0.08);
            border-color: rgba(var(--fg-rgb), 0.18);
        }

        /* Filter bar: only the active-filter chips remain */
        .filter-panel {
            background: none;
            border: none;
            padding: 0;
            gap: 8px;
            margin-bottom: 4px !important;
        }

        .filter-panel > .filter-row-top,
        .filter-panel > .filter-row-search,
        .filter-panel > .favorites-toggle,
        .filter-panel > .chip-section {
            display: none !important;
        }

        .active-chips {
            flex-wrap: wrap;
            overflow: visible;
            padding: 2px 2px 4px;
        }

        .active-chip-label,
        .active-chip-x,
        .active-chip-reset {
            cursor: pointer;
        }

        .active-chip:hover { background: rgba(var(--accent-rgb), 0.22); }

        /* Filter drawer from the right */
        .filter-sheet-backdrop {
            display: block;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.55);
            z-index: 1000;
            animation: sheetFade 0.2s ease;
        }

        .filter-sheet {
            position: fixed;
            top: 0;
            right: 0;
            bottom: 0;
            z-index: 1001;
            width: min(440px, 100vw);
            padding: 18px 20px 0;
            border-top: none;
            border-left: 1px solid rgba(var(--fg-rgb), 0.08);
            background: var(--surface-2);
            box-shadow: -12px 0 40px rgba(0, 0, 0, 0.6);
            animation: drawerIn 0.25s ease;
            gap: 12px;
        }

        .filter-sheet-body {
            flex: 1 1 auto;
            overflow-y: auto;
            overscroll-behavior: contain;
            padding-bottom: 12px;
        }

        .filter-sheet-footer {
            display: block;
            padding: 12px 0 16px;
            border-top: 1px solid rgba(var(--fg-rgb), 0.06);
        }

        .sheet-daytime .daytime-btn { height: 46px; }

        /* Discover: the stack and its buttons fit below the header */
        .discover-deck {
            height: calc(100vh - 370px);
            height: calc(100dvh - 370px);
            min-height: 340px;
        }
    }

    /* Narrow desktop windows: icons only */
    @media (min-width: 641px) and (max-width: 920px) {
        .header-btn-label,
        .event-count-label {
            display: none;
        }

        .header-discover-btn { padding: 0 14px; }
    }

    @keyframes drawerIn {
        from { transform: translateX(100%); }
        to { transform: translateX(0); }
    }

    /* ── Facts: cancelled, sold out, price, wheelchair access ── */
    .fact-badges { display: flex; flex-wrap: wrap; gap: 4px; margin: -2px 0 8px; }

    .fact-badge {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        padding: 2px 8px;
        border-radius: 6px;
        font-size: 0.72rem;
        font-weight: 700;
        line-height: 1.5;
        border: 1px solid transparent;
    }

    .fact-cancelled { background: rgba(239, 68, 68, 0.16); border-color: rgba(239, 68, 68, 0.45); color: var(--red-2); }
    .fact-soldout { background: rgba(251, 146, 60, 0.15); border-color: rgba(251, 146, 60, 0.4); color: var(--orange-2); }
    .fact-free { background: rgba(34, 197, 94, 0.15); border-color: rgba(34, 197, 94, 0.4); color: var(--green-2); }
    .fact-price { background: rgba(var(--fg-rgb), 0.06); border-color: rgba(var(--fg-rgb), 0.12); color: var(--text-2); }
    .fact-access { background: rgba(96, 165, 250, 0.15); border-color: rgba(96, 165, 250, 0.4); color: var(--blue-2); }

    .is-cancelled { text-decoration: line-through; text-decoration-color: rgba(239, 68, 68, 0.7); }
    .event-card.is-cancelled { text-decoration: none; }
    .event-card.is-cancelled .poster-img, .event-card.is-cancelled .poster-ph { filter: grayscale(0.8) brightness(0.6); }
    .event-card.is-cancelled .event-title { text-decoration: line-through; text-decoration-color: rgba(239, 68, 68, 0.9); }

    .discover-ticket-link { align-self: flex-start; margin-bottom: 10px; text-decoration: none; }

    /* ════════════════════════════════════════════
       EVENT DETAIL SHEET (EventDetailSheet.razor)
       ════════════════════════════════════════════ */
    html.sheet-open,
    html.sheet-open body {
        overflow: hidden;
        overscroll-behavior: none;
    }

    .detail-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1100;
        background: rgba(0, 0, 0, 0.62);
        animation: sheetFade 0.2s ease;
    }

    .detail-sheet {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1101;
        display: flex;
        flex-direction: column;
        max-height: 90vh;
        max-height: 90dvh;
        background: var(--surface-2);
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.6);
        overflow: hidden;
        animation: sheetUp 0.25s ease;
        outline: none;
        color: var(--text);
    }

    .detail-handle {
        position: absolute;
        top: 6px;
        left: 50%;
        z-index: 2;
        width: 40px;
        height: 4px;
        margin-left: -20px;
        border-radius: 2px;
        background: rgba(var(--fg-rgb), 0.45);
    }

    .detail-close {
        position: absolute;
        top: 12px;
        right: 12px;
        z-index: 2;
        width: 36px;
        height: 36px;
        border: none;
        border-radius: 50%;
        background: rgba(var(--bg-rgb), 0.7);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        color: var(--text);
        cursor: pointer;
    }

    .detail-scroll {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .detail-img {
        display: block;
        width: 100%;
        height: 210px;
        object-fit: cover;
        background: var(--surface-2);
    }

    .detail-body { padding: 16px 18px 12px; }

    .detail-sheet:not(:has(.detail-img)) .detail-body { padding-top: 26px; padding-right: 56px; }

    .detail-source {
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: var(--link-2);
        margin-bottom: 4px;
    }

    .detail-source-insta {
        margin-left: 6px;
        color: inherit;
        font-size: 0.85rem;
        text-decoration: none;
        opacity: 0.8;
    }

    .detail-source-insta:hover { opacity: 1; }

    .detail-title {
        font-size: 1.35rem;
        font-weight: 800;
        line-height: 1.25;
        letter-spacing: -0.2px;
        margin: 0 0 10px;
    }

    .detail-facts {
        list-style: none;
        padding: 0;
        margin: 4px 0 12px;
        display: flex;
        flex-direction: column;
        gap: 7px;
        font-size: 0.92rem;
        color: var(--text-2);
    }

    .detail-facts li { display: flex; gap: 10px; align-items: baseline; }
    .detail-facts i { color: var(--accent); flex: none; }
    .detail-facts a { color: var(--text-2); text-decoration: underline; text-decoration-color: rgba(var(--accent-rgb), 0.5); text-underline-offset: 3px; }

    .detail-cats { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 14px; }
    .detail-cats .badge { font-weight: 600; }

    .detail-text {
        color: var(--text-2);
        font-size: 0.92rem;
        line-height: 1.55;
        white-space: pre-line;
        margin: 0 0 8px;
    }

    .detail-readmore {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        color: var(--accent);
        font-size: 0.88rem;
        font-weight: 600;
        text-decoration: none;
    }

    .detail-actions {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
        gap: 4px;
        padding: 8px 10px;
        border-top: 1px solid rgba(var(--fg-rgb), 0.07);
    }

    .detail-action {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3px;
        padding: 8px 4px;
        border: none;
        border-radius: 12px;
        background: none;
        color: var(--text-2);
        font-size: 0.72rem;
        font-weight: 600;
        text-decoration: none;
        cursor: pointer;
    }

    .detail-action i { font-size: 1.25rem; color: var(--text); }
    .detail-action:hover { background: rgba(var(--fg-rgb), 0.05); color: var(--text); }
    .detail-action.is-saved i { color: var(--red); }

    .detail-cta {
        display: flex;
        gap: 8px;
        padding: 4px 14px calc(14px + env(safe-area-inset-bottom));
    }

    .detail-btn {
        flex: 1 1 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 48px;
        padding: 0 16px;
        border-radius: 14px;
        border: 1px solid rgba(var(--fg-rgb), 0.14);
        background: var(--raised-5);
        color: var(--text);
        font-weight: 700;
        font-size: 0.95rem;
        text-decoration: none;
    }

    .detail-btn:hover { color: var(--text); border-color: rgba(var(--accent-rgb), 0.5); }

    .detail-btn-primary {
        background: var(--accent);
        border-color: var(--accent);
        color: var(--bg);
    }

    .detail-btn-primary:hover { color: var(--bg); background: var(--accent-hover); }

    /* One ticket button per time: they share the rows, the organiser link gets its own */
    .detail-cta.has-times { flex-wrap: wrap; }
    .detail-cta.has-times .detail-btn { flex: 1 1 100%; }
    .detail-cta.has-times .detail-btn-time { flex: 1 1 96px; padding: 0 10px; font-variant-numeric: tabular-nums; }

    .detail-toast {
        position: absolute;
        left: 50%;
        bottom: calc(132px + env(safe-area-inset-bottom));
        transform: translateX(-50%);
        max-width: calc(100% - 32px);
        padding: 8px 14px;
        border-radius: 999px;
        background: var(--text);
        color: var(--bg);
        font-size: 0.85rem;
        font-weight: 700;
        overflow-wrap: anywhere;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
        animation: sheetFade 0.2s ease;
    }

    tr.is-cancelled td { text-decoration: line-through; opacity: 0.6; }

    /* Share fallback: the link with a copy button */
    .detail-share-box {
        position: absolute;
        left: 16px;
        right: 16px;
        bottom: calc(124px + env(safe-area-inset-bottom));
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 12px 14px 14px;
        border-radius: 14px;
        border: 1px solid rgba(var(--accent-rgb), 0.35);
        background: var(--surface-3);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
        animation: sheetFade 0.2s ease;
        z-index: 2;
    }

    .detail-share-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        color: var(--text);
        font-size: 0.85rem;
        font-weight: 700;
    }

    .detail-share-close {
        border: none;
        background: none;
        color: var(--muted);
        padding: 2px 4px;
        cursor: pointer;
    }

    .detail-share-row { display: flex; gap: 8px; }

    .detail-share-input {
        flex: 1 1 auto;
        min-width: 0;
        height: 40px;
        padding: 0 12px;
        border-radius: 10px;
        border: 1px solid rgba(var(--fg-rgb), 0.12);
        background: var(--surface);
        color: var(--text);
        font-size: 0.85rem;
    }

    .detail-share-copy {
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        height: 40px;
        padding: 0 16px;
        border: none;
        border-radius: 10px;
        background: var(--accent);
        color: var(--bg);
        font-size: 0.85rem;
        font-weight: 700;
        cursor: pointer;
    }

    .detail-share-copy.is-done { background: #34D399; }

    @media (min-width: 641px) {
        .detail-sheet {
            inset: 0;
            margin: auto;
            width: min(580px, 92vw);
            height: fit-content;
            max-height: 88vh;
            border-radius: 18px;
            border: 1px solid rgba(var(--fg-rgb), 0.08);
            animation: detailPop 0.2s ease;
        }

        .detail-handle { display: none; }
        .detail-img { height: 250px; }
        .detail-cta { padding-bottom: 16px; }
        .detail-toast { bottom: 120px; }
        .detail-share-box { bottom: 112px; }
    }

    @keyframes detailPop {
        from { opacity: 0; transform: scale(0.97); }
        to { opacity: 1; transform: scale(1); }
    }

    /* ── Today: running now / already over ── */
    .event-time-badge.is-running {
        background: rgba(34, 197, 94, 0.16);
        border-color: rgba(34, 197, 94, 0.45);
        color: var(--green-2);
    }

    .live-dot {
        display: inline-block;
        width: 8px;
        height: 8px;
        margin-right: 6px;
        border-radius: 50%;
        background: #22C55E;
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
        animation: livePulse 1.6s ease-out infinite;
        vertical-align: 1px;
    }

    @keyframes livePulse {
        0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6); }
        100% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); }
    }

    .state-over { margin-left: 4px; font-weight: 600; opacity: 0.85; }
    .event-card.is-over { opacity: 0.55; filter: saturate(0.4); }
    .event-card.is-over:hover { opacity: 0.85; }

    /* ── Loading outline and empty list ── */
    .skeleton-header { height: 64px; margin-top: 12px; border-radius: 12px; }
    .skeleton-strip { display: flex; gap: 8px; margin-top: 10px; overflow: hidden; }
    .skeleton-chip { flex: 0 0 60px; height: 62px; border-radius: 14px; }

    .empty-state {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
        padding: 48px 16px;
        text-align: center;
        color: var(--text-3);
    }

    .empty-state > i { font-size: 2.4rem; color: var(--accent); opacity: 0.7; }
    .empty-state p { margin: 0; max-width: 34ch; font-size: 0.95rem; }
    .empty-btn { width: auto; padding: 0 22px; margin-top: 6px; }
    .empty-btn .spinner-border { margin-right: 8px; vertical-align: -2px; }
    .empty-btn-secondary {
        background: none; border: none; color: var(--text-3); font-size: 0.9rem;
        text-decoration: underline; text-underline-offset: 3px; cursor: pointer; margin-top: 2px;
    }
    .empty-btn-secondary:hover { color: var(--text); }
    .empty-state .empty-note { font-size: 0.85rem; opacity: 0.8; }

    /* ── Sub pages (saved, about, imprint, …): their title stays visible; the event list hides it ── */
    .page-header.page-header-sub .page-header-title { display: block !important; }
    .page-header.page-header-sub .header-day-number { display: flex !important; }

    /* Icon and title in one row, close button on the right; the event list's phone grid does not apply */
    .page-header.page-header-sub {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 12px 10px 16px;
    }

    .page-header-sub .page-header-left {
        display: flex;
        align-items: center;
        gap: 12px;
        flex: 1 1 auto;
        min-width: 0;
    }

    .page-header-sub .header-text-group { display: block; min-width: 0; }
    .page-header-sub .header-day-number { font-size: 1.7rem; min-width: 0; }

    .page-header-sub .page-header-title {
        margin: 0;
        font-size: 1.25rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .page-header-sub .page-header-center { display: none; }
    .page-header-sub .page-header-right { margin-left: auto; align-self: center; }

    /* ── Burger menu: language ── */
    .burger-lang {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        padding: 6px 8px 8px;
    }

    .burger-lang-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        height: 36px;
        padding: 0 10px;
        border: 1px solid rgba(var(--fg-rgb), 0.1);
        border-radius: 10px;
        background: var(--raised-3);
        color: var(--text-3);
        font-size: 0.85rem;
        font-weight: 600;
        cursor: pointer;
    }

    .burger-lang-btn:hover { color: var(--text); border-color: rgba(var(--fg-rgb), 0.2); }
    .burger-lang-btn.active { color: var(--text); border-color: var(--accent); background: rgba(var(--accent-rgb), 0.12); }
    .burger-lang-btn .flag { width: 20px; height: 14px; border-radius: 2px; flex: 0 0 auto; }

    /* Light / dark: the choice is data-theme on the html element (none = like the device) */
    .burger-theme { grid-template-columns: 1fr 1fr 1fr; padding-top: 0; }
    .burger-theme .burger-lang-btn { gap: 6px; padding-left: 4px; padding-right: 4px; }
    :root:not([data-theme]) .burger-theme [data-theme-set="auto"],
    :root[data-theme="light"] .burger-theme [data-theme-set="light"],
    :root[data-theme="dark"] .burger-theme [data-theme-set="dark"] { color: var(--text); border-color: var(--accent); background: rgba(var(--accent-rgb), 0.12); }

    /* ── Footer: version ── */
    .footer-version {
        margin-top: 4px;
        text-align: center;
        font-size: 0.72rem;
        color: var(--faint);
    }

    /* ── Map ── */
    .map-wrap { margin-top: 4px; }

    .event-map {
        position: relative;
        height: min(70vh, 680px);
        border-radius: 14px;
        overflow: hidden;
        border: 1px solid rgba(var(--fg-rgb), 0.08);
        background: var(--surface-2);
    }

    .event-map.map-failed::after {
        content: "Die Karte konnte nicht geladen werden.";
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--text-3);
    }

    .map-hint { margin: 8px 2px 0; color: var(--muted); font-size: 0.82rem; }

    .map-pin {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 18px;
        height: 18px;
        padding: 0;
        border-radius: 50%;
        border: 2px solid var(--bg);
        background: var(--pin, #A0A2A3);
        box-shadow: 0 0 0 2px rgba(var(--fg-rgb), 0.35), 0 3px 10px rgba(0, 0, 0, 0.5);
        color: #14141F;
        font-size: 0.7rem;
        font-weight: 800;
        line-height: 1;
        cursor: pointer;
    }

    .map-pin.has-count { width: 26px; height: 26px; }
    .map-pin:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

    .maplibregl-popup-content {
        padding: 12px 14px 10px !important;
        border-radius: 12px !important;
        background: var(--surface-3) !important;
        color: var(--text);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55) !important;
    }

    .maplibregl-popup-tip { border-top-color: var(--surface-3) !important; border-bottom-color: var(--surface-3) !important; }
    .maplibregl-popup-close-button { color: var(--text-3); font-size: 1.1rem; padding: 2px 8px; }
    .map-popup-place { padding-right: 18px; margin-bottom: 6px; font-size: 0.8rem; font-weight: 700; color: var(--accent-2); }
    .map-popup ul { list-style: none; margin: 0; padding: 0; max-height: 240px; overflow-y: auto; }

    .map-popup button {
        display: flex;
        gap: 8px;
        width: 100%;
        padding: 6px 4px;
        border: none;
        border-top: 1px solid rgba(var(--fg-rgb), 0.06);
        background: none;
        color: var(--text);
        text-align: left;
        font-size: 0.85rem;
        cursor: pointer;
    }

    .map-popup button:hover { background: rgba(var(--accent-rgb), 0.1); }
    .map-popup-time { flex: 0 0 auto; color: var(--muted); font-variant-numeric: tabular-nums; }
    .map-popup-title { font-weight: 600; }
    .maplibregl-ctrl-attrib { font-size: 0.68rem; }

    .map-noplace {
        margin-top: 10px;
        border: 1px solid rgba(var(--fg-rgb), 0.08);
        border-radius: 12px;
        background: var(--surface);
    }

    .map-noplace summary { padding: 12px 14px; cursor: pointer; font-weight: 700; color: var(--text); }
    .map-noplace ul { list-style: none; margin: 0; padding: 0 6px 8px; }

    .map-noplace button {
        display: grid;
        grid-template-columns: auto 1fr;
        column-gap: 10px;
        width: 100%;
        padding: 8px;
        border: none;
        border-top: 1px solid rgba(var(--fg-rgb), 0.05);
        background: none;
        color: var(--text);
        text-align: left;
        cursor: pointer;
    }

    .map-noplace button:hover { background: rgba(var(--fg-rgb), 0.04); }
    .map-noplace-time { grid-row: span 2; color: var(--muted); font-size: 0.82rem; font-variant-numeric: tabular-nums; }
    .map-noplace-title { font-weight: 600; font-size: 0.9rem; }
    .map-noplace-place { color: var(--muted); font-size: 0.78rem; }

    @media (max-width: 640px) {
        .event-map { height: 62vh; border-radius: 12px; }
    }

    /* ── Share the day: toast and the link box (when the phone's share sheet is missing) ── */
    .quick-chip-share { margin-left: auto; }

    .list-toast {
        position: fixed;
        left: 50%;
        bottom: calc(90px + env(safe-area-inset-bottom));
        transform: translateX(-50%);
        z-index: 1050;
        padding: 8px 16px;
        border-radius: 999px;
        background: var(--text);
        color: var(--bg);
        font-size: 0.85rem;
        font-weight: 700;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
        animation: sheetFade 0.2s ease;
    }

    .detail-share-box.list-share-box {
        position: fixed;
        left: 50%;
        right: auto;
        bottom: calc(90px + env(safe-area-inset-bottom));
        transform: translateX(-50%);
        width: min(520px, calc(100vw - 32px));
        z-index: 1050;
    }

    /* ── Saved page: all into the calendar ── */
    .saved-actions { display: flex; justify-content: flex-end; margin: 0 0 14px; }

    .saved-calendar-btn {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        height: 40px;
        padding: 0 16px;
        border-radius: 999px;
        border: 1px solid rgba(var(--accent-rgb), 0.45);
        background: rgba(var(--accent-rgb), 0.12);
        color: var(--accent-2);
        font-size: 0.88rem;
        font-weight: 700;
        text-decoration: none;
    }

    .saved-calendar-btn:hover { background: rgba(var(--accent-rgb), 0.22); color: var(--accent-2-hover); }

    /* ── "Neu": added since the previous visit ── */
    .new-badge {
        display: inline-block;
        margin-right: 6px;
        padding: 1px 7px;
        border-radius: 6px;
        background: #FBBF24;
        color: #1a1405;
        font-size: 0.68rem;
        font-weight: 800;
        letter-spacing: 0.4px;
        text-transform: uppercase;
        vertical-align: 0.15em;
    }

    /* ── Cards without a picture: category icon on its colours ── */
    .event-img-placeholder {
        height: 160px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--surface-2);
        background: linear-gradient(135deg,
            color-mix(in srgb, var(--cat-color-a, #444) 45%, var(--surface)),
            color-mix(in srgb, var(--cat-color-b, #555) 25%, var(--surface)));
    }

    .event-img-placeholder i { font-size: 3rem; color: rgba(var(--fg-rgb), 0.45); }

    /* Drawn placeholders: a pattern per category over its colours, the icon and the category's name */
    .event-img-placeholder {
        position: relative;
        flex-direction: column;
        gap: 6px;
        overflow: hidden;
        --ph-line: rgba(var(--fg-rgb), 0.07);
    }

    .event-img-placeholder::before {
        content: "";
        position: absolute;
        inset: 0;
        pointer-events: none;
        background-image: repeating-linear-gradient(135deg, var(--ph-line) 0 2px, transparent 2px 22px);
    }

    .event-img-placeholder i, .event-img-placeholder .ph-label { position: relative; }

    .event-img-placeholder .ph-label {
        font-size: 0.7rem;
        font-weight: 600;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: rgba(var(--fg-rgb), 0.5);
    }

    /* Music: sound rings */
    .ph-cat-1::before { background-image: repeating-radial-gradient(circle at 50% 50%, var(--ph-line) 0 2px, transparent 2px 18px); }
    /* Theatre: curtain folds */
    .ph-cat-2::before { background-image: repeating-linear-gradient(90deg, rgba(var(--fg-rgb), 0.06) 0 12px, rgba(0, 0, 0, 0.1) 12px 24px); }
    /* Film: perforated strips top and bottom */
    .ph-cat-3::before {
        background-image:
            repeating-linear-gradient(90deg, rgba(var(--fg-rgb), 0.16) 0 10px, transparent 10px 22px),
            repeating-linear-gradient(90deg, rgba(var(--fg-rgb), 0.16) 0 10px, transparent 10px 22px);
        background-size: 100% 10px, 100% 10px;
        background-position: 0 10px, 0 calc(100% - 10px);
        background-repeat: no-repeat;
    }
    /* Exhibition: frames */
    .ph-cat-4::before { background-image: linear-gradient(var(--ph-line) 2px, transparent 2px), linear-gradient(90deg, var(--ph-line) 2px, transparent 2px); background-size: 34px 34px; }
    /* Tour: a dotted path */
    .ph-cat-5::before { background-image: radial-gradient(circle, rgba(var(--fg-rgb), 0.12) 2px, transparent 2.5px); background-size: 16px 16px; }
    /* Reading: lines of a page */
    .ph-cat-6::before { background-image: repeating-linear-gradient(0deg, var(--ph-line) 0 1px, transparent 1px 14px); }
    /* Workshop: a cutting mat grid */
    .ph-cat-7::before { background-image: linear-gradient(var(--ph-line) 1px, transparent 1px), linear-gradient(90deg, var(--ph-line) 1px, transparent 1px); background-size: 12px 12px; }
    /* Party: a record */
    .ph-cat-8::before { background-image: repeating-radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.18) 0 3px, rgba(var(--fg-rgb), 0.05) 3px 6px); }
    /* Show: spotlight */
    .ph-cat-9::before { background-image: radial-gradient(ellipse at 50% -10%, rgba(var(--fg-rgb), 0.22), transparent 60%); }
    /* Outdoor: hills */
    .ph-cat-10::before { background-image: radial-gradient(ellipse at 20% 130%, rgba(var(--fg-rgb), 0.12) 0 45%, transparent 46%), radial-gradient(ellipse at 80% 140%, rgba(var(--fg-rgb), 0.08) 0 50%, transparent 51%); }
    /* Talk: speech waves */
    .ph-cat-11::before { background-image: repeating-radial-gradient(circle at 0% 50%, var(--ph-line) 0 2px, transparent 2px 16px); }
    /* Children: confetti */
    .ph-cat-12::before { background-image: radial-gradient(circle, rgba(var(--fg-rgb), 0.14) 3px, transparent 3.5px), radial-gradient(circle, rgba(var(--fg-rgb), 0.08) 2px, transparent 2.5px); background-size: 28px 28px, 19px 19px; background-position: 0 0, 9px 11px; }
    /* Market: awning stripes */
    .ph-cat-13::before { background-image: repeating-linear-gradient(90deg, rgba(var(--fg-rgb), 0.09) 0 16px, transparent 16px 32px); background-size: 100% 26px; background-repeat: no-repeat; }

    /* Film facts: genre, length, age rating */
    .fact-badge.fact-film { background: rgba(250, 187, 61, 0.12); color: var(--film); border-color: rgba(250, 187, 61, 0.3); }
    .fact-badge.fact-fsk { font-weight: 700; }
    .fact-badge.fsk-0 { background: #f2f2f2; color: #222; }
    .fact-badge.fsk-6 { background: #f6d400; color: #222; }
    .fact-badge.fsk-12 { background: #2fa84f; color: #fff; }
    .fact-badge.fsk-16 { background: #2b7bd6; color: #fff; }
    .fact-badge.fsk-18 { background: #d9302c; color: #fff; }

    .detail-also-listed a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

    /* ── Quick filters: now & soon, free, without sold out ── */
    .quick-filters {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        scrollbar-width: none;
        padding: 2px 2px 0;
    }

    .quick-filters::-webkit-scrollbar { display: none; }

    .quick-chip {
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        height: 34px;
        padding: 0 14px;
        border-radius: 999px;
        border: 1px solid rgba(var(--fg-rgb), 0.12);
        background: var(--raised-4);
        color: var(--text-2);
        font-size: 0.82rem;
        font-weight: 600;
        white-space: nowrap;
        cursor: pointer;
        transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    }

    .quick-chip i { font-size: 0.85rem; }
    .quick-chip:hover { border-color: rgba(var(--accent-rgb), 0.45); color: var(--text); }

    .quick-chip.active {
        background: rgba(var(--accent-rgb), 0.16);
        border-color: rgba(var(--accent-rgb), 0.6);
        color: var(--accent-2);
    }

    .quick-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

    /* ── Row above the list: time of day (one choice) and small tools ── */
    .quick-filters { justify-content: space-between; }

    .tod-switch {
        flex: 0 0 auto; /* never squeezed: on very small phones the row scrolls instead */
        display: inline-flex;
        padding: 3px;
        gap: 2px;
        border-radius: 999px;
        border: 1px solid rgba(var(--fg-rgb), 0.1);
        background: var(--raised-4);
    }

    .tod-btn {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        height: 30px;
        padding: 0 12px;
        border: 0;
        border-radius: 999px;
        background: none;
        color: var(--text-3);
        font-size: 0.82rem;
        font-weight: 600;
        white-space: nowrap;
        cursor: pointer;
        transition: background 0.15s ease, color 0.15s ease;
    }

    .tod-btn i { font-size: 0.8rem; }
    .tod-btn:hover { color: var(--text); }
    .tod-btn.active { background: rgba(var(--accent-rgb), 0.18); color: var(--accent-2); }
    .tod-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

    .quick-tools { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; }

    .tool-btn {
        width: 36px;
        height: 36px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        border: 1px solid rgba(var(--fg-rgb), 0.12);
        background: var(--raised-4);
        color: var(--text-2);
        cursor: pointer;
    }

    .tool-btn:hover { border-color: rgba(var(--accent-rgb), 0.45); color: var(--text); }
    .tool-btn.active { background: rgba(var(--accent-rgb), 0.16); border-color: rgba(var(--accent-rgb), 0.6); color: var(--accent-2); }
    .tool-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

    .weather-pill {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        height: 36px;
        padding: 0 6px;
        border: 1px solid transparent;
        border-radius: 999px;
        background: none;
        color: var(--text-3);
        font-size: 0.82rem;
        font-weight: 600;
        white-space: nowrap;
    }

    button.weather-pill { cursor: pointer; padding: 0 12px; border-color: rgba(var(--accent-2-rgb), 0.35); }
    .weather-pill.is-rainy { color: var(--accent-2); }
    .weather-pill.active { background: rgba(var(--accent-rgb), 0.16); border-color: rgba(var(--accent-rgb), 0.6); }
    .weather-indoor { display: inline-flex; align-items: center; gap: 4px; }
    .weather-temp-max { display: none; }

    /* Narrow phones: icons only for the time of day, short weather */
    @media (max-width: 420px) {
        .tod-btn { padding: 0 7px; font-size: 0.8rem; }
        span.weather-pill .weather-temp { display: none; }
        span.weather-pill .weather-temp-max { display: inline; }
        .tod-btn i { display: none; }
        .quick-filters { gap: 6px; }
        .quick-tools { gap: 4px; }
        .tool-btn { width: 32px; height: 32px; }
        span.weather-pill { padding: 0 2px; }
        /* Rainy day: a round umbrella button; the chip "Indoors only" below says when it is on */
        button.weather-pill { width: 34px; height: 34px; padding: 0; justify-content: center; }
        button.weather-pill > .bi-cloud-rain, button.weather-pill .weather-temp, .weather-indoor-label { display: none; }
    }

    /* ── Detail sheet: small map, notes, similar events ── */
    .detail-map-link { display: block; margin: 0 0 14px; border-radius: 12px; }
    .detail-map-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

    .detail-map {
        position: relative;
        height: 150px;
        border-radius: 12px;
        overflow: hidden;
        border: 1px solid rgba(var(--fg-rgb), 0.08);
        background: var(--surface-2);
    }

    .detail-map.map-failed { display: none; }
    .detail-map .map-pin { cursor: inherit; }
    .detail-facts .detail-weather i { color: var(--accent-2); }
    .detail-note { color: var(--muted); font-size: 0.8rem; }
    .fact-access.is-limited { opacity: 0.6; }

    .detail-price-details {
        display: block;
        margin-top: 2px;
        color: var(--muted);
        font-size: 0.82rem;
        line-height: 1.45;
        white-space: pre-line;
    }

    .detail-dates { display: flex; flex-wrap: wrap; gap: 6px; }

    .detail-similar .detail-date-chip {
        display: inline-flex;
        align-items: center;
        width: auto;
        height: 32px;
        padding: 0 12px;
        border-radius: 999px;
        border: 1px solid rgba(var(--fg-rgb), 0.12);
        background: var(--raised-4);
        color: var(--text-2);
        font-size: 0.82rem;
        font-weight: 600;
        white-space: nowrap;
        cursor: pointer;
    }

    .detail-similar .detail-date-chip:hover { border-color: rgba(var(--accent-rgb), 0.45); color: var(--text); }
    .detail-venue-link { margin-left: 8px; font-size: .85em; color: var(--text-3); white-space: nowrap; }
    .detail-venue-link::before { content: "· "; }
    .detail-similar .detail-date-more { border-style: dashed; color: var(--text-3); }
    .detail-date-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

    .detail-similar {
        margin-top: 18px;
        padding-top: 14px;
        border-top: 1px solid rgba(var(--fg-rgb), 0.08);
    }

    .detail-similar h3 {
        margin: 0 0 6px;
        color: var(--muted);
        font-size: 0.78rem;
        font-weight: 700;
        letter-spacing: 0.06em;
        text-transform: uppercase;
    }

    .detail-similar ul { list-style: none; padding: 0; margin: 0 -8px; }

    .detail-similar button {
        width: 100%;
        display: grid;
        grid-template-columns: 52px 1fr;
        column-gap: 12px;
        padding: 8px;
        border: 0;
        border-radius: 10px;
        background: none;
        color: var(--text);
        text-align: left;
        cursor: pointer;
    }

    .detail-similar button:hover { background: rgba(var(--fg-rgb), 0.05); }
    .detail-similar button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
    .similar-time { grid-row: span 2; color: var(--accent); font-size: 0.85rem; font-weight: 700; }
    .similar-title { font-size: 0.92rem; font-weight: 600; line-height: 1.3; }
    .similar-place { color: var(--muted); font-size: 0.8rem; }

    /* ── Exhibitions and long runs: own section below the day's events ── */
    .ongoing-section { margin-top: 28px; scroll-margin-top: 130px; } /* below the sticky date bar */
    .ongoing-section.is-only { margin-top: 4px; }

    .ongoing-toggle {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        padding: 14px 16px;
        margin-bottom: 14px;
        border: 1px solid rgba(var(--fg-rgb), 0.08);
        border-radius: 12px;
        background: var(--surface);
        color: var(--text);
        font-size: 0.95rem;
        font-weight: 700;
        text-align: left;
        cursor: pointer;
    }

    .ongoing-toggle:disabled { cursor: default; opacity: 1; }
    .ongoing-toggle:not(:disabled):hover { border-color: rgba(var(--accent-rgb), 0.35); }
    .ongoing-toggle > .bi-easel2 { color: var(--green-3); font-size: 1.1rem; }
    .ongoing-title { flex: 1 1 auto; }

    .ongoing-count {
        min-width: 26px;
        padding: 2px 8px;
        border-radius: 999px;
        background: rgba(var(--fg-rgb), 0.08);
        color: var(--text-2);
        font-size: 0.78rem;
        text-align: center;
    }

    .ongoing-chevron { transition: transform 0.2s ease; color: var(--muted); }
    .ongoing-toggle[aria-expanded="true"] .ongoing-chevron { transform: rotate(180deg); }

    .hidden-note-btn {
        flex: 0 0 auto;
        height: 32px;
        padding: 0 14px;
        border: none;
        border-radius: 999px;
        background: var(--accent);
        color: var(--bg);
        font-size: 0.82rem;
        font-weight: 700;
        cursor: pointer;
        white-space: nowrap;
    }

    .hidden-note-btn:hover { background: var(--accent-hover); }

    /* ── Below the list: what the filters left out ── */
    /* Bars on the map (optional layer) */
    .map-bars-toggle { display: inline-flex; align-items: center; gap: 5px; margin-left: 10px; cursor: pointer; white-space: nowrap; }
    .map-bars-toggle input { accent-color: var(--accent); }
    .map-pin.map-pin-bar { --pin: #8D6E63; width: 14px; height: 14px; opacity: 0.9; }
    .map-popup-route { display: inline-block; margin-top: 6px; color: var(--link-2); font-weight: 600; text-decoration: none; }

    /* After midnight, before the day's first event (EventListNight): big cards, so the list does not start at 09:00 */
    .night-section { margin: 12px 0 28px; padding-bottom: 20px; border-bottom: 1px dashed rgba(var(--fg-rgb), 0.15); }
    .night-title { margin: 0 0 12px; font-size: 1.05rem; font-weight: 700; color: var(--text); }
    .night-card { position: relative; display: flex; flex-direction: column; gap: 4px; min-height: 200px; height: 100%; padding: 18px; border-radius: 12px;
        border: 1px solid rgba(var(--accent-rgb), 0.25); background: linear-gradient(160deg, rgba(var(--accent-rgb), 0.16), rgba(var(--fg-rgb), 0.03) 70%), var(--raised-3);
        color: var(--text); text-decoration: none; transition: transform 0.18s ease, border-color 0.18s ease; }
    a.night-card:hover { transform: translateY(-2px); border-color: rgba(var(--accent-rgb), 0.5); }
    .night-card.is-asleep { justify-content: center; text-align: center; align-items: center; }
    .night-emoji { font-size: 2.4rem; line-height: 1; margin-bottom: auto; }
    .night-hours { margin-top: 18px; color: var(--green-3); font-weight: 700; font-size: 0.85rem; }
    .night-name { font-size: 1.15rem; font-weight: 750; }
    .night-traits { color: var(--text-2); font-size: 0.88rem; }
    .night-where { color: var(--muted); font-size: 0.82rem; }
    .night-more { display: inline-flex; align-items: center; gap: 4px; margin-top: 12px; padding: 0; border: 0; background: none; color: var(--link-2); font-weight: 600; cursor: pointer; }

    /* Bars and pubs open that evening (EventListBars) */
    .bars-section { margin-top: 28px; padding: 14px 16px; border: 1px solid rgba(var(--fg-rgb), 0.08); border-radius: 12px; background: var(--surface); }
    .bars-title { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font-size: 0.95rem; font-weight: 700; color: var(--text); }
    .bars-title > .bi { color: var(--accent); font-size: 1.1rem; }
    .bars-title > span:nth-child(2) { flex: 1 1 auto; }
    .bars-count { min-width: 26px; padding: 2px 8px; border-radius: 999px; background: rgba(var(--fg-rgb), 0.08); color: var(--text-2); font-size: 0.78rem; text-align: center; }
    .bars-list { list-style: none; margin: 0; padding: 0; }
    .bar-row { display: flex; align-items: center; gap: 4px; border-top: 1px solid rgba(var(--fg-rgb), 0.06); }
    .bar-row:first-child { border-top: none; }
    .bar-main { flex: 1 1 auto; display: grid; grid-template-columns: 1fr auto; column-gap: 10px; padding: 9px 2px; color: var(--text); text-decoration: none; }
    .bar-main:hover .bar-name { color: var(--accent); }
    .bar-insta { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; color: var(--muted); font-size: 1.05rem; text-decoration: none; }
    .bar-insta:hover { color: var(--accent); background: rgba(var(--accent-rgb), 0.1); }
    .bar-name { font-weight: 650; }
    .bar-row.is-highlighted .bar-name::after { content: " ★"; color: var(--accent); }
    .bar-traits { grid-column: 1; font-size: 0.82rem; color: var(--text-2); }
    .bar-meta { grid-column: 1; font-size: 0.82rem; color: var(--muted); }
    .bar-hours.is-open { color: var(--green-3); font-weight: 600; }
    .bar-route { grid-column: 2; grid-row: 1 / span 3; align-self: center; color: var(--muted); }
    .bars-section { scroll-margin-top: 130px; } /* below the sticky date bar */
    .food-section { margin-top: 14px; }
    /* At the top of the list in the evening: points down to the bars */
    .bars-teaser { display: flex; align-items: center; gap: 8px; width: 100%; margin: 12px 0 4px; padding: 11px 14px; border: 1px solid rgba(var(--accent-rgb), 0.3); border-radius: 12px; background: rgba(var(--accent-rgb), 0.08); color: var(--text); font-weight: 650; text-align: left; cursor: pointer; }
    .bars-teaser:hover { border-color: rgba(var(--accent-rgb), 0.55); }
    .bars-teaser .bi { margin-left: auto; color: var(--accent); font-size: 1.2rem; }
    .bars-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
    .bars-page-link { color: var(--link-2); font-size: 0.88rem; text-decoration: none; margin-left: auto; }
    .bars-source { margin: 10px 0 0; font-size: 0.72rem; color: var(--muted); }
    .bars-source a { color: inherit; }

    .hidden-note {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 10px;
        margin: 22px 0 6px;
        padding: 14px;
        border-radius: 12px;
        border: 1px dashed rgba(var(--fg-rgb), 0.14);
        color: var(--text-3);
        font-size: 0.88rem;
        text-align: center;
    }

    /* ── Search results by day ── */
    .search-day {
        display: flex;
        align-items: baseline;
        gap: 8px;
        margin: 20px 2px 10px;
        font-size: 1.05rem;
        font-weight: 700;
        color: var(--text);
    }

    .search-day:first-child { margin-top: 4px; }

    /* Today: what began earlier follows under "Läuft gerade" (EventList.razor) */
    .search-day.running-heading { margin: 10px 2px 0; }
    .running-heading i { color: var(--muted); margin-right: 4px; }

    .search-day-count {
        font-size: 0.75rem;
        font-weight: 600;
        color: var(--muted);
    }

    /* ── Date strip: how much is on ── */
    .date-chip { position: relative; }

    .date-chip-load {
        position: absolute;
        left: 50%;
        bottom: 4px;
        width: calc(var(--load, 0) * 60%);
        height: 3px;
        border-radius: 2px;
        background: rgba(var(--accent-rgb), 0.75);
        transform: translateX(-50%);
    }

    .date-chip.active .date-chip-load { background: rgba(var(--bg-rgb), 0.55); }

    /* ── Distance ("In meiner Nähe") ── */

    /* ── Burger menu: install as app (shown by site.js where possible) ── */
    .burger-menu-item.burger-install { display: none; }
    html[data-install="prompt"] .burger-menu-item.burger-install,
    html[data-install="ios"] .burger-menu-item.burger-install { display: flex; }

    .install-hint {
        position: fixed;
        left: 50%;
        bottom: calc(90px + env(safe-area-inset-bottom));
        transform: translateX(-50%);
        z-index: 1100;
        width: min(92vw, 380px);
        padding: 12px 16px;
        border-radius: 14px;
        background: var(--text);
        color: var(--bg);
        font-size: 0.9rem;
        font-weight: 600;
        text-align: center;
        box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
    }

    /* Narrow phones: room for "In meiner Nähe" in the row of quick filters */
    @media (max-width: 400px) {
        .quick-filters { gap: 4px; }
        .quick-tools { gap: 3px; }
        .tod-btn { padding-left: 5px; padding-right: 5px; }
        .quick-tools .tool-btn { width: 30px; min-width: 30px; height: 30px; }
    }
    @media (max-width: 370px) {
        .tod-btn { padding-left: 4px; padding-right: 4px; }
        .quick-tools .tool-btn { width: 28px; min-width: 28px; height: 28px; }
        .quick-filters { gap: 2px; }
    }

    /* ── Row of ongoing offers between the day's cards (EventListOngoingStrip) ── */
    .ongoing-strip {
        margin: 6px 0 4px;
        padding: 12px 0 10px;
        border-top: 1px solid rgba(var(--fg-rgb), 0.08);
        border-bottom: 1px solid rgba(var(--fg-rgb), 0.08);
    }

    .ongoing-strip-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
    .ongoing-strip-title { display: inline-flex; align-items: center; gap: 8px; font-size: 0.9rem; font-weight: 700; color: var(--text); }
    .ongoing-strip-title > .bi-easel2 { color: var(--green-3); }

    .ongoing-strip-all {
        border: 0;
        background: none;
        color: var(--link);
        font-size: 0.85rem;
        font-weight: 600;
        padding: 4px 2px;
        cursor: pointer;
    }

    .ongoing-strip-row {
        display: flex;
        gap: 10px;
        overflow-x: auto;
        scroll-snap-type: x proximity;
        overscroll-behavior-x: contain;
        padding-bottom: 6px;
        scrollbar-width: thin;
    }

    .ongoing-tile {
        flex: 0 0 148px;
        display: flex;
        flex-direction: column;
        gap: 4px;
        padding: 0;
        border: 0;
        background: none;
        color: var(--text);
        text-align: left;
        scroll-snap-align: start;
        cursor: pointer;
    }

    .ongoing-tile-media {
        position: relative;
        display: block;
        height: 92px;
        border-radius: 10px;
        overflow: hidden;
        background: var(--surface);
    }

    .ongoing-tile-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .ongoing-tile-media .event-img-placeholder { height: 100%; }
    .ongoing-tile-media .event-img-placeholder i { font-size: 1.8rem; }

    .ongoing-tile-until {
        position: absolute;
        left: 6px;
        bottom: 6px;
        padding: 1px 7px;
        border-radius: 6px;
        background: rgba(0, 0, 0, 0.62);
        color: #fff;
        font-size: 0.68rem;
        font-weight: 700;
    }

    .ongoing-tile-until.ends-soon { background: var(--amber); color: #1a1405; }

    .ongoing-tile-title {
        font-size: 0.82rem;
        font-weight: 600;
        line-height: 1.25;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .ongoing-tile-place { font-size: 0.72rem; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .ongoing-tile:hover .ongoing-tile-title { text-decoration: underline; }

    /* Merkliste: what changed since saving (Saved.razor, Models/SavedChanges) */
    .saved-changes {
        margin-bottom: 18px;
        padding: 14px 16px;
        border-radius: 12px;
        border: 1px solid rgba(251, 191, 36, 0.45);
        background: rgba(251, 191, 36, 0.10);
        color: var(--text);
    }

    .saved-changes-head { font-weight: 700; margin-bottom: 8px; }
    .saved-changes-head .bi-bell-fill { color: var(--amber); margin-right: 4px; }
    .saved-changes ul { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 8px; }
    .saved-change { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 0.9rem; line-height: 1.35; }
    .saved-change-label { font-weight: 700; }
    .saved-change.kind-cancelled .saved-change-label, .saved-change.kind-gone .saved-change-label { color: var(--red); }
    .saved-change.kind-soldout .saved-change-label { color: var(--amber); }
    .saved-change-title { font-weight: 600; }
    .saved-change-detail { flex-basis: 100%; color: var(--text-2); font-size: 0.82rem; }
    .saved-change-detail a { color: var(--link); text-decoration: none; margin-left: 4px; }

    .saved-changes-ok {
        border: 0;
        border-radius: 8px;
        padding: 6px 14px;
        background: rgba(var(--fg-rgb), 0.1);
        color: var(--text);
        font-weight: 600;
        cursor: pointer;
    }

    /* "Für dich" row (EventListForYouStrip): same tiles, the reason under the title */
    .foryou-strip .ongoing-strip-title > .bi-stars { color: var(--accent); }
    .english-strip .ongoing-strip-title > .bi-translate { color: var(--accent); }
    /* "Lust zu stöbern?": the way into Discover, between the cards for visitors who do not know it yet */
    .discover-promo { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px 18px; border-radius: 14px; text-align: left; cursor: pointer;
        border: 1px solid rgba(var(--accent-rgb), 0.35); background: linear-gradient(120deg, rgba(var(--accent-rgb), 0.2), rgba(var(--fg-rgb), 0.03) 75%), var(--raised-3);
        color: var(--text); }
    .discover-promo:hover { border-color: rgba(var(--accent-rgb), 0.6); }
    .discover-promo-stack { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 12px;
        background: linear-gradient(135deg, var(--discover-a), var(--discover-b)); color: var(--on-discover); font-size: 1.35rem; transform: rotate(-6deg); }
    .discover-promo-text { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; }
    .discover-promo-title { font-weight: 750; font-size: 1.02rem; }
    .discover-promo-sub { font-size: 0.85rem; color: var(--text-2); }
    .discover-promo-go { flex: none; font-weight: 700; color: var(--accent); white-space: nowrap; }
    /* Days like Halloween in season (EventListOccasionTile): a little night scene above the list, dark in both
       themes like the Instagram posts; one tap shows all of the occasion's events */
    .occasion-tile { position: relative; display: flex; align-items: center; width: 100%; min-height: 104px; margin: 12px 0 6px; padding: 14px 0 14px 18px;
        overflow: hidden; border: 1px solid rgba(255, 177, 59, 0.35); border-radius: 14px; text-align: left; cursor: pointer;
        background: radial-gradient(120% 140% at 85% 20%, #3a1d33 0%, #1c0f1a 55%, #120910 100%); color: #f3ebe6; }
    .occasion-tile:hover { border-color: rgba(255, 177, 59, 0.7); }
    .occasion-tile:focus-visible { outline: 2px solid #ffd27a; outline-offset: 2px; }
    .occasion-tile-text { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
    .occasion-tile-title { font-weight: 800; font-size: 1.12rem; letter-spacing: 0.01em; }
    .occasion-tile-sub { font-size: 0.86rem; color: #d9c7c0; }
    .occasion-tile-go { margin-top: 4px; font-weight: 700; font-size: 0.9rem; color: #ffb13b; }
    .occasion-tile-art { flex: none; width: 176px; height: 110px; margin: -14px -2px -16px auto; }
    @media (max-width: 380px) { .occasion-tile-art { width: 140px; margin-left: -12px; } }
    /* Above the occasion's events: what it is, and back to the day */
    .occasion-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin: 12px 0 2px; }
    .occasion-head-intro { margin: 0; flex: 1 1 260px; font-size: 0.9rem; color: var(--text-2); }
    .occasion-head-close { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid rgba(var(--fg-rgb), 0.15);
        border-radius: 999px; background: var(--raised-3); color: var(--text); font-size: 0.85rem; font-weight: 600; cursor: pointer; }
    .occasion-head-close:hover { border-color: rgba(var(--accent-rgb), 0.55); }
    .foryou-hint { font-size: 0.75rem; color: var(--text-2); }
    .foryou-reason { font-size: 0.72rem; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .foryou-reason .bi-heart-fill { color: #f472b6; font-size: 0.65rem; }

    /* Discover: an ongoing offer in the stack says so */
    .event-time-badge.is-ongoing {
        background: rgba(52, 211, 153, 0.14);
        color: var(--green-3);
        border-color: rgba(52, 211, 153, 0.3);
    }

    .event-time-badge.is-ongoing.ends-soon { background: var(--amber); color: #1a1405; border-color: transparent; }

/* ── Pages for search engines (formerly SeoStyles) ── */
    .seo-page { max-width: 960px; padding-bottom: 32px; }

    .seo-header {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-top: 12px;
    }

    .seo-brand {
        display: flex !important;
        align-items: center;
        gap: 10px;
        font-size: 1.3rem !important;
        font-weight: 800;
        text-transform: none !important;
        letter-spacing: -0.2px !important;
        color: var(--text) !important;
        opacity: 1 !important;
        text-decoration: none;
    }

    .seo-brand .header-logo { display: block; width: 32px; height: 32px; border-radius: 9px; }

    .seo-app-btn { text-decoration: none; }
    .seo-app-btn:hover { color: var(--text); }

    .seo-breadcrumbs {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin: 4px 4px 14px;
        font-size: 0.8rem;
        color: var(--muted);
    }

    .seo-breadcrumbs a { color: var(--link-2); text-decoration: none; }

    .seo-main h1 {
        font-size: 1.7rem;
        font-weight: 800;
        letter-spacing: -0.4px;
        color: var(--text);
        margin: 6px 4px 6px;
    }

    .seo-main h2 {
        font-size: 1.1rem;
        font-weight: 700;
        color: var(--text);
        margin: 26px 4px 10px;
    }

    .seo-main h2 a { color: inherit; text-decoration: none; }
    /* Links in the text: the site's link colour, not Bootstrap's dark blue (too little contrast on dark) */
    .seo-main p a, .seo-main li a:not([class]) { color: var(--link); }

    .seo-intro { color: var(--text-3); margin: 0 4px 14px; max-width: 70ch; }

    .seo-pager { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 4px 8px; }

    .seo-pager a, .seo-chip {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 7px 14px;
        border-radius: 999px;
        border: 1px solid rgba(var(--fg-rgb), 0.1);
        background: rgba(var(--fg-rgb), 0.04);
        color: var(--text-2);
        font-size: 0.85rem;
        font-weight: 600;
        text-decoration: none;
    }

    .seo-pager a:hover, .seo-chip:hover { border-color: rgba(var(--accent-rgb), 0.5); color: var(--accent); }

    .seo-events { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }

    .seo-event {
        display: grid;
        grid-template-columns: 92px 1fr auto;
        gap: 14px;
        align-items: start;
        padding: 12px 14px;
        background: var(--surface);
        border: 1px solid rgba(var(--fg-rgb), 0.06);
        border-radius: 12px;
    }

    .seo-event-time { display: flex; flex-direction: column; gap: 2px; color: var(--accent); font-weight: 700; font-size: 0.85rem; }
    .seo-event-date { color: var(--pink-2); text-decoration: none; font-size: 0.8rem; }

    .seo-event-title { font-size: 1rem; font-weight: 700; margin: 0 0 4px; line-height: 1.3; }
    .seo-event-title a { color: var(--text); text-decoration: none; }
    .seo-event-title a:hover { color: var(--accent); }

    .seo-event-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); font-size: 0.82rem; }
    .seo-event-meta a { color: var(--link-2); text-decoration: none; }

    .seo-event-cats { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }

    /* Cinema: one tile per film (SeoFilmGrid) */
    .seo-films { list-style: none; padding: 0; margin: 0 0 8px; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
    .seo-film-link { display: flex; flex-direction: column; gap: 4px; height: 100%; padding-bottom: 10px; border-radius: 14px; background: var(--surface-2); color: var(--text); text-decoration: none; overflow: hidden; }
    .seo-film-link:hover .seo-film-name { color: var(--accent); }
    .seo-film-img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; background: var(--surface-3); }
    .seo-film-img.no-img { display: flex; align-items: center; justify-content: center; font-size: 2rem; color: var(--muted); }
    .seo-film-name { padding: 4px 10px 0; font-weight: 700; line-height: 1.3; hyphens: auto; overflow-wrap: anywhere; }
    .seo-film-next { padding: 0 10px; color: var(--accent); font-size: 0.85rem; font-weight: 600; }
    .seo-film-meta { padding: 0 10px; color: var(--muted); font-size: 0.8rem; }
    .seo-event-cats .badge { text-decoration: none; font-weight: 600; }

    .seo-event-img { width: 96px; height: 72px; object-fit: cover; border-radius: 8px; background: var(--surface-2); }

    .seo-empty { color: var(--muted); margin: 16px 4px; }

    /* Past event: what is coming instead */
    .seo-over { margin: 12px 0; padding: 10px 14px; border-radius: 10px; border: 1px solid rgba(var(--accent-rgb), 0.35); background: var(--surface-2); }

    /* English site: the organiser's German text says what language it is */
    .detail-text-lang { margin: 0 0 4px; font-size: 0.78rem; color: var(--muted); }

    /* First visit: a tip at the bottom (above the phone tab bar), closed for good with the cross */
    .first-tip { position: fixed; left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 1040; display: flex; align-items: center; gap: 10px;
        max-width: 560px; margin: 0 auto; padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(var(--accent-rgb), 0.4);
        background: var(--raised-3); color: var(--text); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35); font-size: 0.9rem; }
    .first-tip[hidden] { display: none; }
    .first-tip-text { flex: 1 1 auto; }
    /* 44 px to tap (WCAG), still looks like the 32 px circle */
    .first-tip-close { flex: none; width: 44px; height: 44px; margin: -6px; border: 0; border-radius: 50%; background: radial-gradient(circle, rgba(var(--fg-rgb), 0.08) 15.5px, transparent 16px); color: var(--text); }
    @media (min-width: 992px) { .first-tip { bottom: 24px; } }

    /* Event page: the rest of the day, big, for visitors who came from Google to one event */
    .seo-day-cta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; margin: 24px 0 8px; padding: 18px 20px; border-radius: 14px;
        border: 1px solid rgba(var(--accent-rgb), 0.35); background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.18), rgba(var(--fg-rgb), 0.03));
        color: var(--text); text-decoration: none; }
    .seo-day-cta:hover { border-color: rgba(var(--accent-rgb), 0.6); }
    .seo-day-cta-label { flex: 1 1 100%; font-size: 0.85rem; color: var(--text-2); }
    .seo-day-cta-count { font-size: 1.5rem; font-weight: 800; }
    .seo-day-cta-go { margin-left: auto; font-weight: 700; color: var(--accent); }

    /* Event page */
    .seo-detail { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
    .seo-detail.no-img { grid-template-columns: 1fr; max-width: 760px; }
    .seo-detail-img { width: 100%; height: auto; border-radius: 14px; background: var(--surface-2); }
    .seo-facts { list-style: none; padding: 0; margin: 10px 4px 16px; display: flex; flex-direction: column; gap: 6px; color: var(--text-2); }
    .seo-facts i { color: var(--accent); margin-right: 8px; }
    .seo-facts a { color: var(--link-2); }
    .seo-description { color: var(--text-2); white-space: pre-line; margin: 0 4px 18px; line-height: 1.6; }
    .seo-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 4px 10px; }

    /* Start page below the app: what the site is and the next events (for search engines, quiet for people) */
    .seo-home { margin: 40px 0 0; padding: 22px 18px 0; border-top: 1px solid rgba(var(--fg-rgb), 0.06); }
    .seo-home h1 { font-size: 1.2rem; }
    .seo-home .seo-intro { font-size: 0.9rem; }
    .seo-home-next { list-style: none; padding: 0; margin: 0 4px 14px; display: flex; flex-direction: column; gap: 4px; font-size: 0.88rem; }
    .seo-home-time { display: inline-block; min-width: 4.6em; color: var(--muted); font-variant-numeric: tabular-nums; }
    .seo-home-next a { color: var(--link); text-decoration: none; }
    .seo-home-place { color: var(--muted); }
    .seo-home-place::before { content: "· "; }
    .seo-home + .seo-links { margin-top: 14px; }
    .seo-home h2 { font-size: 1rem; margin: 18px 0 8px; }
    .seo-home-tip { display: grid; grid-template-columns: 4.6em 1fr; gap: 0 6px; }
    .seo-home-tip a { display: block; }
    .seo-home-tip .seo-home-place { display: block; font-size: 0.8rem; }
    .seo-home-tip .seo-home-place::before { content: none; }
    .seo-home-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; }
    .seo-home-chips a { padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(var(--fg-rgb), 0.12); color: var(--link); text-decoration: none; font-size: 0.85rem; }
    .seo-home-chips a:hover { background: rgba(var(--fg-rgb), 0.05); }
    .seo-home-faq h3 { font-size: 0.92rem; margin: 12px 0 2px; }
    .seo-home-faq p { font-size: 0.88rem; margin: 0; color: var(--muted); }
    .seo-home-faq a { color: var(--link); }

    /* Link block (also below the app on the start page) */
    .seo-links {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 18px 28px;
        margin: 40px 0 0;
        padding: 22px 18px;
        border-top: 1px solid rgba(var(--fg-rgb), 0.06);
        font-size: 0.82rem;
    }

    .seo-links-group { display: flex; flex-wrap: wrap; gap: 6px 14px; align-content: flex-start; }
    .seo-links-title { flex-basis: 100%; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.68rem; }
    .seo-links a { color: var(--text-3); text-decoration: none; }
    .seo-links a:hover { color: var(--accent); }
    .seo-links-legal { grid-column: 1 / -1; color: var(--muted); }

    @media (max-width: 640px) {
        .seo-main h1 { font-size: 1.35rem; }
        .seo-event { grid-template-columns: 72px 1fr; }
        .seo-event-img { display: none; }
        .seo-detail { grid-template-columns: 1fr; }
        .seo-app-btn span { display: none; }
        .seo-links { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
    }

/* "Bewegung reduzieren" in the system settings: no animations, no gliding (site.js jumps as well) */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
