@font-face {
    font-family: 'Outfit';
    src: url('/style/outfit.ttf') format('truetype');
    font-display: swap;
}

:root {
    color-scheme: light dark;
    --font-sans: 'Outfit', sans-serif;

    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-pill: 999px;

    --neutral-bg-light: lch(98% 2 255);
    --neutral-surface-light: lch(100% 0 0);
    --neutral-surface-soft-light: lch(96% 2 255);
    --neutral-surface-strong-light: lch(92% 5 255);
    --neutral-text-light: lch(22% 5 255);
    --neutral-text-muted-light: lch(49% 7 255);
    --neutral-heading-light: lch(16% 4 255);
    --neutral-border-light: lch(87% 4 255);
    --neutral-border-strong-light: lch(76% 6 255);

    --neutral-bg-dark: lch(16% 4 255);
    --neutral-surface-dark: lch(21% 6 255);
    --neutral-surface-soft-dark: lch(25% 6 255);
    --neutral-surface-strong-dark: lch(29% 8 255);
    --neutral-text-dark: lch(94% 2 255);
    --neutral-text-muted-dark: lch(77% 5 255);
    --neutral-heading-dark: lch(98% 1 255);
    --neutral-border-dark: lch(33% 6 255);
    --neutral-border-strong-dark: lch(43% 8 255);

    --accent-hue: 262;
    --success-hue: 150;
    --warning-hue: 88;
    --danger-hue: 28;

    --accent-light: lch(62% 58 var(--accent-hue));
    --accent-hover-light: lch(54% 64 var(--accent-hue));
    --accent-strong-light: lch(42% 48 var(--accent-hue));

    --accent-dark: lch(76% 40 var(--accent-hue));
    --accent-hover-dark: lch(82% 46 var(--accent-hue));
    --accent-strong-dark: lch(60% 32 var(--accent-hue));

    --success-light: lch(64% 52 var(--success-hue));
    --success-dark: lch(74% 38 var(--success-hue));

    --warning-light: lch(70% 48 var(--warning-hue));
    --warning-dark: lch(78% 34 var(--warning-hue));

    --danger-light: lch(58% 64 var(--danger-hue));
    --danger-dark: lch(68% 46 var(--danger-hue));

    --color-bg: light-dark(var(--neutral-bg-light), var(--neutral-bg-dark));
    --color-surface: light-dark(var(--neutral-surface-light), var(--neutral-surface-dark));
    --color-surface-soft: light-dark(var(--neutral-surface-soft-light), var(--neutral-surface-soft-dark));
    --color-surface-strong: light-dark(var(--neutral-surface-strong-light), var(--neutral-surface-strong-dark));
    --color-text: light-dark(var(--neutral-text-light), var(--neutral-text-dark));
    --color-text-muted: light-dark(var(--neutral-text-muted-light), var(--neutral-text-muted-dark));
    --color-heading: light-dark(var(--neutral-heading-light), var(--neutral-heading-dark));
    --color-border: light-dark(var(--neutral-border-light), var(--neutral-border-dark));
    --color-border-strong: light-dark(var(--neutral-border-strong-light), var(--neutral-border-strong-dark));

    --color-accent: light-dark(var(--accent-light), var(--accent-dark));
    --color-accent-hover: light-dark(var(--accent-hover-light), var(--accent-hover-dark));
    --color-accent-strong: light-dark(var(--accent-strong-light), var(--accent-strong-dark));
    --color-accent-contrast: lch(99% 0 0);
    --color-accent-soft: color-mix(in oklch, var(--color-accent) 16%, var(--color-surface));
    --color-accent-softer: color-mix(in oklch, var(--color-accent) 10%, var(--color-surface));

    --color-success: light-dark(var(--success-light), var(--success-dark));
    --color-success-soft: color-mix(in oklch, var(--color-success) 18%, var(--color-surface));
    --color-success-contrast: lch(99% 0 0);

    --color-warning: light-dark(var(--warning-light), var(--warning-dark));
    --color-warning-soft: color-mix(in oklch, var(--color-warning) 22%, var(--color-surface));
    --color-warning-strong: light-dark(lch(45% 42 var(--warning-hue)), lch(84% 32 var(--warning-hue)));

    --color-danger: light-dark(var(--danger-light), var(--danger-dark));
    --color-danger-soft: color-mix(in oklch, var(--color-danger) 18%, var(--color-surface));
    --color-danger-contrast: lch(99% 0 0);

    --color-header-bg: light-dark(rgb(255 255 255 / 0.82), rgb(15 23 42 / 0.84));
    --color-header-border: light-dark(rgb(15 23 42 / 0.08), rgb(255 255 255 / 0.08));
    --color-icon-surface: light-dark(rgb(15 23 42 / 0.08), rgb(255 255 255 / 0.08));
    --color-icon-surface-hover: light-dark(rgb(15 23 42 / 0.14), rgb(255 255 255 / 0.16));
    --color-overlay: light-dark(rgb(15 23 42 / 0.5), rgb(0 0 0 / 0.58));
    --color-overlay-strong: light-dark(rgb(15 23 42 / 0.6), rgb(0 0 0 / 0.68));
    --color-overlay-soft: light-dark(rgb(15 23 42 / 0.18), rgb(0 0 0 / 0.24));
    --color-inverse-border: light-dark(rgb(15 23 42 / 0.9), rgb(255 255 255 / 0.8));
    --color-favorite-surface: light-dark(rgb(15 23 42 / 0.38), rgb(255 255 255 / 0.16));
    --color-favorite-surface-hover: light-dark(rgb(15 23 42 / 0.56), rgb(255 255 255 / 0.3));
    --color-favorite-text: rgb(255 255 255 / 0.78);
    --color-loader: lch(99% 0 0);
    --color-empty-dash: color-mix(in oklch, var(--color-border) 75%, var(--color-surface));

    --shadow-color: light-dark(rgb(15 23 42 / 0.14), rgb(0 0 0 / 0.34));
    --shadow-xs: 0 2px 5px var(--shadow-color);
    --shadow-sm: 0 4px 20px color-mix(in srgb, var(--shadow-color) 78%, transparent);
    --shadow-md: 0 8px 30px color-mix(in srgb, var(--shadow-color) 86%, transparent);
    --shadow-lg: 0 20px 50px color-mix(in srgb, var(--shadow-color) 92%, transparent);
    --shadow-accent: 0 4px 12px color-mix(in srgb, var(--color-accent) 40%, transparent);
    --focus-ring: 0 0 0 3px color-mix(in srgb, var(--color-accent) 34%, transparent);
    --focus-ring-success: 0 0 0 3px color-mix(in srgb, var(--color-success) 30%, transparent);

    --color-toggle-off-bg: light-dark(lch(32% 6 255), lch(32% 6 255));
    --color-toggle-off-text: light-dark(lch(86% 2 255), lch(86% 2 255));
    --color-toggle-on-bg: var(--color-success);
    --color-toggle-on-text: var(--color-success-contrast);
}

:root.light-theme {
    color-scheme: light;
}

:root.dark-theme {
    color-scheme: dark;
}

:root.system-theme {
    color-scheme: light dark;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-sans);
}

body {
    font-family: var(--font-sans);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
    font-size: clamp(12px, 3.2vw, 1rem);
    min-height: 100vh;
}

p {
    margin-bottom: 1rem;
}

.asterisk {
    color: var(--color-danger);
    font-weight: 1200;
}

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 0.5rem;
    color: var(--color-heading);
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-accent-hover);
    text-decoration: none;
}

.label {
    display: inline-block;
    white-space: nowrap;
    color: var(--color-success-contrast);
    text-decoration: none;
    font-weight: 500;
    border-radius: 10vw;
    background: var(--color-success);
    border: 1px solid var(--color-surface);
    padding: 4px 8px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    margin: auto;
    padding: 0.5rem;
    width: 100%;
    height: 100%;
    background: var(--color-overlay);
    backdrop-filter: blur(6px);
    justify-content: center;
    align-items: center;
}

.modal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    background: var(--color-surface);
    color: var(--color-text);
    padding: 0;
    border-radius: var(--radius-sm);
    width: min(95%, 800px);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.modal-content[type="venue"] {
    padding: 1rem;
}

.modal-content p {
    text-align: center;
    padding: 1rem;
    margin: 0;
}

.modal-content h3 {
    width: 100%;
    text-align: center;
    background: var(--color-accent-soft);
    color: var(--color-heading);
    margin: 0;
    padding: 4px 8px;
}

.modal-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 1rem;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 12px;
    background: var(--color-header-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-header-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.header-left h1 {
    font-size: 1rem;
    font-weight: 700;
    height: 100%;
    cursor: pointer;
    margin: 0;
    padding: 0;
}

.header-right {
    display: flex;
    gap: 4px;
    align-items: center;
}

.icon-btn {
    background: var(--color-icon-surface);
    border: none;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.3s ease;
    position: relative;
    overflow: hidden;
}

.icon-btn:hover {
    background: var(--color-icon-surface-hover);
}

.icon-btn svg {
    position: absolute;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
    color: var(--color-text-muted);
}

.icon-btn .sun {
    transform: rotate(0deg) scale(1);
    opacity: 1;
}

.icon-btn .moon {
    transform: rotate(90deg) scale(0);
    opacity: 0;
}

:root.dark-theme .icon-btn .sun {
    transform: rotate(-90deg) scale(0);
    opacity: 0;
}

:root.dark-theme .icon-btn .moon {
    transform: rotate(0deg) scale(1);
    opacity: 1;
}

.profile-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.profile-pic {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-menu {
    position: absolute;
    top: 40px;
    right: 26px;
    width: 180px;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-strong);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.profile-menu a {
    display: block;
    padding: 0.9rem 1.2rem;
    text-decoration: none;
    color: var(--color-text);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.profile-menu a:hover {
    background: var(--color-surface-soft);
}

.profile-menu hr {
    margin: 0.5rem 0;
    border: none;
    border-top: 1px solid var(--color-border);
}

.logout {
    color: var(--color-danger) !important;
}

.profile-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.inline {
    display: inline-block;
    width: auto;
}

.event-image {
    width: min(90%, 600px);
    height: auto;
    object-fit: cover;
    border-radius: 4px 4px 0 0;
    margin: 0 auto 1rem;
    border: 1px solid var(--color-border-strong);
    display: block;
    cursor: pointer;
}

.link-button {
    background: none;
    border: none;
    color: var(--color-heading);
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    font-size: inherit;
}

.link-button:hover {
    background-color: var(--color-accent-soft);
}

.link-button:focus {
    outline: 1px dotted currentColor;
}

.info-row {
    display: flex;
    align-items: center;
    justify-content: left;
    gap: 8px;
    margin-bottom: 0.5rem;
}

.menu-header {
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--color-surface-soft);
}

.menu-header img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.sticky-bottom {
    position: sticky;
    bottom: 0;
    background: var(--color-surface-soft);
    padding-top: 1rem;
    padding-bottom: 1rem;
    margin-top: 1rem;
    z-index: 10;
    border-top-left-radius: var(--radius-xl);
    border-top-right-radius: var(--radius-xl);
}

.dashboard-main {
    padding: 6px;
    max-width: 1200px;
    margin: 0 auto;
}

.flex-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.card {
    background: var(--color-surface);
    padding: 0.8rem;
    margin-top: 1rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
}

.card h1 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.width-100 {
    width: 100%;
}

.justify-center {
    display: flex;
    justify-content: center;
}

.card.full {
    grid-column: 1 / -1;
}

.card h3 {
    margin-bottom: 0.8rem;
    color: var(--color-accent);
    font-size: 1.3rem;
}

.ts-wrapper {
    font-family: inherit;
}

.ts-dropdown .no-results {
    color: var(--color-danger);
    padding: 10px;
}

.form-row {
    width: 100%;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.info-section {
    margin-top: 0.5rem;
    background: var(--color-accent-soft);
    padding: 0.8rem;
    border-radius: var(--radius-sm);
    border: 2px solid var(--color-accent-strong);
    color: var(--color-text);
}

input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
}

:root.dark-theme input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
}

input[type="checkbox"] {
    flex: 0 0 auto;
    width: 1.3em;
    height: 1.3em;
    margin: 0;
    accent-color: var(--color-accent);
}

input {
    min-width: 0;
    font-size: inherit;
}

.purple-button {
    margin: 2px;
    align-self: center;
    white-space: nowrap;
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--color-accent);
    border: 2px solid var(--color-accent);
    color: var(--color-accent-contrast);
    border-radius: var(--radius-lg);
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.purple-button:hover {
    border: 2px solid var(--color-accent-strong);
}

input, select, textarea {
    box-sizing: border-box;
    width: 100%;
    padding: 5px 8px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    margin-top: 2px;
    margin-bottom: 4px;
    background: var(--color-surface);
    color: var(--color-text);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: var(--focus-ring);
}

input[disabled] {
    background: var(--color-surface-strong);
    color: var(--color-text-muted);
    cursor: not-allowed;
}

.btn-primary {
    flex-shrink: 0;
    display: inline-block;
    white-space: nowrap;
    align-items: center;
    justify-items: center;
    text-align: center;
    background: var(--color-accent);
    border: 2px solid var(--color-accent);
    color: var(--color-accent-contrast);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-xl);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.1s ease;
}

.btn-primary:hover {
    border-color: var(--color-accent-strong);
    background: var(--color-accent-hover);
    color: var(--color-accent-contrast);
}

.btn-primary-dark {
    background: var(--color-accent-strong);
    border: 2px solid var(--color-accent-strong);
    color: var(--color-accent-contrast);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-xl);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.1s ease;
}

.btn-primary-dark:hover {
    border-color: var(--color-accent-hover);
    background: var(--color-accent-hover);
}

.btn-secondary {
    flex-shrink: 0;
    display: inline-block;
    white-space: nowrap;
    text-align: center;
    background: transparent;
    border: 2px solid var(--color-accent);
    color: var(--color-accent);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-xl);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.1s ease;
}

.btn-secondary:hover {
    background: var(--color-accent);
    color: var(--color-accent-contrast);
}

.btn-transparent {
    display: inline-block;
    white-space: nowrap;
    align-items: center;
    justify-items: center;
    text-align: center;
    border: 2px solid transparent;
    color: var(--color-accent-strong);
    background-color: var(--color-accent-soft);
    padding: 2px 10px;
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all 0.1s ease;
}

.btn-transparent:hover {
    border-color: var(--color-accent-strong);
}

.link {
    color: var(--color-accent-strong);
    text-decoration: none;
    transition: color 0.1s ease;
    cursor: pointer;
}

.link:hover {
    color: var(--color-accent-hover);
    text-decoration: none;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
}

.filters select {
    flex: 1 1 150px;
    min-width: 150px;
}

.filters input {
    flex: 1 1 220px;
    min-width: 200px;
}

.filters select:focus {
    outline: none;
    border-color: var(--color-accent);
}

.filters input:focus {
    outline: none;
    border-color: var(--color-accent);
}

.country-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}

.city-box {
    display: flex;
    justify-items: end;
    width: 100%;
    margin-bottom: 1.5rem;
    gap: 8px;
}

.city-box .name {
    display: flex;
    justify-items: center;
    align-items: center;
    flex-grow: 1;
    flex-shrink: 0;
}

.city-box .icon {
    display: block;
    flex-grow: 0;
}

.city-box img {
    width: 32px;
    height: 32px;
}

.country-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 1;
    flex: 1;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
    padding: 1rem;
    margin-top: 1rem;
    min-width: 300px;
    max-width: 400px;
    background: var(--color-surface);
}

.country-card h2 {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

@media (max-width: 640px) {
    .country-container {
        flex-direction: column;
        align-items: center;
    }

    .country-card {
        width: 100%;
    }

    .header-left h1 {
        font-size: 0.9rem;
    }

    .profile-menu {
        top: 40px;
    }

    .icon-btn, .profile-btn {
        width: 36px;
        height: 36px;
    }

    .icon-btn svg {
        width: 28px;
        height: 28px;
    }

    .dashboard-main {
        padding: 4px;
    }
}

#page-loader,
#page-loader-initial {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-overlay-strong);
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

#page-loader {
    display: none;
}

#page-loader-initial {
    display: flex;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 6px solid var(--color-loader);
    border-top: 6px solid transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    color: var(--color-text);
    margin-bottom: 1em;
}

td {
    padding: 2px;
    text-align: center;
    vertical-align: middle;
    border-bottom: 1px solid var(--color-border);
}

th {
    padding: 6px;
    background-color: var(--color-accent-strong);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-accent-contrast);
}

tr:nth-child(even) {
    background-color: var(--color-accent-softer);
}

.alert {
    display: none;
    justify-content: center;
    align-items: center;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: var(--color-overlay);
    backdrop-filter: blur(3px);
}

.profile-img {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 3px solid var(--color-border-strong);
    box-shadow: var(--shadow-xs);
}

.flex-row {
    display: flex;
    gap: 1em;
    justify-content: left;
}

.days-selection {
    display: flex;
    flex-wrap: wrap;
    justify-content: start;
}

.flex-no-shrink {
    flex-shrink: 0;
}

.error-message {
    background-color: var(--color-danger);
    padding: 10px;
    color: var(--color-danger-contrast);
    border-radius: 8px;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.success-message {
    background-color: var(--color-success);
    padding: 10px;
    color: var(--color-success-contrast);
    border-radius: 8px;
    margin-top: 0.5rem;
}

.spacer {
    margin-bottom: 1rem;
}

.toggle-btn,
.toggle-btn-big {
    appearance: none;
    border: none;
    border-radius: 20px;
    margin: 3px;
    cursor: pointer;
    transition: all 0.1s ease;
    background: var(--color-toggle-off-bg);
    color: var(--color-toggle-off-text);
    position: relative;
    overflow: hidden;
}

.toggle-btn {
    padding: 3px;
    min-width: 50px;
}

.toggle-btn-big {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.toggle-btn[data-active="true"],
.toggle-btn-big[data-active="true"] {
    background: var(--color-toggle-on-bg);
    color: var(--color-toggle-on-text);
    box-shadow: var(--focus-ring-success);
}

.hidden {
    display: none !important;
}

.filters-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    margin-bottom: 1rem;
}

.date-toggle-group {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.event-item {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    position: relative;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.event-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.event-item-placeholder {
    cursor: default;
    pointer-events: none;
}

.event-item-placeholder:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
}

.event-skeleton-block,
.event-skeleton-line {
    position: relative;
    overflow: hidden;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.05) 25%, rgba(255, 255, 255, 0.55) 50%, rgba(0, 0, 0, 0.05) 75%);
    background-size: 200% 100%;
    animation: event-skeleton-shimmer 1.2s linear infinite;
}

.event-skeleton-line {
    height: 0.8rem;
    border-radius: 999px;
    margin: 0.2rem 0;
}

.event-skeleton-line-title {
    height: 1rem;
    width: 85%;
    margin-top: 0;
}

.event-skeleton-line-short {
    width: 60%;
}

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

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

.event-item .event-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 0;
    margin-bottom: 0;
    display: block;
    flex-shrink: 0;
    border: none;
}

.event-details {
    padding: 0.75rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex-grow: 1;
}

.event-name {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.2rem;
    line-height: 1.3;
}

.event-location,
.event-date,
.event-repeat,
.event-price {
    margin: 0;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    line-height: 1.4;
}

.event-price {
    margin-top: auto;
    padding-top: 0.4rem;
    font-weight: 500;
}

.starting-soon {
    display: inline-block;
    margin: 0 0 0.15rem;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--color-warning-soft);
    color: var(--color-warning-strong);
    align-self: flex-start;
}

.no-events-msg {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--color-text-muted);
    padding: 2rem 0;
}

.city-social-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    margin-bottom: 1rem;
    background: var(--color-surface-soft);
    border-radius: var(--radius-sm);
}

.city-social-label {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    white-space: nowrap;
}

.city-social-btn {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    text-decoration: none;
    color: var(--color-text);
    font-size: 0.82rem;
    font-weight: 500;
    padding: 0.3rem 0.65rem;
    border-radius: var(--radius-pill);
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.city-social-btn:hover {
    background: var(--color-surface-strong);
    box-shadow: var(--shadow-md);
}

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

    .filters-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .date-toggle-group {
        justify-content: stretch;
        gap: 2px;
    }

    .date-toggle-group .toggle-btn-big {
        flex: 1;
        text-align: center;
    }
}

summary {
    cursor: pointer;
    font-weight: 700;
}

.heart-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--color-favorite-surface);
    border: none;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--color-favorite-text);
    transition: background-color 0.15s ease, transform 0.1s ease;
    padding: 0;
    z-index: 1;
    line-height: 1;
}

.heart-btn:hover {
    background: var(--color-favorite-surface-hover);
    transform: scale(1.15);
}

.heart-btn.favorited {
    background: var(--color-danger);
    color: var(--color-danger-contrast);
}

tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--color-border);
    margin-bottom: 1rem;
}

tab.active {
    background-color: var(--color-accent-strong);
    color: var(--color-accent-contrast);
}

tab {
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--color-text-muted);
    margin-bottom: 4px;
    border-bottom: 2px solid transparent;
}

tab:hover {
    background-color: var(--color-accent-soft);
    color: var(--color-heading);
}

#favorites-mode-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.25rem 0 0.75rem;
}

#favorites-mode-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.rsvp-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.rsvp-counts {
    display: inline-flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.rsvp-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.select-wrapper {
    position: relative;
    min-width: 160px;
}

.custom-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100%;
    padding: 9px 36px 9px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-xl);
    background-color: var(--color-surface);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
    color: var(--color-text);
}

.custom-select:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.custom-select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: var(--focus-ring);
}

.custom-select.rsvp-active {
    border-color: var(--color-accent);
    background: var(--color-accent);
    color: var(--color-accent-contrast);
}

.select-arrow {
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
}

.custom-select.rsvp-active + .select-arrow {
    color: var(--color-accent-contrast);
}

.rsvp-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rsvp-list-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--color-border);
}

.rsvp-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    object-fit: cover;
}

.rsvp-name {
    flex: 1;
    font-weight: 500;
}

.rsvp-badge {
    font-size: 0.78rem;
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-pill);
    background: var(--color-surface-strong);
    color: var(--color-text);
}

.rsvp-event-link {
    font-weight: 500;
    color: var(--color-accent);
    text-decoration: none;
    flex: 1;
}

.rsvp-event-link:hover {
    text-decoration: underline;
}

.rsvp-date {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    white-space: nowrap;
}

.msg-dialog {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    max-width: 480px;
    width: 90%;
    box-shadow: var(--shadow-md);
    background: var(--color-surface);
    color: var(--color-text);
}

#support-chat-dialog {
    position: fixed;
    margin: 0;
    width: min(22rem, calc(100vw - 1rem));
    max-width: none;
    opacity: 0;
    transform: translateY(0.75rem) scale(0.98);
    transition: opacity 0.16s ease, transform 0.16s ease;
}

#support-chat-dialog[open] {
    opacity: 1;
    transform: translateY(0) scale(1);
}

#support-chat-dialog::backdrop {
    background: var(--color-overlay-soft);
    backdrop-filter: blur(1px);
}

@media (max-width: 768px) {
    #support-chat-dialog {
        width: min(24rem, calc(100vw - 1rem));
    }
}

.msg-dialog h3 {
    margin: 0 0 1rem;
    font-size: 1.1rem;
}

.msg-dialog textarea {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border-radius: var(--radius-xs);
    border: 1px solid var(--color-border);
    font-size: 0.95rem;
    resize: vertical;
    box-sizing: border-box;
    background: var(--color-surface);
    color: var(--color-text);
}

.msg-dialog-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    justify-content: flex-end;
}

#support-chat-btn {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: var(--color-accent);
    color: var(--color-accent-contrast);
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    box-shadow: var(--shadow-accent);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

#support-chat-btn:hover {
    background: var(--color-accent-hover);
}

.chat-unread-badge,
.tab-badge-alert {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-danger);
    color: var(--color-danger-contrast);
    border-radius: var(--radius-pill);
    min-width: 1.2rem;
    height: 1.2rem;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0 0.3rem;
}

.chat-unread-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 1.2rem;
    font-size: 0.68rem;
}

.tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-accent);
    color: var(--color-accent-contrast);
    border-radius: var(--radius-pill);
    min-width: 1.2rem;
    height: 1.2rem;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0 0.3rem;
    margin-left: 0.25rem;
}

.tab-badge-alert {
    margin-left: 0.25rem;
}

.conv-card {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.12s ease;
    border-bottom: 1px solid var(--color-border);
}

.conv-card:hover,
.conv-card.active {
    background: var(--color-surface-soft);
}

.venue-tabs-container {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 0.8rem;
}

.venue-events-loading {
    display: block;
    align-items: center;
    gap: 0.55rem;
}

.venue-events-loading-spinner {
    width: 1rem;
    height: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    animation: venue-events-spin 0.9s linear infinite;
}

.venue-events-loading-spinner svg {
    width: 100%;
    height: 100%;
}

.venue-events-loading-track {
    stroke: color-mix(in srgb, var(--color-text-muted) 25%, transparent);
    stroke-width: 2.2;
}

.venue-events-loading-accent {
    stroke: var(--color-accent);
    stroke-width: 2.2;
    stroke-linecap: round;
}

@keyframes venue-events-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.venue-tab-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    flex: 1;
    min-width: 6.5rem;
    padding: 0.5rem 0.8rem;
    white-space: nowrap;
}

.venue-tab-button svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.schedule-wrapper {
    margin-top: 0.8rem;
    width: 100%;
}

.schedule-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
    flex-wrap: wrap;
}

.schedule-nav-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-width: auto;
    padding: 0.5rem 0.8rem;
    white-space: nowrap;
    font-size: 0.9rem;
}

.schedule-nav-button.hidden {
    display: none;
}

.schedule-nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.schedule-week-title {
    text-align: center;
    font-weight: 700;
    font-size: 1rem;
    color: var(--color-heading);
}

.schedule-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.6rem;
}

.schedule-day-column {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    overflow: hidden;
    min-height: 9rem;
}

.schedule-day-header {
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.45rem 0.6rem;
    border-bottom: 1px solid var(--color-border);
    background: linear-gradient(
        180deg,
        color-mix(in oklch, var(--color-accent-soft) 35%, var(--color-surface)) 0%,
        color-mix(in oklch, var(--color-accent-soft) 60%, var(--color-surface)) 100%
    );
}

.schedule-day-events {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.55rem;
}

.schedule-event-item {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    align-items: baseline;
    padding: 0.4rem 0.45rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    background: var(--color-surface-soft);
    line-height: 1.25;
}

@media (min-width: 921px) {
    .schedule-event-item {
        flex-direction: column;
        align-items: flex-start;
    }
}

.schedule-event-item:hover {
    border-color: var(--color-accent);
    background: var(--color-accent-soft);
    color: var(--color-heading);
}

.schedule-event-time {
    font-weight: 700;
    white-space: nowrap;
    color: var(--color-accent-strong);
}

/* ─── Pro Mode Styling ─────────────────────────────────────────────────────── */

.heading-card {
    border: none;
    box-shadow: none;
}

.heading-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.heading-flex h1 {
    flex: 1;
    margin: 0;
}

.pro-mode-switch {
    flex-shrink: 0;
    appearance: none;
    background: none;
    border: 2px solid var(--color-border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    padding: 6px;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pro-mode-switch:hover {
    color: var(--color-accent);
    border-color: var(--color-accent);
}

.pro-mode-switch:active {
    transform: scale(0.95);
}

.pro-mode-icon {
    width: 20px;
    height: 20px;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.pro-mode * {
    transition: all 0.2s ease;
}

body.pro-mode .spacer {
    margin-bottom: 0.4rem;
}

body.pro-mode .card {
    border: none;
    box-shadow: none;
    padding: 0.5rem;
    margin-top: 0.5rem;
    border-bottom: 1px solid var(--color-border);
    border-radius: 0;
    background: transparent;
}

body.pro-mode .card h1,
body.pro-mode .card h2,
body.pro-mode .card h3 {
    margin-bottom: 0.3rem;
    font-size: 0.95em;
}

body.pro-mode input,
body.pro-mode select,
body.pro-mode textarea {
    background: transparent;
    border: 1px solid var(--color-border);
    margin-top: 1px;
    margin-bottom: 2px;
    padding: 3px 5px;
    font-size: 0.9em;
}

body.pro-mode input:focus,
body.pro-mode select:focus,
body.pro-mode textarea:focus {
    border-color: var(--color-accent);
}

body.pro-mode .btn-primary {
    border: 1px solid var(--color-accent);
    padding: 0.3rem 0.7rem;
    font-size: 0.9em;
    width: auto;
}

body.pro-mode .btn-primary:hover {
    border-color: var(--color-accent-strong);
}

body.pro-mode .btn-secondary {
    border: 1px solid var(--color-text-muted);
    padding: 0.3rem 0.7rem;
    font-size: 0.9em;
}

body.pro-mode .checkbox-label {
    gap: 4px;
    margin-bottom: 0.2rem;
}

body.pro-mode label {
    display: block;
    margin-top: 0.4rem;
    margin-bottom: 0.1rem;
    font-size: 0.9em;
}

body.pro-mode .info-section {
    border: 1px solid var(--color-accent);
    padding: 0.5rem;
    margin-top: 0.3rem;
}

body.pro-mode .sticky-bottom {
    background: transparent;
    border-top: 1px solid var(--color-border);
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    margin-top: 0.5rem;
}

body.pro-mode .pro-mode-switch {
    color: var(--color-accent);
    border-color: var(--color-accent);
}

body.pro-mode h2 {
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

body.pro-mode .heading-card {
    margin-top: 0;
    padding: 0.3rem 0.5rem;
}

body.pro-mode .flex-row {
    gap: 0.5rem;
}

body.pro-mode .flex-column {
    gap: 0.3rem;
}

.schedule-event-title {
    overflow: hidden;
    text-overflow: ellipsis;
}

.schedule-day-empty {
    opacity: 0.65;
    font-size: 0.88rem;
    padding: 0.2rem;
}

.schedule-empty-state {
    width: 100%;
    text-align: center;
    border: 1px dashed var(--color-empty-dash);
    border-radius: var(--radius-md);
    padding: 1.2rem;
    background: var(--color-surface-soft);
    color: var(--color-text-muted);
}

@media (max-width: 920px) {
    .schedule-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 920px) {
    .venue-tabs-container {
        flex-direction: column;
    }

    .venue-tab-button {
        flex: 1;
    }
}

@media (max-width: 680px) {
    .schedule-header-row {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.3rem;
    }

    .schedule-week-title {
        width: 100%;
        order: -1;
        font-size: 0.95rem;
    }

    .schedule-grid {
        grid-template-columns: 1fr;
    }

    .schedule-nav-button {
        font-size: 0.8rem;
        padding: 0.35rem 0.6rem;
    }
}

.conv-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

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

.conv-header-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.15rem;
}

.conv-other-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.conv-unread-badge {
    background: var(--color-accent);
    color: var(--color-accent-contrast);
    border-radius: var(--radius-pill);
    min-width: 1.1rem;
    height: 1.1rem;
    font-size: 0.65rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.3rem;
}

.conv-time {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    white-space: nowrap;
}

.conv-context {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    display: block;
    margin-bottom: 0.2rem;
}

.conv-context--event {
    color: var(--color-accent);
    text-decoration: none;
}

.conv-context--event:hover {
    text-decoration: underline;
}

.conv-context--support {
    font-style: italic;
}

.conv-preview {
    margin: 0;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.thread-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.thread-heading {
    font-size: 1rem;
    font-weight: 600;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
}

.thread-messages {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.msg-bubble {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    max-width: 80%;
}

.msg-bubble--mine {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.msg-avatar {
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.msg-content {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.msg-body {
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    background: var(--color-surface-soft);
    color: var(--color-text);
    font-size: 0.9rem;
    line-height: 1.55;
}

.msg-bubble--mine .msg-body {
    background: var(--color-accent);
    color: var(--color-accent-contrast);
}

.msg-time {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    text-align: right;
}

.msg-bubble--theirs .msg-time {
    text-align: left;
}

.thread-reply {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.thread-reply-input {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border-radius: var(--radius-xs);
    border: 1px solid var(--color-border);
    font-size: 0.9rem;
    resize: vertical;
    box-sizing: border-box;
    background: var(--color-surface);
    color: var(--color-text);
}

.thread-reply-btn {
    align-self: flex-end;
}

#messages-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 1rem;
    align-items: start;
}

#messages-content.hidden {
    display: none;
}

#thread-panel {
    border-left: 1px solid var(--color-border);
    padding-left: 1rem;
}

.msg-empty {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

@media (max-width: 640px) {
    #messages-content {
        grid-template-columns: 1fr;
    }

    #thread-panel {
        border-left: none;
        border-top: 1px solid var(--color-border);
        padding-left: 0;
        padding-top: 1rem;
    }
}

@media (prefers-color-scheme: dark) {
    :root.system-theme .icon-btn .sun {
        transform: rotate(-90deg) scale(0);
        opacity: 0;
    }

    :root.system-theme .icon-btn .moon {
        transform: rotate(0deg) scale(1);
        opacity: 1;
    }

    :root.system-theme input[type="date"]::-webkit-calendar-picker-indicator {
        filter: invert(1);
    }
}
