﻿:root {
            --primary: #157c62;
            --primary-dark: #0f5b47;
            --secondary: #339a80;
            --accent: #d4af37;
            --accent-strong: #fcc22f;
            --text: #2f3d37;
            --muted: #64736c;
            --surface: rgba(255, 255, 255, 0.94);
            --border: rgba(21, 124, 98, 0.14);
            --shadow: 0 22px 40px rgba(26, 37, 46, 0.14);
            --shadow-soft: 0 14px 28px rgba(21, 124, 98, 0.1);
            --danger: #d95d47;
            --danger-soft: rgba(217, 93, 71, 0.12);
            --radius-xl: 18px;
            --radius-lg: 14px;
            --radius-md: 10px;
            --radius-sm: 8px;
            --radius-pill: 12px;
        }

        * {
            box-sizing: border-box;
        }

        [hidden] {
            display: none !important;
        }

        .sr-only {
            position: absolute;
            width: 1px;
            height: 1px;
            padding: 0;
            margin: -1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            white-space: nowrap;
            border: 0;
        }

        html {
            scroll-behavior: smooth;
        }

        body {
            margin: 0;
            min-height: 100vh;
            font-family: "Inter", sans-serif;
            color: var(--text);
            background:
                radial-gradient(circle at top left, rgba(51, 154, 128, 0.12), transparent 28%),
                radial-gradient(circle at top right, rgba(212, 175, 55, 0.12), transparent 24%),
                linear-gradient(180deg, #f7fbf9 0%, #e4e7ec 58%, #edf2f0 100%);
        }

        .page-shell {
            width: 100%;
            min-height: 100vh;
            margin: 0;
            padding: 12px;
        }

        .calendar-section {
            position: relative;
            overflow: hidden;
            min-height: calc(100vh - 24px);
            border-radius: 30px;
            border: 0;
            background:
                linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.96)),
                linear-gradient(135deg, rgba(21, 124, 98, 0.08), rgba(245, 245, 255, 0.92));
            box-shadow: var(--shadow);
            display: grid;
            grid-template-rows: auto auto 1fr;
        }

        .calendar-section::before {
            content: "";
            position: absolute;
            inset: 0 0 auto;
            height: 210px;
            background:
                radial-gradient(circle at top left, rgba(51, 154, 128, 0.18), transparent 36%),
                linear-gradient(135deg, rgba(21, 124, 98, 0.08), rgba(212, 175, 55, 0.08));
            pointer-events: none;
        }

        .section-head {
            position: relative;
            z-index: 1;
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 24px;
            padding: 34px 34px 24px;
        }

        .section-copy {
            max-width: 760px;
        }

        .access-filters-list {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin-top: 0;
        }

        .access-filters-wrap {
            display: grid;
            gap: 10px;
            padding-top: 8px;
            border-top: 1px dashed rgba(21, 124, 98, 0.2);
        }

        .access-filter-chip {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-height: 38px;
            padding: 0 16px;
            border-radius: var(--radius-pill);
            border: 1px solid var(--access-color, var(--primary));
            background: rgba(255, 255, 255, 0.94);
            color: var(--access-color, var(--primary-dark));
            font: inherit;
            font-size: 0.92rem;
            font-weight: 800;
            white-space: nowrap;
            cursor: pointer;
            transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
        }

        .access-filter-chip--free {
            --access-color: #12a594;
        }

        .access-filter-chip--paid {
            --access-color: #d18b13;
        }

        .access-filter-chip:hover {
            transform: translateY(-2px);
        }

        .access-filter-chip.active {
            background: var(--access-color);
            color: #ffffff;
            box-shadow: 0 12px 22px rgba(26, 37, 46, 0.14);
        }

        h1 {
            margin: 0;
            font-family: "Poppins", sans-serif;
            font-size: clamp(2.15rem, 3.2vw, 3.55rem);
            line-height: 1.08;
            color: var(--primary-dark);
        }

        .section-copy p {
            margin: 16px 0 0;
            max-width: 650px;
            color: var(--muted);
            font-size: 1.05rem;
            line-height: 1.75;
        }

        .category-filters-panel {
            position: relative;
            z-index: 1;
            display: grid;
            gap: 16px;
            padding: 0 34px 28px;
        }

        .category-filters-title {
            margin: 0;
            font-family: "Poppins", sans-serif;
            font-size: clamp(1.2rem, 1.9vw, 1.75rem);
            color: var(--primary-dark);
        }

        .category-filters-list,
        .category-picker-list {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
        }

        .category-filter-chip,
        .category-picker-pill {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-height: 42px;
            padding: 0 18px;
            border-radius: 999px;
            border: 1px solid var(--category-color, var(--primary));
            background: rgba(255, 255, 255, 0.94);
            color: var(--category-color, var(--primary-dark));
            font: inherit;
            font-size: 0.95rem;
            font-weight: 700;
            line-height: 1.1;
            white-space: nowrap;
            transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
        }

        .category-filter-chip {
            cursor: pointer;
        }

        .category-filter-chip:hover,
        .category-picker-pill:hover {
            transform: translateY(-2px);
        }

        .category-filter-chip.active,
        .category-picker-input:checked + .category-picker-pill {
            background: var(--category-color, var(--primary));
            color: #ffffff;
            box-shadow: 0 12px 22px rgba(26, 37, 46, 0.14);
        }

        .topbar {
            display: grid;
            gap: 12px;
            justify-items: end;
        }

        .topbar-meta {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
            justify-content: flex-end;
        }

        .status-badge,
        .mode-banner {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            padding: 10px 16px;
            border-radius: var(--radius-pill);
            font-size: 0.92rem;
            font-weight: 600;
        }

        .status-badge {
            background: rgba(255, 255, 255, 0.8);
            border: 1px solid rgba(21, 124, 98, 0.12);
            box-shadow: 0 10px 18px rgba(21, 124, 98, 0.08);
            color: var(--primary-dark);
        }

        .theme-toggle {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 38px;
            height: 34px;
            padding: 0;
            border: 1px solid rgba(21, 124, 98, 0.12);
            border-radius: var(--radius-pill);
            background: rgba(255, 255, 255, 0.8);
            color: var(--primary-dark);
            box-shadow: 0 10px 18px rgba(21, 124, 98, 0.08);
            font: inherit;
            cursor: pointer;
            transition: transform 0.2s ease, filter 0.2s ease;
        }

        .theme-toggle:hover {
            transform: translateY(-2px);
            filter: brightness(1.04);
        }

        .theme-toggle-icon {
            display: inline-block;
            width: 18px;
            height: 18px;
            border-radius: 999px;
            border: 2px solid currentColor;
            background: linear-gradient(to right, transparent 0 50%, currentColor 50% 100%);
            box-shadow: none;
        }

        .status-badge::before,
        .mode-banner::before {
            content: "";
            width: 10px;
            height: 10px;
            border-radius: 999px;
            background: var(--secondary);
        }

        .auth-panel {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
            justify-content: flex-end;
        }

        .action-button,
        .ghost-button,
        .danger-button,
        .mini-button {
            border: 0;
            cursor: pointer;
            font: inherit;
            transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
        }

        .action-button,
        .ghost-button,
        .danger-button {
            min-height: 46px;
            padding: 0 18px;
            border-radius: var(--radius-pill);
            font-weight: 700;
        }

        .action-button {
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            color: #ffffff;
            box-shadow: 0 16px 30px rgba(21, 124, 98, 0.24);
        }

        .action-button:hover,
        .ghost-button:hover,
        .danger-button:hover,
        .mini-button:hover,
        .nav-button:hover,
        .day-cell:hover,
        .event-chip:hover,
        .event-card-button:hover {
            transform: translateY(-2px);
        }

        .action-button:disabled,
        .ghost-button:disabled,
        .danger-button:disabled,
        .mini-button:disabled,
        .nav-button:disabled,
        .event-card-button:disabled {
            cursor: wait;
            opacity: 0.72;
            transform: none;
            box-shadow: none;
        }

        .ghost-button {
            background: rgba(21, 124, 98, 0.08);
            color: var(--primary-dark);
            border: 1px solid rgba(21, 124, 98, 0.14);
        }

        .danger-button {
            background: var(--danger-soft);
            color: var(--danger);
            border: 1px solid rgba(217, 93, 71, 0.18);
        }

        .mini-button {
            min-height: 34px;
            padding: 0 12px;
            border-radius: var(--radius-pill);
            background: rgba(255, 255, 255, 0.86);
            color: var(--primary-dark);
            border: 1px solid rgba(21, 124, 98, 0.12);
            font-size: 0.86rem;
            font-weight: 700;
        }

        .admin-pill {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            min-height: 46px;
            padding: 0 16px;
            border-radius: var(--radius-pill);
            background: rgba(255, 255, 255, 0.88);
            border: 1px solid rgba(21, 124, 98, 0.12);
            color: var(--primary-dark);
            box-shadow: 0 12px 24px rgba(21, 124, 98, 0.08);
            font-weight: 700;
        }

        .admin-pill::before {
            content: "A";
            display: inline-grid;
            place-items: center;
            width: 28px;
            height: 28px;
            border-radius: var(--radius-sm);
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            color: #ffffff;
            font-size: 0.85rem;
        }

        body.theme-dark {
            --text: #edf4f0;
            --muted: #aebbb5;
            --primary-dark: #d7efe7;
            background:
                radial-gradient(circle at top left, rgba(51, 154, 128, 0.14), transparent 28%),
                radial-gradient(circle at top right, rgba(212, 175, 55, 0.1), transparent 24%),
                linear-gradient(180deg, #07100e 0%, #101917 58%, #17221f 100%);
        }

        body.theme-dark .calendar-section {
            border-color: rgba(106, 168, 147, 0.16);
            background:
                linear-gradient(180deg, rgba(15, 23, 20, 0.9), rgba(11, 17, 15, 0.96)),
                linear-gradient(135deg, rgba(21, 124, 98, 0.12), rgba(21, 32, 28, 0.95));
            box-shadow: 0 24px 42px rgba(0, 0, 0, 0.28);
        }

        body.theme-dark .calendar-section::before {
            background:
                radial-gradient(circle at top left, rgba(51, 154, 128, 0.16), transparent 36%),
                linear-gradient(135deg, rgba(21, 124, 98, 0.12), rgba(212, 175, 55, 0.06));
        }

        body.theme-dark .status-badge,
        body.theme-dark .theme-toggle,
        body.theme-dark .admin-pill,
        body.theme-dark .calendar-card,
        body.theme-dark .sidebar-card,
        body.theme-dark .sidebar-block,
        body.theme-dark .day-cell,
        body.theme-dark .modal,
        body.theme-dark .field input,
        body.theme-dark .field textarea,
        body.theme-dark .event-card,
        body.theme-dark .sidebar-empty {
            background: rgba(17, 25, 22, 0.92);
            color: var(--text);
            border-color: rgba(126, 170, 154, 0.18);
            box-shadow: 0 16px 28px rgba(0, 0, 0, 0.18);
        }

        body.theme-dark .calendar-card,
        body.theme-dark .sidebar-card,
        body.theme-dark .sidebar-block,
        body.theme-dark .modal {
            background: linear-gradient(180deg, rgba(17, 25, 22, 0.96), rgba(12, 18, 16, 0.94));
        }

        body.theme-dark .day-cell {
            background: linear-gradient(180deg, rgba(20, 28, 25, 0.96), rgba(14, 20, 18, 0.92));
        }

        body.theme-dark .day-cell.past {
            background: linear-gradient(180deg, rgba(16, 22, 20, 0.98), rgba(11, 16, 14, 0.94));
        }

        body.theme-dark .day-cell.past.has-events,
        body.theme-dark .day-cell.past.outside {
            background: linear-gradient(180deg, rgba(12, 17, 15, 0.98), rgba(8, 12, 10, 0.95));
        }

        body.theme-dark .day-cell.past .day-number {
            color: rgba(174, 187, 181, 0.46);
        }

        body.theme-dark .day-cell.past .event-chip {
            opacity: 0.5;
            filter: grayscale(0.72);
        }

        body.theme-dark .day-cell.today,
        body.theme-dark .day-cell.today.has-events {
            background:
                linear-gradient(180deg, rgba(68, 55, 20, 0.72), rgba(42, 34, 15, 0.48)),
                linear-gradient(135deg, rgba(212, 175, 55, 0.18), rgba(20, 28, 25, 0.92));
            border-color: rgba(212, 175, 55, 0.48);
        }

        body.theme-dark h1,
        body.theme-dark .month-title,
        body.theme-dark .sidebar-title,
        body.theme-dark .selected-date,
        body.theme-dark .event-card-title,
        body.theme-dark .day-number {
            color: #edf4f0;
        }

        body.theme-dark .section-copy p,
        body.theme-dark .toolbar-note,
        body.theme-dark .sidebar-text,
        body.theme-dark .event-card p,
        body.theme-dark .event-chip-time,
        body.theme-dark .sidebar-empty,
        body.theme-dark .weekday {
            color: #aebbb5;
        }

        body.theme-dark .category-filter-chip,
        body.theme-dark .access-filter-chip,
        body.theme-dark .category-picker-pill,
        body.theme-dark .display-style-pill,
        body.theme-dark .access-type-pill {
            background: rgba(255, 255, 255, 0.03);
        }

        body.theme-dark .category-filter-chip.active,
        body.theme-dark .access-filter-chip.active,
        body.theme-dark .category-picker-input:checked + .category-picker-pill,
        body.theme-dark .display-style-input:checked + .display-style-pill,
        body.theme-dark .access-type-input:checked + .access-type-pill {
            color: #ffffff;
            box-shadow: 0 16px 26px rgba(0, 0, 0, 0.24);
        }

        body.theme-dark .theme-toggle {
            background: rgba(17, 25, 22, 0.92);
            color: var(--text);
            box-shadow: 0 16px 28px rgba(0, 0, 0, 0.18);
        }

        body.theme-dark .theme-toggle-icon {
            background: linear-gradient(to right, transparent 0 50%, currentColor 50% 100%);
            border-color: currentColor;
            box-shadow: none;
        }

        body.theme-dark .ghost-button,
        body.theme-dark .mini-button,
        body.theme-dark .event-card-button {
            background: rgba(255, 255, 255, 0.06);
            color: #edf4f0;
            border-color: rgba(255, 255, 255, 0.08);
        }

        body.theme-dark .mode-banner {
            background: rgba(51, 154, 128, 0.16);
            color: #e7f5ef;
        }

        body.theme-dark .event-chip {
            background: linear-gradient(180deg, rgba(var(--event-color-rgb, 21, 124, 98), 0.24), rgba(17, 25, 22, 0.92));
            color: #edf4f0;
            border-color: rgba(var(--event-color-rgb, 21, 124, 98), 0.34);
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
        }

        body.theme-dark .event-chip--paid,
        body.theme-dark .event-chip--free {
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 0 0 1px rgba(var(--access-flag-rgb), 0.22);
        }

        body.theme-dark .event-chip-time {
            color: rgba(237, 244, 240, 0.76);
        }

        body.theme-dark .event-chip--bar {
            background: var(--event-color, var(--primary));
            color: #ffffff;
        }

        body.theme-dark .event-chip--dot {
            background: transparent;
            color: #edf4f0;
        }

        body.theme-dark .event-category-badge {
            background: rgba(var(--category-color-rgb, 21, 124, 98), 0.18);
            border-color: rgba(var(--category-color-rgb, 21, 124, 98), 0.32);
            color: #f3f9f6;
        }

        body.theme-dark .event-category-more {
            background: rgba(255, 255, 255, 0.06);
            border-color: rgba(var(--event-color-rgb, 21, 124, 98), 0.28);
            color: #dce9e3;
        }

        body.theme-dark .event-access-badge {
            color: #edf4f0;
        }

        body.theme-dark .event-access-badge--free {
            background: rgba(18, 165, 148, 0.2);
            border-color: rgba(18, 165, 148, 0.32);
        }

        body.theme-dark .event-access-badge--paid {
            background: rgba(209, 139, 19, 0.22);
            border-color: rgba(209, 139, 19, 0.36);
        }

        body.theme-dark .event-more {
            background: transparent;
            border-color: transparent;
            color: #edf4f0;
        }

        body.theme-dark .event-more--paid,
        body.theme-dark .event-more--free,
        body.theme-dark .event-more--mixed-access {
            border-color: transparent;
        }

        body.theme-dark .event-more--paid {
            background: transparent;
            border-color: transparent;
        }

        body.theme-dark .event-more--free {
            background: transparent;
            border-color: transparent;
        }

        body.theme-dark .event-more--mixed-access {
            background: transparent;
            border-color: transparent;
        }

        body.theme-dark .event-card {
            background: linear-gradient(180deg, rgba(var(--event-color-rgb, 21, 124, 98), 0.18), rgba(17, 25, 22, 0.94));
            border-color: rgba(var(--event-color-rgb, 21, 124, 98), 0.28);
            box-shadow: 0 18px 30px rgba(0, 0, 0, 0.18);
        }

        body.theme-dark .event-card-title {
            color: #edf4f0;
        }

        body.theme-dark .event-card-time {
            background: rgba(var(--event-color-rgb, 21, 124, 98), 0.22);
            border-color: rgba(var(--event-color-rgb, 21, 124, 98), 0.26);
            color: #edf4f0;
        }

        body.theme-dark .day-tag--count {
            background: rgba(var(--day-tag-color-rgb, 21, 124, 98), 0.22);
            border-color: rgba(var(--day-tag-color-rgb, 21, 124, 98), 0.3);
            color: #edf4f0;
        }

        body.theme-dark .day-tag--paid {
            border-color: rgba(209, 139, 19, 0.82);
            box-shadow: none;
        }

        body.theme-dark .day-tag--free {
            border-color: rgba(18, 165, 148, 0.78);
            box-shadow: none;
        }

        body.theme-dark .day-tag--mixed-access {
            background:
                linear-gradient(rgba(var(--day-tag-color-rgb, 21, 124, 98), 0.22), rgba(var(--day-tag-color-rgb, 21, 124, 98), 0.22)) padding-box,
                linear-gradient(90deg, #12a594 0 50%, #d18b13 50% 100%) border-box;
            box-shadow: none;
        }

        body.theme-dark .day-preview {
            background: linear-gradient(180deg, rgba(17, 25, 22, 0.96), rgba(12, 18, 16, 0.94));
            border-color: rgba(126, 170, 154, 0.22);
            box-shadow: 0 20px 36px rgba(0, 0, 0, 0.26);
        }

        body.theme-dark .day-preview-date,
        body.theme-dark .day-preview-title {
            color: #edf4f0;
        }

        body.theme-dark .day-preview-count,
        body.theme-dark .day-preview-more {
            color: #aebbb5;
        }

        body.theme-dark .day-preview-item {
            background: linear-gradient(180deg, rgba(var(--event-color-rgb, 21, 124, 98), 0.22), rgba(17, 25, 22, 0.92));
            border-color: rgba(var(--event-color-rgb, 21, 124, 98), 0.3);
        }

        body.theme-dark .day-preview-item--paid,
        body.theme-dark .day-preview-item--free {
            box-shadow: 0 0 0 1px rgba(var(--access-flag-rgb), 0.18);
        }

        body.theme-dark .day-preview-time {
            color: #edf4f0;
        }

        body.theme-dark .event-image-preview {
            background: rgba(255, 255, 255, 0.05);
            border-color: rgba(255, 255, 255, 0.1);
        }

        body.theme-dark .image-viewer-figure {
            background: rgba(255, 255, 255, 0.04);
            border-color: rgba(255, 255, 255, 0.1);
        }

        .content-grid {
            position: relative;
            z-index: 1;
            display: grid;
            grid-template-columns: minmax(0, 1fr);
            gap: 24px;
            padding: 0 34px 34px;
            min-height: 100%;
            align-items: stretch;
        }

        .calendar-card,
        .sidebar-card {
            border-radius: 24px;
            border: 1px solid rgba(21, 124, 98, 0.1);
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(247, 250, 249, 0.94));
            box-shadow: 0 22px 38px rgba(21, 124, 98, 0.08);
            backdrop-filter: blur(10px);
        }

        .calendar-card {
            overflow: hidden;
            min-height: 100%;
            display: flex;
            flex-direction: column;
        }

        .calendar-toolbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 18px;
            padding: 24px 24px 18px;
        }

        .toolbar-left {
            display: flex;
            align-items: center;
            gap: 12px;
            flex-wrap: wrap;
        }

        .nav-button {
            width: 44px;
            height: 44px;
            border: 0;
            border-radius: var(--radius-md);
            background: rgba(21, 124, 98, 0.08);
            color: var(--primary-dark);
            font-size: 1.1rem;
            font-weight: 800;
            cursor: pointer;
            transition: transform 0.2s ease, background-color 0.2s ease;
        }

        .month-title {
            margin: 0;
            font-family: "Poppins", sans-serif;
            font-size: clamp(1.3rem, 2vw, 1.8rem);
            color: var(--primary-dark);
            text-transform: capitalize;
        }

        .toolbar-note {
            margin: 4px 0 0;
            color: var(--muted);
            font-size: 0.92rem;
        }

        .calendar-grid {
            display: grid;
            grid-template-columns: repeat(7, minmax(0, 1fr));
            gap: 0;
            padding: 0 24px 24px;
            border-top: 1px solid rgba(21, 124, 98, 0.12);
            border-left: 1px solid rgba(21, 124, 98, 0.12);
        }

        .weekday {
            padding: 8px 4px;
            border-right: 1px solid rgba(21, 124, 98, 0.12);
            border-bottom: 1px solid rgba(21, 124, 98, 0.12);
            color: var(--muted);
            font-size: 0.78rem;
            font-weight: 800;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            text-align: center;
        }

        .day-cell {
            position: relative;
            min-height: 150px;
            padding: 8px 4px 8px 6px;
            border-radius: 0;
            border: 0;
            border-right: 1px solid rgba(21, 124, 98, 0.12);
            border-bottom: 1px solid rgba(21, 124, 98, 0.12);
            background: rgba(255, 255, 255, 0.94);
            display: flex;
            flex-direction: column;
            gap: 5px;
            cursor: pointer;
            transition: background-color 0.2s ease, box-shadow 0.2s ease;
        }

        .day-cell:focus-visible,
        .action-button:focus-visible,
        .ghost-button:focus-visible,
        .danger-button:focus-visible,
        .mini-button:focus-visible,
        .nav-button:focus-visible,
        .category-filter-chip:focus-visible,
        .event-chip:focus-visible,
        .event-card-button:focus-visible,
        input:focus-visible,
        textarea:focus-visible {
            outline: 3px solid rgba(51, 154, 128, 0.18);
            outline-offset: 2px;
        }

        .day-cell.selected {
            box-shadow: inset 0 0 0 2px rgba(21, 124, 98, 0.45);
        }

        .day-cell.today {
            background:
                linear-gradient(180deg, rgba(255, 245, 190, 0.96), rgba(255, 250, 220, 0.98)),
                rgba(212, 175, 55, 0.12);
            border-color: rgba(212, 175, 55, 0.45);
        }

        .day-cell.past {
            background: rgba(219, 226, 223, 0.92);
        }

        .day-cell.outside {
            opacity: 0.58;
        }

        .day-cell.has-events {
            background: rgba(255, 255, 255, 0.98);
        }

        .day-cell.today.has-events {
            background:
                linear-gradient(180deg, rgba(255, 245, 190, 0.96), rgba(255, 250, 220, 0.98)),
                rgba(212, 175, 55, 0.12);
            border-color: rgba(212, 175, 55, 0.45);
        }

        .day-cell.past.has-events,
        .day-cell.past.outside {
            background: rgba(213, 222, 218, 0.94);
        }

        .day-cell.past .day-number {
            color: rgba(47, 61, 55, 0.5);
        }

        .day-cell.past .event-chip {
            opacity: 0.48;
            filter: grayscale(0.72);
        }

        .day-cell.past .event-chip--bar {
            background: rgba(var(--event-color-rgb, 21, 124, 98), 0.42);
        }

        .day-cell.past .event-chip-dot {
            opacity: 0.72;
        }

        .day-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 6px;
            min-height: 18px;
        }

        .day-number {
            display: inline-flex;
            align-items: center;
            justify-content: flex-start;
            width: auto;
            height: auto;
            border-radius: 0;
            background: transparent;
            color: var(--primary-dark);
            font-weight: 800;
            font-size: 0.92rem;
            line-height: 1;
        }

        .day-cell.today .day-number {
            background: transparent;
            color: #80610a;
        }

        .day-tag {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            min-height: auto;
            padding: 0;
            border-radius: 0;
            background: transparent;
            color: var(--secondary);
            font-size: 0.74rem;
            font-weight: 700;
            line-height: 1.1;
        }

        .day-tag--count,
        .day-tag--new {
            min-width: 24px;
            min-height: 24px;
            padding: 0 8px;
            border-radius: 999px;
            justify-content: center;
        }

        .day-tag--count {
            position: relative;
            width: 24px;
            height: 24px;
            padding: 0;
            overflow: hidden;
            background: rgba(var(--day-tag-color-rgb, 21, 124, 98), 0.14);
            border: 1px solid rgba(var(--day-tag-color-rgb, 21, 124, 98), 0.2);
            color: var(--day-tag-color, var(--primary-dark));
        }

        .day-tag--paid,
        .day-tag--free,
        .day-tag--mixed-access {
            border-color: transparent;
            box-shadow: none;
        }

        .day-tag--paid {
            border-width: 2px;
            border-color: rgba(209, 139, 19, 0.82);
            box-shadow: none;
        }

        .day-tag--free {
            border-width: 2px;
            border-color: rgba(18, 165, 148, 0.78);
            box-shadow: none;
        }

        .day-tag--mixed-access {
            border-width: 2px;
            background:
                linear-gradient(rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.96)) padding-box,
                linear-gradient(90deg, #12a594 0 50%, #d18b13 50% 100%) border-box;
            background-clip: padding-box, border-box;
            box-shadow: none;
        }

        .day-tag--paid::after {
            content: none;
        }

        .day-tag--new {
            background: rgba(212, 175, 55, 0.16);
            color: #7b651b;
        }

        .day-tag.hidden {
            visibility: hidden;
        }

        .day-cell--dense {
            min-height: 122px;
            gap: 4px;
            padding: 7px 4px 7px 6px;
        }

        .day-cell--dense .day-head {
            align-items: flex-start;
            gap: 8px;
        }

        .day-cell--dense .day-number {
            font-size: 0.92rem;
        }

        .day-cell--dense .day-tag {
            font-size: 0.68rem;
        }

        .day-cell--dense .event-list {
            gap: 2px;
        }

        .day-cell--dense .event-chip {
            padding: 7px 8px 8px;
            gap: 4px;
        }

        .day-cell--dense .event-chip--paid,
        .day-cell--dense .event-chip--free {
            padding-right: 26px;
            padding-top: 8px;
        }

        .day-cell--dense .event-chip--paid::before,
        .day-cell--dense .event-chip--free::before {
            top: 50%;
            right: 5px;
            width: auto;
            height: auto;
            padding: 0;
            transform: translateY(-50%);
            font-size: 0.72rem;
        }

        .day-cell--dense .event-chip--paid::after,
        .day-cell--dense .event-chip--free::after {
            content: none;
        }

        .day-cell--dense .event-chip-title {
            font-size: 0.74rem;
            line-height: 1.24;
        }

        .day-cell--dense .event-chip-time {
            font-size: 0.66rem;
        }

        .day-cell--dense .event-more {
            font-size: 0.58rem;
        }

        .day-cell--compact {
            min-height: 78px;
            gap: 4px;
            padding: 6px 3px 6px 5px;
        }

        .day-cell--compact .day-head {
            flex-direction: column;
            justify-content: flex-start;
            align-items: flex-start;
            gap: 4px;
            width: 100%;
        }

        .day-cell--compact .day-number {
            font-size: 0.86rem;
        }

        .day-cell--compact .day-tag {
            display: inline-flex;
            width: 22px;
            min-width: 22px;
            height: 22px;
            min-height: 22px;
            padding: 0;
            font-size: 0.66rem;
            margin-top: 7px;
            align-self: center;
        }

        .day-cell--compact .day-tag {
            display: none;
        }

        .day-cell--compact .day-tag.hidden {
            display: none;
        }

        .day-cell--compact .event-list {
            display: grid;
            gap: 3px;
        }

        .day-cell--compact .event-more {
            font-size: 0.52rem;
        }

        .event-list {
            display: grid;
            gap: 2px;
            align-content: start;
        }

        .event-chip {
            position: relative;
            overflow: hidden;
            width: 100%;
            border: 1px solid rgba(var(--event-color-rgb, 21, 124, 98), 0.22);
            border-left: 4px solid var(--event-color, var(--primary));
            border-radius: var(--radius-sm);
            padding: 9px 10px 10px;
            text-align: left;
            background: linear-gradient(180deg, rgba(var(--event-color-rgb, 21, 124, 98), 0.14), rgba(255, 255, 255, 0.92));
            color: var(--primary-dark);
            cursor: pointer;
            transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
            display: grid;
            gap: 6px;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
        }

        .event-chip--paid,
        .event-chip--free {
            --access-flag-color: #12a594;
            --access-flag-rgb: 18, 165, 148;
            padding-right: 10px;
            padding-top: 9px;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 0 0 1px rgba(var(--access-flag-rgb), 0.18);
        }

        .event-chip--paid {
            --access-flag-color: #d18b13;
            --access-flag-rgb: 209, 139, 19;
        }

        .event-chip--paid::before,
        .event-chip--free::before {
            content: "💸";
            position: absolute;
            top: 4px;
            right: 5px;
            z-index: 1;
            display: inline-grid;
            place-items: center;
            width: auto;
            height: auto;
            padding: 0;
            background: transparent;
            border: 0;
            border-radius: 0;
            box-shadow: none;
            font-size: 0.78rem;
            line-height: 1;
            pointer-events: none;
        }

        .event-chip--paid::before {
            content: "💲";
        }

        .event-chip--free::before {
            content: none;
        }

        .event-chip--paid::after,
        .event-chip--free::after {
            content: none;
        }

        .event-card-button {
            width: 100%;
            border: 0;
            border-radius: var(--radius-sm);
            padding: 9px 10px;
            text-align: left;
            background: rgba(21, 124, 98, 0.1);
            color: var(--primary-dark);
            cursor: pointer;
            transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
        }

        .event-chip-title,
        .event-card-title {
            display: block;
            font-size: 0.84rem;
            line-height: 1.35;
            overflow-wrap: anywhere;
            word-break: break-word;
        }

        .event-chip-time {
            display: block;
            color: rgba(47, 61, 55, 0.78);
            font-size: 0.72rem;
            line-height: 1.3;
        }

        .event-chip--bar,
        .event-chip--dot {
            min-height: 20px;
            padding: 0;
            border-radius: 3px;
            border: 0;
            box-shadow: none;
        }

        .event-chip--bar {
            display: block;
            padding: 3px 5px;
            background: var(--event-color, var(--primary));
            color: #ffffff;
        }

        .event-chip--dot {
            display: grid;
            grid-template-columns: 7px minmax(0, 1fr);
            align-items: center;
            gap: 4px;
            background: transparent;
            color: var(--text);
        }

        .event-chip--bar.event-chip--paid,
        .event-chip--bar.event-chip--free,
        .event-chip--dot.event-chip--paid,
        .event-chip--dot.event-chip--free {
            padding-right: 28px;
            padding-top: 0;
            box-shadow: none;
        }

        .event-chip--bar.event-chip--paid::before,
        .event-chip--bar.event-chip--free::before,
        .event-chip--dot.event-chip--paid::before,
        .event-chip--dot.event-chip--free::before {
            top: 50%;
            right: 5px;
            width: auto;
            height: auto;
            transform: translateY(-50%);
            font-size: 0.72rem;
        }

        .event-chip-dot {
            width: 7px;
            height: 7px;
            border-radius: 999px;
            background: var(--event-color, var(--primary));
        }

        .event-chip-inline {
            display: flex;
            align-items: baseline;
            gap: 5px;
            min-width: 0;
        }

        .event-chip--bar .event-chip-title,
        .event-chip--dot .event-chip-title,
        .event-chip--dot .event-chip-time {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            word-break: normal;
            overflow-wrap: normal;
        }

        .event-chip--bar .event-chip-title {
            color: inherit;
            font-size: 0.78rem;
            line-height: 1.25;
        }

        .event-chip--dot .event-chip-title {
            display: inline;
            font-size: 0.78rem;
            font-weight: 700;
        }

        .event-chip--dot .event-chip-time {
            flex: 0 0 auto;
            color: inherit;
            font-size: 0.74rem;
        }

        .event-category-list {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
        }

        .event-chip .event-category-list {
            margin-top: 2px;
        }

        .event-category-list--compact {
            gap: 4px;
        }

        .event-category-badge,
        .event-category-more {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            min-height: 22px;
            max-width: 100%;
            padding: 0 8px;
            border-radius: 999px;
            border: 1px solid transparent;
            font-size: 0.68rem;
            font-weight: 700;
            line-height: 1;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .event-category-list--compact .event-category-badge,
        .event-category-list--compact .event-category-more {
            min-height: 18px;
            padding: 0 6px;
            font-size: 0.62rem;
        }

        .event-category-badge {
            background: rgba(var(--category-color-rgb, 21, 124, 98), 0.12);
            border-color: rgba(var(--category-color-rgb, 21, 124, 98), 0.22);
            color: var(--category-color, var(--primary-dark));
        }

        .event-category-badge::before {
            content: "";
            width: 8px;
            height: 8px;
            border-radius: 999px;
            background: var(--category-color, var(--primary));
            flex-shrink: 0;
        }

        .event-category-more {
            background: rgba(var(--event-color-rgb, 21, 124, 98), 0.08);
            border-style: dashed;
            border-color: rgba(var(--event-color-rgb, 21, 124, 98), 0.2);
            color: var(--primary-dark);
        }

        .event-access-badge {
            display: inline-flex;
            align-items: center;
            align-self: flex-start;
            min-height: 26px;
            margin-top: 12px;
            padding: 0 10px;
            border-radius: 999px;
            border: 1px solid transparent;
            font-size: 0.74rem;
            font-weight: 800;
            letter-spacing: -0.01em;
        }

        .event-access-badge--free {
            background: rgba(18, 165, 148, 0.12);
            border-color: rgba(18, 165, 148, 0.24);
            color: #0e776d;
        }

        .event-access-badge--paid {
            background: rgba(209, 139, 19, 0.14);
            border-color: rgba(209, 139, 19, 0.3);
            color: #9a640f;
        }

        .event-more {
            display: inline-flex;
            align-items: center;
            justify-content: flex-start;
            width: auto;
            min-width: auto;
            height: auto;
            min-height: auto;
            padding: 0;
            overflow: visible;
            border-radius: 0;
            border: 0;
            background: transparent;
            color: var(--event-color, var(--primary-dark));
            font-size: 0.66rem;
            font-weight: 800;
            line-height: 1;
            letter-spacing: 0;
            align-self: flex-start;
            margin-top: 1px;
        }

        .event-more--paid {
            background: transparent;
            border-color: transparent;
            color: #9a640f;
        }

        .event-more--free {
            background: transparent;
            border-color: transparent;
            color: #0e776d;
        }

        .event-more--mixed-access {
            background: transparent;
            border-color: transparent;
            color: var(--primary-dark);
        }

        .event-more--paid::after {
            content: none;
        }

        .sidebar-card {
            display: grid;
            gap: 18px;
            align-content: start;
            padding: 24px;
        }

        .mode-banner {
            justify-self: start;
            background: rgba(51, 154, 128, 0.1);
            color: var(--primary-dark);
        }

        .mode-banner.admin::before {
            background: var(--accent);
        }

        .sidebar-block {
            padding: 18px;
            border-radius: var(--radius-md);
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 245, 255, 0.84));
            border: 1px solid rgba(21, 124, 98, 0.08);
            min-width: 0;
        }

        .sidebar-title {
            margin: 0 0 6px;
            font-family: "Poppins", sans-serif;
            font-size: 1.12rem;
            color: var(--primary-dark);
        }

        .selected-date {
            margin: 0 0 14px;
            color: var(--muted);
            font-size: 0.9rem;
            line-height: 1.5;
            text-transform: capitalize;
        }

        .sidebar-text {
            margin: 0;
            color: var(--muted);
            font-size: 0.95rem;
            line-height: 1.7;
        }

        .events-stack {
            display: grid;
            gap: 12px;
            min-width: 0;
        }

        .admin-tools {
            display: grid;
            gap: 12px;
            margin-top: 14px;
        }

        .admin-tools--standalone {
            justify-items: start;
            margin-top: 0;
        }

        .event-card {
            position: relative;
            padding: 16px;
            border-radius: var(--radius-md);
            background: linear-gradient(180deg, rgba(var(--event-color-rgb, 21, 124, 98), 0.12), rgba(255, 255, 255, 0.94));
            border: 1px solid rgba(var(--event-color-rgb, 21, 124, 98), 0.16);
            min-width: 0;
            max-width: 100%;
            overflow: hidden;
            box-shadow: 0 12px 24px rgba(21, 124, 98, 0.06);
        }

        .event-card::before {
            content: "";
            position: absolute;
            inset: 0 auto 0 0;
            width: 4px;
            background: var(--event-color, var(--primary));
        }

        .event-card-head {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 12px;
            min-width: 0;
        }

        .event-card-title {
            margin: 0;
            font-family: "Poppins", sans-serif;
            font-size: 1rem;
            color: var(--primary-dark);
            min-width: 0;
            overflow-wrap: anywhere;
            word-break: break-word;
        }

        .event-card .event-category-list {
            margin-top: 12px;
        }

        .event-card-image-button {
            display: block;
            width: 100%;
            margin-top: 14px;
            padding: 0;
            border: 0;
            border-radius: var(--radius-md);
            background: transparent;
            cursor: zoom-in;
            overflow: hidden;
        }

        .event-card-image-button:focus-visible {
            outline: 3px solid rgba(51, 154, 128, 0.18);
            outline-offset: 3px;
        }

        .event-card-image {
            display: block;
            width: 100%;
            max-height: 320px;
            border-radius: var(--radius-md);
            object-fit: cover;
            border: 1px solid rgba(var(--event-color-rgb, 21, 124, 98), 0.16);
            box-shadow: 0 14px 26px rgba(16, 25, 33, 0.12);
            transition: transform 0.24s ease, filter 0.24s ease;
        }

        .event-card-image-button:hover .event-card-image {
            transform: scale(1.02);
            filter: saturate(1.05);
        }

        .event-card-time {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-height: 30px;
            padding: 0 10px;
            border-radius: var(--radius-sm);
            border: 1px solid rgba(var(--event-color-rgb, 21, 124, 98), 0.18);
            background: rgba(var(--event-color-rgb, 21, 124, 98), 0.16);
            color: var(--event-color, #755d12);
            font-size: 0.76rem;
            font-weight: 800;
            white-space: nowrap;
            flex-shrink: 0;
        }

        .event-card p {
            margin: 10px 0 0;
            color: var(--muted);
            line-height: 1.65;
            font-size: 0.92rem;
            max-width: 100%;
            overflow-wrap: anywhere;
            word-break: break-word;
            white-space: normal;
        }

        .event-card-actions {
            margin-top: 14px;
            display: flex;
            justify-content: flex-end;
        }

        .sidebar-empty {
            padding: 18px;
            border-radius: var(--radius-md);
            background: rgba(21, 124, 98, 0.05);
            border: 1px dashed rgba(21, 124, 98, 0.18);
            color: var(--muted);
            line-height: 1.7;
        }

        .modal-backdrop {
            position: fixed;
            inset: 0;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 20px;
            background: rgba(9, 34, 28, 0.54);
            backdrop-filter: blur(8px);
            z-index: 50;
        }

        .modal-backdrop.open {
            display: flex;
        }

        .modal {
            width: min(100%, 560px);
            max-height: calc(100vh - 40px);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            border-radius: var(--radius-lg);
            border: 1px solid rgba(21, 124, 98, 0.12);
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 245, 255, 0.96));
            box-shadow: 0 28px 56px rgba(16, 25, 33, 0.28);
        }

        .modal--day-details {
            width: min(100%, 720px);
        }

        .modal--image-viewer {
            width: min(100%, 1040px);
        }

        .modal-head {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 16px;
            padding: 24px 28px 18px;
            background: linear-gradient(135deg, rgba(21, 124, 98, 0.96), rgba(51, 154, 128, 0.88));
            color: #ffffff;
        }

        .modal-head h2 {
            margin: 0;
            font-family: "Poppins", sans-serif;
            font-size: 1.45rem;
        }

        .modal-head p {
            margin: 6px 0 0;
            color: rgba(255, 255, 255, 0.84);
            line-height: 1.6;
        }

        .close-button {
            width: 42px;
            height: 42px;
            border: 0;
            border-radius: var(--radius-sm);
            background: rgba(255, 255, 255, 0.12);
            color: #ffffff;
            cursor: pointer;
            font-size: 1.2rem;
            font-weight: 800;
        }

        .modal-body {
            min-height: 0;
            padding: 24px 28px 28px;
            overflow-y: auto;
            overscroll-behavior-y: contain;
            -webkit-overflow-scrolling: touch;
            touch-action: pan-y;
        }

        .modal--day-details .modal-body {
            display: grid;
            gap: 16px;
        }

        .modal-body--image-viewer {
            display: grid;
            gap: 14px;
            padding: 14px;
        }

        .image-viewer-figure {
            display: grid;
            place-items: center;
            min-height: min(70vh, 760px);
            margin: 0;
            padding: 0;
            border-radius: var(--radius-md);
            border: 1px solid rgba(21, 124, 98, 0.12);
            background: rgba(21, 124, 98, 0.04);
            overflow: hidden;
        }

        .image-viewer-figure img {
            display: block;
            width: auto;
            height: auto;
            max-width: 100%;
            max-height: min(74vh, 820px);
            object-fit: contain;
        }

        .modal-events-stack {
            gap: 12px;
        }

        .day-preview {
            position: fixed;
            top: 0;
            left: 0;
            width: min(320px, calc(100vw - 32px));
            padding: 16px;
            border-radius: var(--radius-lg);
            border: 1px solid rgba(21, 124, 98, 0.14);
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(245, 245, 255, 0.95));
            box-shadow: 0 20px 36px rgba(16, 25, 33, 0.18);
            backdrop-filter: blur(10px);
            z-index: 45;
            pointer-events: none;
        }

        .day-preview-head {
            display: grid;
            gap: 4px;
        }

        .day-preview-date {
            color: var(--primary-dark);
            font-size: 0.95rem;
            line-height: 1.4;
            text-transform: capitalize;
        }

        .day-preview-count,
        .day-preview-more {
            color: var(--muted);
            font-size: 0.78rem;
            font-weight: 700;
        }

        .day-preview-list {
            display: grid;
            gap: 8px;
            margin-top: 12px;
        }

        .day-preview-item {
            position: relative;
            overflow: hidden;
            display: grid;
            gap: 4px;
            padding: 12px 12px 10px;
            border-radius: var(--radius-sm);
            border: 1px solid rgba(var(--event-color-rgb, 21, 124, 98), 0.2);
            border-left: 3px solid var(--event-color, var(--primary));
            background: linear-gradient(180deg, rgba(var(--event-color-rgb, 21, 124, 98), 0.12), rgba(255, 255, 255, 0.92));
        }

        .day-preview-item--paid,
        .day-preview-item--free {
            --access-flag-color: #12a594;
            --access-flag-rgb: 18, 165, 148;
            box-shadow: 0 0 0 1px rgba(var(--access-flag-rgb), 0.14);
        }

        .day-preview-item--paid {
            --access-flag-color: #d18b13;
            --access-flag-rgb: 209, 139, 19;
        }

        .day-preview-item--paid::before,
        .day-preview-item--free::before {
            content: "💸";
            position: absolute;
            top: 10px;
            right: 10px;
            z-index: 1;
            display: inline-grid;
            place-items: center;
            width: auto;
            height: auto;
            background: transparent;
            border: 0;
            border-radius: 0;
            box-shadow: none;
            font-size: 0.9rem;
            line-height: 1;
            pointer-events: none;
        }

        .day-preview-item--paid::before {
            content: "💲";
        }

        .day-preview-time {
            color: var(--event-color, var(--primary-dark));
            font-size: 0.68rem;
            font-weight: 700;
            letter-spacing: 0.04em;
            text-transform: uppercase;
        }

        .day-preview-title {
            color: var(--primary-dark);
            font-size: 0.82rem;
            line-height: 1.35;
            overflow-wrap: anywhere;
            word-break: break-word;
        }

        .form-grid {
            display: grid;
            gap: 16px;
        }

        .field {
            display: grid;
            gap: 8px;
        }

        .field label {
            color: var(--primary-dark);
            font-size: 0.92rem;
            font-weight: 700;
        }

        .field input,
        .field textarea {
            width: 100%;
            padding: 14px 16px;
            border-radius: var(--radius-md);
            border: 1px solid rgba(21, 124, 98, 0.14);
            background: rgba(255, 255, 255, 0.92);
            color: var(--text);
            font: inherit;
            transition: border-color 0.2s ease, box-shadow 0.2s ease;
            resize: vertical;
        }

        .field textarea {
            min-height: 118px;
        }

        .event-image-preview {
            display: grid;
            gap: 10px;
            justify-items: start;
            padding: 12px;
            border-radius: var(--radius-md);
            border: 1px solid rgba(21, 124, 98, 0.12);
            background: rgba(21, 124, 98, 0.05);
        }

        .event-image-preview img {
            display: block;
            width: min(100%, 320px);
            max-height: 180px;
            border-radius: var(--radius-sm);
            object-fit: cover;
            border: 1px solid rgba(21, 124, 98, 0.12);
        }

        .event-image-preview .ghost-button {
            min-height: 38px;
            padding: 0 14px;
            font-size: 0.88rem;
        }

        .access-type-field,
        .display-style-field,
        .category-picker-field {
            margin: 0;
            padding: 0;
            border: 0;
            display: grid;
            gap: 12px;
        }

        .access-type-field legend,
        .display-style-field legend,
        .category-picker-field legend {
            padding: 0;
            color: var(--primary-dark);
            font-size: 0.92rem;
            font-weight: 700;
        }

        .access-type-options,
        .display-style-options {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
        }

        .access-type-option,
        .display-style-option {
            --access-color: #12a594;
            --access-soft: rgba(18, 165, 148, 0.1);
            position: relative;
        }

        .access-type-option--paid {
            --access-color: #d18b13;
            --access-soft: rgba(209, 139, 19, 0.12);
        }

        .access-type-input,
        .display-style-input {
            position: absolute;
            inset: 0;
            opacity: 0;
            pointer-events: none;
        }

        .access-type-pill,
        .display-style-pill {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-height: 42px;
            padding: 0 18px;
            border-radius: 999px;
            border: 1px solid var(--access-color);
            background: var(--access-soft);
            color: var(--access-color);
            font-weight: 800;
            letter-spacing: -0.01em;
            cursor: pointer;
            transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
        }

        .access-type-pill:hover,
        .display-style-pill:hover {
            transform: translateY(-2px);
        }

        .access-type-input:checked + .access-type-pill,
        .display-style-input:checked + .display-style-pill {
            background: var(--access-color);
            color: #ffffff;
            box-shadow: 0 12px 22px rgba(26, 37, 46, 0.14);
        }

        .access-type-input:focus-visible + .access-type-pill,
        .display-style-input:focus-visible + .display-style-pill {
            outline: 3px solid rgba(51, 154, 128, 0.18);
            outline-offset: 2px;
        }

        .category-picker-note {
            margin: 0;
            color: var(--muted);
            font-size: 0.88rem;
            line-height: 1.6;
        }

        .category-picker-option {
            position: relative;
        }

        .category-picker-input {
            position: absolute;
            inset: 0;
            opacity: 0;
            pointer-events: none;
        }

        .category-picker-pill {
            cursor: pointer;
        }

        .category-picker-input:focus-visible + .category-picker-pill {
            outline: 3px solid rgba(51, 154, 128, 0.18);
            outline-offset: 2px;
        }

        .field input:focus,
        .field textarea:focus {
            border-color: rgba(51, 154, 128, 0.42);
            box-shadow: 0 0 0 4px rgba(51, 154, 128, 0.12);
            outline: none;
        }

        .field-link {
            justify-self: start;
            color: var(--primary);
            font-size: 0.88rem;
            font-weight: 600;
            text-decoration: none;
            transition: color 0.2s ease, opacity 0.2s ease;
        }

        .field-link:hover,
        .field-link:focus-visible {
            color: var(--secondary);
            text-decoration: underline;
        }

        .event-form--delete-only .field input,
        .event-form--delete-only .field textarea {
            background: rgba(244, 247, 250, 0.96);
            color: var(--muted);
            box-shadow: none;
        }

        .event-form--delete-only .access-type-field,
        .event-form--delete-only .display-style-field,
        .event-form--delete-only .category-picker-field {
            opacity: 0.68;
        }

        .event-form--delete-only .access-type-pill,
        .event-form--delete-only .display-style-pill,
        .event-form--delete-only .category-picker-pill {
            cursor: default;
        }

        .date-highlight {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            min-height: 38px;
            padding: 0 14px;
            border-radius: var(--radius-pill);
            background: rgba(21, 124, 98, 0.08);
            color: var(--primary-dark);
            font-size: 0.88rem;
            font-weight: 700;
        }

        .form-note,
        .form-error {
            margin: 0;
            font-size: 0.9rem;
            line-height: 1.65;
        }

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

        .form-error {
            color: var(--danger);
            min-height: 22px;
        }

        .modal-actions {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            margin-top: 20px;
            flex-wrap: wrap;
        }

        #login-modal .modal-actions {
            align-items: flex-end;
        }

        .modal-brand {
            display: flex;
            align-items: flex-end;
            align-self: flex-end;
            max-width: 144px;
            min-height: 0;
            opacity: 0.92;
            pointer-events: none;
        }

        .modal-brand img {
            display: block;
            width: 100%;
            height: auto;
            object-fit: contain;
        }

        .modal-actions-right {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            justify-content: flex-end;
        }

        .toast-stack {
            position: fixed;
            right: 20px;
            bottom: 20px;
            z-index: 60;
            display: grid;
            gap: 10px;
        }

        .toast {
            min-width: 240px;
            max-width: 320px;
            padding: 14px 16px;
            border-radius: var(--radius-md);
            border: 1px solid rgba(21, 124, 98, 0.12);
            background: rgba(255, 255, 255, 0.96);
            color: var(--primary-dark);
            box-shadow: 0 18px 30px rgba(16, 25, 33, 0.18);
            font-size: 0.92rem;
            line-height: 1.55;
        }

        @media (min-width: 861px) {
            .category-filters-panel {
                margin-top: -18px;
                gap: 10px;
                padding-bottom: 24px;
            }
        }

        @media (max-width: 1140px) {
            .content-grid {
                grid-template-columns: 1fr;
            }

            .sidebar-card {
                order: 1;
            }
        }

        @media (max-width: 860px) {
            .page-shell {
                min-height: 100vh;
                padding: 10px;
            }

            .category-filters-panel,
            .section-head,
            .content-grid {
                padding-left: 18px;
                padding-right: 18px;
            }

            .section-head {
                padding-top: 22px;
                display: grid;
                grid-template-columns: minmax(0, 1fr) auto;
                grid-template-areas: "title controls";
                align-items: flex-start;
            }

            .section-copy {
                display: contents;
            }

            .section-copy h1 {
                grid-area: title;
                white-space: nowrap;
            }

            .access-filters-list {
                flex-wrap: nowrap;
                justify-content: flex-start;
            }

            .access-filter-chip {
                min-height: 36px;
                padding: 0 14px;
                font-size: 0.86rem;
            }

            .category-filters-panel {
                gap: 14px;
                padding-top: 12px;
            }

            .calendar-section {
                min-height: calc(100vh - 20px);
                border-radius: 24px;
            }

            .topbar {
                grid-area: controls;
                width: auto;
                justify-items: end;
                margin-left: auto;
            }

            .topbar-meta {
                flex-direction: column;
                align-items: flex-end;
            }

            .auth-panel {
                justify-content: flex-end;
            }

            .calendar-toolbar {
                flex-direction: column;
                align-items: flex-start;
            }

            .toolbar-left {
                display: grid;
                grid-template-columns: auto minmax(0, auto) auto;
                gap: 8px;
                width: fit-content;
                max-width: 100%;
                align-items: center;
                justify-content: start;
            }

            .toolbar-left > div {
                min-width: 0;
            }

            .calendar-grid {
                gap: 0;
                padding: 0 16px 18px;
            }

            .day-cell {
                min-height: 124px;
                padding: 7px 4px 7px 6px;
                border-radius: 0;
            }

            .day-number {
                font-size: 0.9rem;
            }
        }

        @media (max-width: 640px) {
            .category-filters-panel {
                padding-bottom: 22px;
            }

            .category-filter-chip,
            .access-type-pill,
            .display-style-pill,
            .category-picker-pill {
                min-height: 38px;
                padding: 0 14px;
                font-size: 0.88rem;
            }

            .weekday {
                font-size: 0.62rem;
                letter-spacing: 0.04em;
            }

            .day-cell {
                min-height: 70px;
                gap: 4px;
                padding: 5px 2px 5px 4px;
            }

            .day-tag {
                display: none;
            }

            .calendar-grid {
                gap: 0;
                padding: 0 10px 14px;
                overflow-x: hidden;
                grid-template-columns: repeat(7, minmax(0, 1fr));
            }

            .event-chip {
                padding: 7px 8px 8px;
            }

            .event-chip--bar,
            .event-chip--dot {
                min-height: 20px;
                padding: 0;
            }

            .event-chip--bar {
                padding: 3px 6px;
            }

            .event-chip-title {
                font-size: 0.72rem;
            }

            .event-chip-time {
                display: none;
            }

            .event-category-list--compact .event-category-badge,
            .event-category-list--compact .event-category-more {
                font-size: 0.58rem;
            }

            .modal-head,
            .modal-body {
                padding-left: 18px;
                padding-right: 18px;
            }

            .modal-backdrop {
                padding: 10px;
            }

            .modal {
                max-height: calc(100vh - 20px);
            }

            .modal-actions,
            .modal-actions-right {
                width: 100%;
            }

            .modal-brand {
                max-width: 110px;
                min-height: 0;
            }

            #login-modal .modal-actions {
                width: 100%;
                display: flex;
                flex-wrap: nowrap;
                align-items: center;
                justify-content: space-between;
                gap: 10px;
            }

            #login-modal .modal-brand {
                flex: 0 0 auto;
                align-self: center;
                max-width: 82px;
                opacity: 0.82;
            }

            #login-modal .modal-actions-right {
                width: auto;
                flex: 1 1 auto;
                display: flex;
                flex-wrap: nowrap;
                justify-content: flex-end;
                gap: 8px;
            }

            #login-modal .modal-actions-right > button {
                flex: 0 0 auto;
                min-width: 90px;
                padding-left: 14px;
                padding-right: 14px;
            }

            .modal-actions-right > button,
            .auth-panel > button {
                flex: 1 1 auto;
            }

            .topbar .auth-panel > button {
                flex: 0 0 auto;
            }
        }

        body.embed-mode {
            min-height: auto;
        }

        body.embed-mode .page-shell {
            min-height: auto;
            padding: 0;
        }

        body.embed-mode.modal-open {
            overflow: hidden;
        }

        body.embed-mode.modal-open .page-shell {
            height: 100vh;
            overflow: hidden;
        }

        body.embed-mode .calendar-section {
            min-height: auto;
            overflow: visible;
            border: 0;
            border-radius: 0;
            background: transparent;
            box-shadow: none;
            grid-template-rows: auto auto auto;
        }

        body.embed-mode .calendar-section::before {
            display: none;
        }

        body.embed-mode .section-head {
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            gap: 16px;
            padding: 22px 22px 16px;
        }

        body.embed-mode .section-head > * {
            min-width: 0;
        }

        body.embed-mode h1 {
            font-size: clamp(1.95rem, 4.1vw, 3rem);
            white-space: nowrap;
        }

        body.embed-mode .section-copy {
            max-width: none;
        }

        body.embed-mode .section-copy p {
            margin-top: 10px;
            max-width: 40rem;
            font-size: 0.98rem;
            line-height: 1.55;
            overflow-wrap: anywhere;
        }

        body.embed-mode .topbar {
            min-width: 0;
            gap: 10px;
            justify-items: end;
            align-content: start;
        }

        body.embed-mode .topbar-meta,
        body.embed-mode .auth-panel {
            gap: 8px;
        }

        body.embed-mode .status-badge,
        body.embed-mode .action-button,
        body.embed-mode .ghost-button,
        body.embed-mode .mini-button {
            white-space: nowrap;
        }

        body.embed-mode .status-badge,
        body.embed-mode .mode-banner {
            padding: 9px 14px;
            font-size: 0.88rem;
        }

        body.embed-mode .action-button,
        body.embed-mode .ghost-button,
        body.embed-mode .danger-button {
            min-height: 42px;
            padding: 0 16px;
            font-size: 0.94rem;
        }

        body.embed-mode .category-filters-panel {
            gap: 14px;
            padding: 12px 22px 20px;
        }

        body.embed-mode .category-filters-title {
            font-size: 1.08rem;
        }

        body.embed-mode .category-filters-list {
            gap: 8px;
        }

        body.embed-mode .category-filter-chip {
            min-height: 38px;
            padding: 0 14px;
            font-size: 0.88rem;
        }

        body.embed-mode .content-grid {
            grid-template-columns: 1fr;
            gap: 18px;
            padding: 0;
        }

        body.embed-mode .sidebar-card {
            order: 1;
            padding: 18px;
            gap: 14px;
        }

        body.embed-mode .calendar-card,
        body.embed-mode .sidebar-card {
            border-radius: 0;
        }

        body.embed-mode .calendar-card {
            border-color: rgba(21, 124, 98, 0.12);
            box-shadow: none;
        }

        body.embed-mode .sidebar-block {
            padding: 16px;
        }

        body.embed-mode .sidebar-title {
            font-size: 1rem;
        }

        body.embed-mode .selected-date {
            margin-bottom: 12px;
            font-size: 0.84rem;
        }

        body.embed-mode .calendar-toolbar {
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            gap: 12px;
            align-items: start;
            padding: 18px 18px 16px;
        }

        body.embed-mode .toolbar-left {
            display: grid;
            grid-template-columns: auto minmax(0, auto) auto;
            gap: 8px;
            width: fit-content;
            max-width: 100%;
            min-width: 0;
            align-items: center;
            justify-content: start;
            justify-self: start;
        }

        body.embed-mode .toolbar-left > div {
            min-width: 0;
        }

        body.embed-mode .month-title {
            font-size: clamp(1.35rem, 3vw, 1.9rem);
            line-height: 1.1;
        }

        body.embed-mode .toolbar-note {
            font-size: 0.92rem;
            line-height: 1.45;
            overflow-wrap: anywhere;
        }

        body.embed-mode .nav-button {
            width: 40px;
            height: 40px;
        }

        body.embed-mode .calendar-grid {
            gap: 8px;
            padding: 0 18px 18px;
        }

        body.embed-mode .weekday {
            font-size: 0.72rem;
            letter-spacing: 0.08em;
        }

        body.embed-mode .day-cell {
            min-height: 110px;
            padding: 10px;
            gap: 8px;
        }

        body.embed-mode .day-number {
            font-size: 0.94rem;
        }

        body.embed-mode .day-tag {
            min-width: 0;
            font-size: 0.68rem;
        }

        body.embed-mode .event-list {
            gap: 5px;
        }

        body.embed-mode .event-chip {
            min-width: 0;
            padding: 7px 8px 8px;
        }

        body.embed-mode .event-chip--bar,
        body.embed-mode .event-chip--dot {
            min-height: 22px;
            padding: 0;
        }

        body.embed-mode .event-chip--bar {
            padding: 3px 7px;
        }

        body.embed-mode .event-chip--paid,
        body.embed-mode .event-chip--free {
            padding-right: 26px;
            padding-top: 8px;
        }

        body.embed-mode .event-chip--paid::before,
        body.embed-mode .event-chip--free::before {
            top: 50%;
            right: 5px;
            width: auto;
            height: auto;
            padding: 0;
            transform: translateY(-50%);
            font-size: 0.72rem;
        }

        body.embed-mode .event-chip--paid::after,
        body.embed-mode .event-chip--free::after {
            content: none;
        }

        body.embed-mode .event-chip--bar.event-chip--paid,
        body.embed-mode .event-chip--bar.event-chip--free,
        body.embed-mode .event-chip--dot.event-chip--paid,
        body.embed-mode .event-chip--dot.event-chip--free {
            padding-top: 0;
            padding-right: 26px;
        }

        body.embed-mode .event-chip--bar.event-chip--paid,
        body.embed-mode .event-chip--bar.event-chip--free {
            padding: 3px 26px 3px 7px;
        }

        body.embed-mode .event-chip-title,
        body.embed-mode .event-chip-time,
        body.embed-mode .sidebar-empty {
            overflow-wrap: anywhere;
            word-break: break-word;
        }

        body.embed-mode .event-chip-title {
            font-size: 0.76rem;
            line-height: 1.28;
        }

        body.embed-mode .event-chip-time {
            font-size: 0.66rem;
        }

        body.embed-mode .event-category-list--compact .event-category-badge,
        body.embed-mode .event-category-list--compact .event-category-more {
            font-size: 0.58rem;
        }

        body.embed-mode .event-more {
            font-size: 0.7rem;
        }

        body.embed-mode .events-stack {
            gap: 10px;
        }

        body.embed-mode .event-card {
            padding: 14px;
        }

        body.embed-mode .event-card-head {
            flex-wrap: wrap;
        }

        body.embed-mode .event-card-time {
            white-space: normal;
            text-align: center;
        }

        body.embed-mode .event-card p {
            overflow-wrap: anywhere;
        }

        body.embed-mode .modal {
            width: min(100%, 520px);
        }

        body.embed-mode .modal-head {
            padding: 20px 22px 16px;
        }

        body.embed-mode .modal-body {
            padding: 20px 22px 22px;
        }

        @media (max-width: 980px) {
            body.embed-mode .modal-backdrop {
                backdrop-filter: none;
                -webkit-backdrop-filter: none;
                background: rgba(9, 34, 28, 0.46);
            }

            body.embed-mode .modal {
                box-shadow: 0 18px 30px rgba(16, 25, 33, 0.2);
            }

            body.embed-mode .event-card {
                box-shadow: 0 8px 16px rgba(21, 124, 98, 0.05);
            }
        }

        body.embed-mode .toast-stack {
            right: 12px;
            bottom: 12px;
        }

        body.embed-mode .toast {
            min-width: min(240px, calc(100vw - 24px));
        }

        @media (max-width: 980px) {
            body.embed-mode .section-head {
                grid-template-columns: minmax(0, 1fr) auto;
            }

            body.embed-mode .topbar {
                width: auto;
                justify-items: end;
            }
        }

        @media (max-width: 760px) {
            body.embed-mode .page-shell {
                padding: 0;
            }

            body.embed-mode .calendar-section {
                border-radius: 0;
            }

            body.embed-mode .section-head,
            body.embed-mode .category-filters-panel {
                padding-left: 16px;
                padding-right: 16px;
            }

            body.embed-mode .content-grid {
                padding-left: 0;
                padding-right: 0;
            }

            body.embed-mode .category-filters-panel {
                padding-top: 14px;
            }

            body.embed-mode .section-head {
                padding-top: 18px;
                grid-template-columns: minmax(0, 1fr) auto;
                grid-template-areas: "title controls";
            }

            body.embed-mode .section-copy {
                display: contents;
            }

            body.embed-mode .section-copy h1 {
                grid-area: title;
                white-space: nowrap;
            }

            body.embed-mode .access-filters-list {
                flex-wrap: nowrap;
                justify-content: flex-start;
            }

            body.embed-mode .access-filter-chip {
                min-height: 34px;
                padding: 0 12px;
                font-size: 0.82rem;
            }

            body.embed-mode .topbar-meta,
            body.embed-mode .auth-panel {
                width: auto;
                justify-content: flex-end;
            }

            body.embed-mode .topbar {
                grid-area: controls;
            }

            body.embed-mode .topbar-meta {
                flex-direction: column;
                align-items: flex-end;
            }

            body.embed-mode .auth-panel {
                flex-wrap: wrap;
            }

            body.embed-mode .action-button,
            body.embed-mode .ghost-button {
                flex: 0 1 auto;
            }

            body.embed-mode .calendar-toolbar {
                grid-template-columns: 1fr;
            }

            body.embed-mode .mini-button {
                justify-self: start;
            }

            body.embed-mode .calendar-grid {
                gap: 0;
                padding: 0 0 6px;
                overflow-x: hidden;
                grid-template-columns: repeat(7, minmax(0, 1fr));
            }

            body.embed-mode .day-cell {
                min-height: 82px;
                gap: 3px;
                padding: 5px 2px 5px 4px;
            }

            body.embed-mode .event-list {
                gap: 2px;
            }

            body.embed-mode .event-chip--bar,
            body.embed-mode .event-chip--dot {
                min-height: 18px;
            }

            body.embed-mode .event-chip--bar {
                padding: 2px 4px;
            }

            body.embed-mode .event-chip-time {
                display: none;
            }

            body.embed-mode .event-chip-title {
                font-size: 0.62rem;
                line-height: 1.2;
            }

            body.embed-mode .day-tag {
                display: none;
            }
        }

