:root {
    color-scheme: light;

    --bg: #ffffff;
    --bg-deep: #f2f3f7;
    --surface: #ffffff;
    --surface-soft: #f2f3f7;
    --text: #1d2023;
    --muted: #626c77;
    --border: rgba(188, 195, 208, 0.5);
    --border-strong: #bcc3d0;
    --weekend: #ff0032;

    --accent: #e94f37;
    --accent-ink: #b33622;
    --accent-fill: #c93d27;
    --accent-fill-hover: #ad321f;
    --on-accent-fill: #ffffff;
    --accent-soft: #f8ddd4;

    --success: #2f7450;
    --success-soft: #e1f0e7;
    --warning: #805313;
    --warning-soft: #f8edd7;
    --danger: #a13225;
    --danger-soft: #f9e0dc;

    --glow-a: transparent;
    --glow-b: transparent;

    --footer-bg: #f5f5f7;
    --footer-text: #626c77;
    --footer-title: #1d2023;

    /* Панель «я иду» на экране входа: тёмная в обеих темах,
       потому что текст на ней всегда светлый. */
    --auth-aside-bg: #1d2023;
    --auth-aside-text: #ffffff;
    --auth-aside-muted: rgba(255, 255, 255, 0.66);

    --shadow-soft: 0 1px 2px rgba(29, 32, 35, 0.04);
    --shadow-card: 0 8px 24px rgba(29, 32, 35, 0.08);

    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --container: 1440px;
    --header-h: 68px;

    --font-body: "Onest", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-display: "Unbounded", "Onest", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;

        --bg: #101214;
        --bg-deep: #15181b;
        --surface: #171a1d;
        --surface-soft: #22262a;
        --text: #f2f3f5;
        --muted: #9aa4ae;
        --border: rgba(255, 255, 255, 0.12);
        --border-strong: rgba(255, 255, 255, 0.26);
        --weekend: #ff5c78;

        --accent: #ff7a63;
        --accent-ink: #ff9a87;
        --accent-fill: #ff7159;
        --accent-fill-hover: #ff8b75;
        --on-accent-fill: #171310;
        --accent-soft: #3a211b;

        --success: #83d3a4;
        --success-soft: #1e3328;
        --warning: #ecc77c;
        --warning-soft: #352c1c;
        --danger: #f19a8d;
        --danger-soft: #3a211d;

        --glow-a: transparent;
        --glow-b: transparent;

        --footer-bg: #15181b;
        --footer-text: #9aa4ae;
        --footer-title: #f2f3f5;

        --auth-aside-bg: #1b1f22;
        --auth-aside-text: #f2f3f5;
        --auth-aside-muted: rgba(242, 243, 245, 0.68);

        --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.22);
        --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.4);
    }
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    overflow-x: clip;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.55;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent);
    text-underline-offset: 3px;
}

a:hover {
    color: var(--accent-ink);
}

h1,
h2,
h3 {
    margin: 0;
    line-height: 1.08;
    letter-spacing: -0.04em;
    text-wrap: balance;
}

h1,
h2 {
    font-family: var(--font-display);
    font-weight: 600;
}

p {
    margin: 0;
}

button,
input,
select {
    font: inherit;
}

.icon {
    display: block;
    flex: 0 0 auto;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 88px;
}

.site-main {
    flex: 1 0 auto;
    padding-top: 20px;
    padding-bottom: 80px;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 100;
    padding: 12px 18px;
    border-radius: 0 0 12px 12px;
    background: var(--text);
    color: var(--bg);
    font-weight: 700;
    text-decoration: none;
}

.skip-link:focus {
    top: 0;
    color: var(--bg);
}

/* Шапка */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--bg);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: var(--header-h);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text);
}

.brand:hover {
    color: var(--text);
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    border-radius: 12px;
    background: var(--accent-fill);
    color: var(--on-accent-fill);
}

.brand-mark svg {
    width: 22px;
    height: 22px;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.brand-text {
    font-family: var(--font-display);
    font-size: 1.16rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.055em;
}

.brand-note {
    display: none;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    min-width: 0;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0;
    border-radius: 0;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.15s ease;
}

.nav-link .icon {
    width: 16px;
    height: 16px;
}

.nav-link:hover {
    color: var(--accent-ink);
    background: none;
}

.nav-link.is-active {
    color: var(--text);
    background: none;
    box-shadow: none;
}

.nav-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    height: 44px;
    padding: 0 16px;
    border-radius: 16px;
    background: var(--text);
    color: var(--bg);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
}

.nav-login .icon {
    display: none;
}

.nav-login:hover {
    background: var(--accent-fill);
    color: var(--on-accent-fill);
}

/* Общие элементы */

.eyebrow {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 10px;
    color: var(--accent-ink);
    font-size: 0.69rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";
    width: 22px;
    height: 1.5px;
    background: currentColor;
}

.lead {
    max-width: 620px;
    margin-top: 12px;
    color: var(--muted);
    font-size: 1.03rem;
    line-height: 1.6;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 48px;
    padding: 12px 22px;
    border: 1px solid transparent;
    border-radius: 999px;
    font: inherit;
    font-size: 0.94rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.button:active {
    transform: translateY(1px);
}

.button .icon {
    width: 18px;
    height: 18px;
}

.button-primary {
    background: var(--accent-fill);
    color: var(--on-accent-fill);
    box-shadow: 0 12px 24px -16px color-mix(in srgb, var(--accent) 90%, transparent);
}

.button-primary:hover {
    background: var(--accent-fill-hover);
    color: var(--on-accent-fill);
    transform: translateY(-1px);
}

.button-secondary {
    background: var(--surface);
    border-color: var(--border-strong);
    color: var(--text);
}

.button-secondary:hover {
    background: var(--surface-soft);
    color: var(--text);
    transform: translateY(-1px);
}

.button-large {
    min-height: 54px;
    padding: 15px 27px;
    font-size: 1rem;
}

.button-wide {
    width: 100%;
}

.flash {
    margin-bottom: 20px;
    padding: 14px 18px;
    border: 1px solid transparent;
    border-radius: 14px;
    font-size: 0.92rem;
}

.flash-success {
    background: var(--success-soft);
    border-color: color-mix(in srgb, var(--success) 25%, transparent);
    color: var(--success);
}

.flash-error {
    background: var(--danger-soft);
    border-color: color-mix(in srgb, var(--danger) 25%, transparent);
    color: var(--danger);
}

.notice {
    margin-bottom: 16px;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.notice-muted {
    background: var(--surface-soft);
    color: var(--muted);
}

.notice-warning {
    background: var(--warning-soft);
    color: var(--warning);
}

.notice-error {
    background: var(--danger-soft);
    color: var(--danger);
}

.notice-test {
    background: var(--success-soft);
    color: var(--success);
}

/* Прошедшее событие: карточка остаётся по ссылке, но с шутливой пометкой. */

.past-banner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 20px;
    padding: 18px 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface-soft);
}

.past-banner-star {
    color: var(--accent);
    font-size: 1.4rem;
    line-height: 1.25;
}

.past-banner-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.past-banner-text {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.past-banner-text a {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.past-banner-text a:hover {
    color: var(--accent-ink);
}

/* Архив в результатах поиска: недавно прошедшие события. */

.past-results {
    margin-top: 56px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.past-title {
    margin: 0 0 8px;
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 2.6vw, 1.9rem);
    font-weight: 700;
    letter-spacing: -0.035em;
}

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

.muted {
    color: var(--muted);
    font-weight: 500;
}

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

:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent);
    outline-offset: 3px;
}

/* Шапка: поиск и выбор города */

.header-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 auto;
    height: 44px;
    max-width: none;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface-soft);
    transition: border-color 0.15s ease, background 0.15s ease;
}

.header-search:focus-within {
    border-color: var(--border-strong);
    background: var(--bg);
}

.header-search > .icon {
    flex: 0 0 auto;
    color: #8d969f;
}

.header-search input[type="search"] {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 17px;
    appearance: none;
    -webkit-appearance: none;
}

.header-search input[type="search"]::placeholder {
    color: #8d969f;
    opacity: 1;
}

.header-search input[type="search"]:focus {
    outline: none;
}

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

.header-search-submit {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 0 17px;
    border: 0;
    border-radius: 999px;
    background: var(--text);
    color: var(--bg);
    font: inherit;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.header-search-submit:hover {
    background: var(--accent-fill);
    color: var(--on-accent-fill);
}

/* Кнопка отправки есть только для клавиатуры: Enter отправляет форму. */
.header-search-submit.visually-hidden {
    display: none;
}

.header-tools {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 0 0 auto;
}

.city-picker {
    position: relative;
}

.city-picker-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 240px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #8d969f;
    font-size: 14px;
    font-weight: 500;
    list-style: none;
    cursor: pointer;
    transition: color 0.15s ease;
}

.city-picker-toggle::-webkit-details-marker {
    display: none;
}

.city-picker-toggle:hover {
    color: var(--text);
}

.city-picker-toggle > .icon:first-child {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    color: currentColor;
}

.city-picker-toggle > .icon:last-child {
    flex: 0 0 auto;
    width: 12px;
    height: 12px;
    color: currentColor;
    transition: transform 0.15s ease;
}

.city-picker[open] .city-picker-toggle > .icon:last-child {
    transform: rotate(180deg);
}

.city-picker-value {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.city-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 60;
    width: 280px;
    max-height: 360px;
    overflow-y: auto;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: 0 16px 40px -16px rgba(29, 32, 35, 0.24);
}

.city-menu-title {
    padding: 6px 10px 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

.city-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 12px;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.city-option:hover {
    background: var(--surface-soft);
}

.city-option.is-active {
    color: var(--text);
    font-weight: 600;
}

.city-option .icon {
    flex: 0 0 auto;
    color: var(--text);
}

/* Подсказки поиска */

.search-suggest {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 60;
    max-height: 420px;
    overflow-y: auto;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: 0 16px 40px -16px rgba(29, 32, 35, 0.24);
}

.search-suggest[hidden] {
    display: none;
}

.search-suggest-item {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 10px;
    row-gap: 2px;
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--text);
    text-decoration: none;
}

.search-suggest-item:hover,
.search-suggest-item.is-active,
.search-suggest-item:focus-visible {
    background: var(--surface-soft);
    outline: none;
}

.search-suggest-date {
    align-self: center;
    padding: 2px 6px;
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.search-suggest-title {
    font-size: 0.9rem;
    font-weight: 650;
    line-height: 1.35;
}

.search-suggest-place {
    grid-column: 2;
    color: var(--muted);
    font-size: 0.78rem;
}

.search-suggest-empty {
    margin: 0;
    padding: 14px 12px;
    color: var(--muted);
    font-size: 0.88rem;
    text-align: center;
}

/* Полоса категорий */

.category-bar {
    background: var(--bg);
}

.category-nav {
    display: flex;
    align-items: stretch;
    gap: 28px;
    height: 52px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.category-nav::-webkit-scrollbar {
    display: none;
}

.category-bar .container {
    position: relative;
}

.category-bar .container::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 40px;
    background: linear-gradient(to right, transparent, var(--bg));
    pointer-events: none;
}

.category-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none;
    transition: color 0.15s ease;
}

.category-pill:hover {
    color: var(--accent-ink);
}

.category-pill.is-active {
    background: none;
    color: var(--text);
}

.category-pill.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--text);
}

/* Лента */

.feed-head {
    display: block;
    margin: 44px 0 0;
}

.feed-head-main {
    min-width: 0;
}

.feed-title {
    font-size: clamp(1.8rem, 2.6vw, 2.25rem);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.feed-subtitle {
    margin-top: 8px;
    color: var(--muted);
    font-size: 14px;
}

.feed-controls {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    margin-top: 30px;
}

/* Заголовки страниц */

.page-head {
    max-width: 780px;
    margin: 16px 0 30px;
}

.page-head h1 {
    font-size: clamp(2rem, 4.4vw, 3.3rem);
    letter-spacing: -0.055em;
}

.page-head-compact {
    margin-top: 22px;
}

.page-head-with-action {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    max-width: none;
    flex-wrap: wrap;
}

/* Правовые документы */

.legal-page {
    max-width: 780px;
    padding-bottom: 8px;
}

.legal-page h1 {
    font-size: clamp(1.75rem, 5.2vw, 3.1rem);
    hyphens: auto;
    overflow-wrap: anywhere;
}

.legal-meta {
    margin-top: 14px;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 500;
}

.legal-section {
    margin-top: 36px;
}

.legal-section h2 {
    margin: 0 0 14px;
    font-size: clamp(1.15rem, 1.8vw, 1.35rem);
    letter-spacing: -0.035em;
}

.legal-section p {
    color: var(--text);
    font-size: 0.98rem;
    line-height: 1.72;
}

.legal-section p + p,
.legal-section ul + p {
    margin-top: 12px;
}

.legal-section ul {
    display: grid;
    gap: 8px;
    margin: 12px 0 0;
    padding-left: 20px;
    color: var(--text);
    font-size: 0.98rem;
    line-height: 1.6;
}

.legal-section li::marker {
    color: var(--accent);
}

.legal-section a {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.legal-section a:hover {
    color: var(--accent-ink);
}

/* Календарь */

.date-strip {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    padding: 0 0 2px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

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

.date-chip {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: auto;
    min-width: 60px;
    height: 56px;
    padding: 0 10px;
    border: 0;
    border-radius: 16px;
    background: transparent;
    color: var(--text);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.date-chip:hover {
    background: var(--surface-soft);
    color: var(--text);
}

.date-chip-label {
    color: var(--text);
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    white-space: nowrap;
}

.date-chip-date {
    color: var(--text);
    font-size: 17px;
    font-weight: 500;
    line-height: 24px;
    white-space: nowrap;
}

.date-chip.is-weekend .date-chip-date,
.date-chip.is-weekend .date-chip-label {
    color: var(--weekend);
}

.date-chip.is-active {
    background: var(--text);
    color: var(--bg);
}

.date-chip.is-active .date-chip-date,
.date-chip.is-active .date-chip-label {
    color: var(--bg);
}

.date-chip-all {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-width: 44px;
    padding: 0;
    background: var(--surface-soft);
}

.date-chip-all:hover {
    background: color-mix(in srgb, var(--text) 8%, var(--surface-soft));
}

.date-chip-all.is-active {
    background: var(--text);
    color: var(--bg);
}

.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.field-label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.field-label .icon {
    color: var(--accent-ink);
}

select,
input[type="date"],
input[type="tel"],
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"] {
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--bg);
    color: var(--text);
    font: inherit;
    transition: border-color 0.15s ease, background 0.15s ease;
}

select:hover,
input[type="date"]:hover,
input[type="tel"]:hover,
input[type="text"]:hover,
input[type="email"]:hover,
input[type="password"]:hover,
input[type="number"]:hover {
    border-color: var(--border-strong);
}

input::placeholder {
    color: var(--muted);
    opacity: 0.75;
}

.select-wrap {
    position: relative;
    display: block;
}

.select-wrap select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 44px;
    cursor: pointer;
}

.select-wrap > .icon {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
}

/* Результаты и карточки */

.feed-anchor {
    scroll-margin-top: calc(var(--header-h) + 18px);
}

.results-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    margin: 6px 0 22px;
}

.results-head h2 {
    font-size: clamp(1.5rem, 2.6vw, 2rem);
    letter-spacing: -0.045em;
}

.results-sort {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 600;
}

.results-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 2px;
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.results-link:hover {
    color: var(--accent-ink);
    border-bottom-color: currentColor;
}

.results-link .icon {
    width: 16px;
    height: 16px;
}

.event-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 40px 24px;
    margin-top: 38px;
}

.event-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.event-card.is-past {
    opacity: 0.68;
}

.card-media {
    position: relative;
    display: block;
    aspect-ratio: 3 / 2;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--surface-soft);
}

.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s ease;
}

.event-card:hover .card-media img {
    transform: scale(1.035);
}

/* Дата поверх фотографии: тёмная плашка, чтобы читалась на любом снимке. */

.date-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 9px 13px 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    background: rgba(20, 23, 26, 0.8);
    color: #fff;
    line-height: 1;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.date-badge-day {
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
}

.date-badge-month {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.card-date-badge {
    display: none;
}
.card-date-badge .date-badge-day {
    font-size: 1.22rem;
}

.card-date-badge .date-badge-month {
    font-size: 0.52rem;
}

.card-flag {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 4px 8px;
    border-radius: 8px;
    background: rgba(29, 32, 35, 0.78);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    backdrop-filter: blur(6px);
}

/* Кнопка избранного поверх обложки, как на референсе. */
.card-fav {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.86);
    color: var(--text);
    cursor: pointer;
    backdrop-filter: blur(6px);
    transition: background 0.15s ease, color 0.15s ease;
}

.card-fav:hover {
    background: #fff;
    color: var(--accent-ink);
}

.card-fav.is-active {
    color: var(--accent-ink);
}

.card-fav .icon {
    width: 20px;
    height: 20px;
}

.card-placeholder {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    padding: 18px;
    overflow: hidden;
    background:
        radial-gradient(circle at 82% 12%, rgba(255, 255, 255, 0.28), transparent 36%),
        radial-gradient(circle at 8% 88%, rgba(64, 18, 9, 0.32), transparent 48%),
        linear-gradient(135deg, #ec7148, #e94f37 54%, #a62f1d);
    color: #fff;
}

.placeholder-mark {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 34px;
    height: 34px;
    color: rgba(255, 255, 255, 0.65);
}

.placeholder-mark svg {
    width: 100%;
    height: 100%;
}

.placeholder-date {
    display: flex;
    align-items: flex-end;
    gap: 9px;
    line-height: 0.84;
}

.placeholder-day {
    font-family: var(--font-display);
    font-size: 3.15rem;
    font-weight: 700;
    letter-spacing: -0.08em;
}

.placeholder-month {
    padding-bottom: 5px;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    opacity: 0.82;
}

.card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 6px;
    padding: 12px 0 0;
}

.card-kicker {
    align-self: flex-start;
    padding: 2px 6px;
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    line-height: 20px;
}

.card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.card-title {
    margin: 0;
    font-family: var(--font-body);
    font-size: 17px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.card-title a {
    display: -webkit-box;
    overflow: hidden;
    color: var(--text);
    text-decoration: none;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.card-title a:hover {
    color: var(--accent-ink);
}

.card-date,
.card-place {
    display: flex;
    align-items: flex-start;
    gap: 0;
    font-size: 14px;
    line-height: 20px;
}

.card-date {
    color: var(--muted);
    font-weight: 400;
}

.card-place {
    color: var(--muted);
}

.card-date .icon,
.card-place .icon {
    display: none;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 4px;
}

.meta-price {
    padding: 2px 6px;
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
}

.meta-price.is-free {
    background: var(--success-soft);
    color: var(--success);
}

.meta-price.muted {
    color: var(--muted);
    font-weight: 600;
}

.meta-age {
    padding: 2px 6px;
    border: 0;
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
}

.badge {
    display: inline-block;
    flex: 0 0 auto;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    line-height: 20px;
    letter-spacing: 0;
}

.badge-regional {
    background: var(--accent-soft);
    color: var(--accent-ink);
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.chips li {
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-ink);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.chips-large {
    gap: 7px;
}

.chips-large li {
    padding: 6px 12px;
    font-size: 0.74rem;
}

.card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 4px;
    padding-top: 0;
    border-top: 0;
}

.card-fav-form {
    margin: 0;
}

.inline-form {
    display: inline-flex;
    margin: 0;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    line-height: 20px;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s ease;
}

.action-btn .icon {
    width: 16px;
    height: 16px;
}

.action-btn:hover {
    background: none;
    color: var(--text);
}

.action-btn.is-active {
    background: none;
    color: var(--accent-ink);
}

.action-btn-going.is-active {
    background: none;
    color: var(--success);
}

.count {
    padding: 0 5px;
    border-radius: 999px;
    background: color-mix(in srgb, currentColor 13%, transparent);
    font-size: 0.67rem;
    font-weight: 800;
}

.pagination {
    display: flex;
    justify-content: center;
    margin: 44px 0 8px;
}

.pagination .button {
    min-height: 44px;
    padding: 0 24px;
    border: 0;
    border-radius: 16px;
    background: var(--surface-soft);
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    box-shadow: none;
}

.pagination .button:hover {
    background: color-mix(in srgb, var(--text) 8%, var(--surface-soft));
    color: var(--text);
    transform: none;
}

.list-end {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 36px;
    color: var(--muted);
    font-size: 0.82rem;
}

.list-end span {
    color: var(--accent);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    padding: clamp(38px, 6vw, 72px) 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--surface);
    text-align: center;
}

.empty-mark {
    color: var(--accent);
    font-size: 3rem;
    line-height: 1;
}

.empty-title {
    font-family: var(--font-display);
    font-size: 1.55rem;
    font-weight: 600;
    letter-spacing: -0.045em;
}

.empty-text {
    max-width: 440px;
    color: var(--muted);
    font-size: 0.94rem;
}

.empty-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
}

/* Страницы ошибок */

.error-page {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin: clamp(16px, 4vw, 40px) 0;
    padding: clamp(44px, 8vw, 96px) 24px clamp(40px, 7vw, 80px);
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--surface);
    text-align: center;
}

.error-star {
    position: absolute;
    top: -24px;
    right: -16px;
    color: var(--accent-soft);
    font-size: clamp(7rem, 18vw, 14rem);
    line-height: 1;
    pointer-events: none;
}

.error-code {
    position: relative;
    font-family: var(--font-display);
    font-size: clamp(4rem, 12vw, 7rem);
    font-weight: 700;
    line-height: 0.9;
    letter-spacing: -0.07em;
    color: var(--accent);
}

.error-title {
    position: relative;
    font-size: clamp(1.5rem, 3vw, 2.1rem);
}

.error-text {
    position: relative;
    max-width: 460px;
    color: var(--muted);
    font-size: 0.96rem;
    line-height: 1.6;
}

.error-actions {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

/* Карта сайта */

.sitemap-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: clamp(22px, 4vw, 36px);
}

.sitemap-section {
    padding: clamp(20px, 2.4vw, 28px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.sitemap-section h2 {
    margin-bottom: 14px;
    font-size: clamp(1.2rem, 2vw, 1.45rem);
}

.sitemap-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sitemap-list a {
    display: inline-flex;
    padding: 7px 0;
    color: var(--text);
    font-size: 0.92rem;
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.sitemap-list a:hover {
    color: var(--accent-ink);
    border-bottom-color: color-mix(in srgb, var(--accent) 40%, transparent);
}

.sitemap-list-columns {
    display: block;
    columns: 2;
    column-gap: 26px;
}

.sitemap-list-columns li {
    break-inside: avoid;
}

.sitemap-note {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.55;
}

/* Страница события */

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0 24px;
    color: var(--muted);
    font-size: 0.82rem;
}

.breadcrumbs a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    text-decoration: none;
}

.breadcrumbs a::before {
    content: "←";
    font-size: 0.95rem;
    transition: transform 0.15s ease;
}

.breadcrumbs a:hover {
    color: var(--accent-ink);
}

.breadcrumbs a:hover::before {
    transform: translateX(-2px);
}

.breadcrumbs-sep {
    color: var(--border-strong);
}

.breadcrumbs [aria-current] {
    color: var(--text);
}

.event-page {
    padding-top: 4px;
}

.event-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: clamp(28px, 5vw, 64px);
    align-items: center;
    padding: 8px 0 clamp(34px, 5vw, 58px);
}

.event-hero-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    min-width: 0;
}

.event-title-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.event-title-row h1 {
    font-size: clamp(1.95rem, 4.2vw, 3.75rem);
    letter-spacing: -0.055em;
}

.event-dek {
    max-width: 620px;
    color: var(--muted);
    font-size: 1.03rem;
    line-height: 1.6;
}

.event-quickmeta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    width: 100%;
    margin-top: 2px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.event-quickmeta-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text);
    font-size: 0.86rem;
    font-weight: 600;
}

.event-quickmeta-item .icon {
    color: var(--accent-ink);
}

.event-regional {
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.event-hero-media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--surface-soft);
    box-shadow: var(--shadow-card);
}

.event-hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-hero-zoom {
    display: block;
    width: 100%;
    height: 100%;
    cursor: zoom-in;
}

.event-hero-zoom img {
    transition: transform 0.35s ease;
}

.event-hero-zoom:hover img {
    transform: scale(1.02);
}

.event-hero-zoom:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent);
    outline-offset: -3px;
}

.event-hero-zoom-icon {
    position: absolute;
    right: 14px;
    bottom: 14px;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(23, 19, 16, 0.72);
    color: #fff;
    pointer-events: none;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.event-date-badge {
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 2;
}

.event-date-badge .date-badge-day {
    font-size: 1.85rem;
}

.event-date-badge .date-badge-month {
    font-size: 0.68rem;
}

.event-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(22px, 4vw, 36px);
    overflow: hidden;
    background:
        radial-gradient(circle at 88% 6%, rgba(255, 255, 255, 0.24), transparent 34%),
        radial-gradient(circle at 12% 88%, rgba(64, 18, 9, 0.36), transparent 46%),
        linear-gradient(145deg, #ec7148, #e94f37 54%, #a62f1d);
    color: #fff;
}

.event-placeholder-word {
    position: relative;
    z-index: 1;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.05em;
    opacity: 0.86;
}

.event-placeholder-date {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    gap: 14px;
    line-height: 0.8;
}

.event-placeholder-date strong {
    font-family: var(--font-display);
    font-size: clamp(4.4rem, 10vw, 7.4rem);
    font-weight: 700;
    letter-spacing: -0.08em;
}

.event-placeholder-date span {
    padding-bottom: 10px;
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    opacity: 0.8;
}

.event-placeholder-star {
    position: absolute;
    top: 36%;
    right: 10px;
    color: rgba(255, 255, 255, 0.16);
    font-size: clamp(7rem, 16vw, 13rem);
    line-height: 1;
}

.event-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 370px;
    gap: clamp(28px, 4.5vw, 64px);
    align-items: start;
    padding-top: clamp(28px, 4vw, 44px);
    border-top: 1px solid var(--border);
}

.event-main {
    display: flex;
    flex-direction: column;
    gap: 38px;
    min-width: 0;
}

.section-kicker {
    margin: 0 0 7px;
    color: var(--accent-ink);
    font-size: 0.67rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.event-description h2,
.event-section h2 {
    margin: 0 0 18px;
    font-size: clamp(1.35rem, 2.2vw, 1.65rem);
    letter-spacing: -0.045em;
}

.event-map-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface-soft);
}

.event-map-frame iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.gallery-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    margin-left: 6px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-ink);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0;
    vertical-align: 3px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.gallery-item {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-soft);
}

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

.gallery-item:hover img {
    transform: scale(1.03);
}

.gallery-item:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent);
    outline-offset: 2px;
}

.gallery-zoom {
    position: absolute;
    right: 10px;
    bottom: 10px;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(23, 19, 16, 0.72);
    color: #fff;
    backdrop-filter: blur(6px);
}

/* Просмотр галереи поверх страницы */

.lightbox {
    width: 100vw;
    max-width: none;
    height: 100vh;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(12, 13, 15, 0.94);
    color: #fff;
    overflow: hidden;
}

.lightbox::backdrop {
    background: rgba(12, 13, 15, 0.9);
}

.lightbox[open] {
    display: grid;
    place-items: center;
}

body:has(.lightbox[open]) {
    overflow: hidden;
}

.lightbox-stage {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(56px, 6vw, 72px) clamp(60px, 8vw, 120px);
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.lightbox-button {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: background 0.2s ease;
}

.lightbox-button:hover {
    background: rgba(255, 255, 255, 0.26);
}

.lightbox-button:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.75);
    outline-offset: 2px;
}

.lightbox-button svg {
    width: 22px;
    height: 22px;
}

.lightbox-button[hidden] {
    display: none;
}

.lightbox-close {
    position: absolute;
    top: clamp(12px, 2.4vw, 24px);
    right: clamp(12px, 2.4vw, 24px);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-prev {
    left: clamp(12px, 2.4vw, 24px);
}

.lightbox-next {
    right: clamp(12px, 2.4vw, 24px);
}

.lightbox-counter {
    position: absolute;
    bottom: clamp(14px, 2.4vw, 26px);
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.82rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
}

@media (max-width: 600px) {
    .lightbox-stage {
        padding: 64px 14px 56px;
    }

    .lightbox-nav {
        top: auto;
        bottom: 12px;
        transform: none;
    }

    .lightbox-prev {
        left: 14px;
    }

    .lightbox-next {
        right: 14px;
    }
}

.text {
    color: var(--text);
    font-size: 1rem;
    line-height: 1.78;
    overflow-wrap: anywhere;
}

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

.detail-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

a.detail-row:hover {
    border-color: color-mix(in srgb, var(--accent) 38%, var(--border));
    background: var(--surface);
    color: var(--text);
    transform: translateX(2px);
}

.detail-row-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent-ink);
}

.detail-row-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.detail-row-title {
    font-size: 0.91rem;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.detail-row-note {
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

a.detail-row > .icon:last-child {
    color: var(--muted);
}

.event-aside {
    position: sticky;
    top: calc(var(--header-h) + 20px);
}

.booking-card {
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.booking-kicker {
    margin-bottom: 14px;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.facts {
    margin: 0;
}

.fact {
    padding: 12px 0;
    border-top: 1px solid var(--border);
}

.fact:first-child {
    padding-top: 0;
    border-top: 0;
}

.fact dt {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.fact dt .icon {
    color: var(--accent-ink);
}

.fact dd {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 650;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.fact-sub {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.79rem;
    font-weight: 400;
}

.booking-going {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.82rem;
}

.booking-going .icon {
    color: var(--accent-ink);
}

.booking-going strong {
    color: var(--text);
}

.booking-card .card-actions {
    flex-direction: column;
    gap: 8px;
    margin-top: 14px;
    padding-top: 0;
    border-top: 0;
}

.booking-card .inline-form {
    width: 100%;
}

.booking-card .card-actions .action-btn {
    justify-content: center;
    width: 100%;
    min-height: 46px;
    padding: 11px 16px;
    font-size: 0.88rem;
}

.booking-card .card-actions .action-btn .icon {
    width: 17px;
    height: 17px;
}

.booking-card .action-btn-going {
    border-color: var(--accent-fill);
    background: var(--accent-fill);
    color: var(--on-accent-fill);
}

.booking-card .action-btn-going:hover {
    border-color: var(--accent-fill-hover);
    background: var(--accent-fill-hover);
    color: var(--on-accent-fill);
}

.booking-card .action-btn-going.is-active {
    border-color: var(--success);
    background: var(--success);
    color: #fff;
}

.booking-card .action-btn-going.is-active .count {
    background: rgba(255, 255, 255, 0.22);
}

.booking-note {
    margin-top: 14px;
    color: var(--muted);
    font-size: 0.73rem;
    line-height: 1.5;
}

.event-related {
    margin-top: clamp(48px, 7vw, 76px);
    padding-top: clamp(26px, 4vw, 40px);
    border-top: 1px solid var(--border);
}

.event-related .results-head {
    margin-top: 0;
}

/* Аккаунт */

.account-hero {
    position: relative;
    display: flex;
    align-items: center;
    gap: 22px;
    margin: 16px 0 28px;
    padding: clamp(24px, 4vw, 40px);
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.account-hero::after {
    content: "✳";
    position: absolute;
    right: -6px;
    bottom: -52px;
    color: var(--accent-soft);
    font-size: 11rem;
    line-height: 1;
    pointer-events: none;
}

.account-hero > * {
    position: relative;
    z-index: 1;
}

.account-avatar {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    flex: 0 0 auto;
    border-radius: 22px;
    background: var(--accent-fill);
    color: var(--on-accent-fill);
    font-size: 2.1rem;
    box-shadow: 0 14px 30px -18px color-mix(in srgb, var(--accent) 90%, transparent);
}

.account-hero h1 {
    margin: 2px 0 6px;
    font-size: clamp(1.7rem, 3.6vw, 2.6rem);
    letter-spacing: -0.045em;
}

.account-hero .lead {
    margin: 0;
}

.account-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.account-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 176px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

a.account-card:hover {
    border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
    color: var(--text);
    transform: translateY(-3px);
    box-shadow: var(--shadow-soft);
}

.account-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: auto;
}

.account-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent-ink);
}

.account-arrow {
    color: var(--muted);
}

.account-value {
    font-family: var(--font-display);
    font-size: 2.35rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.06em;
}

.account-value-date {
    font-size: 1.55rem;
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
}

.account-label {
    color: var(--muted);
    font-size: 0.82rem;
}

.account-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    padding: 26px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface-soft);
}

.account-panel h2 {
    margin-bottom: 6px;
    font-size: 1.4rem;
    letter-spacing: -0.045em;
}

.account-panel-text {
    max-width: 520px;
    color: var(--muted);
    font-size: 0.9rem;
}

.logout-form {
    margin: 0;
}

/* Вход */

.auth-layout {
    display: flex;
    justify-content: center;
    padding: 12px 0 30px;
}

.auth-stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(380px, 460px);
    width: 100%;
    max-width: 1040px;
    min-height: 560px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--surface);
    box-shadow: var(--shadow-card);
}

.auth-aside {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: clamp(28px, 4vw, 48px);
    background: var(--auth-aside-bg);
    color: var(--auth-aside-text);
}

.auth-aside::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 82% 8%, rgba(233, 79, 55, 0.5), transparent 55%),
        radial-gradient(circle at 8% 92%, rgba(233, 79, 55, 0.24), transparent 50%);
}

.auth-aside-top,
.auth-art {
    position: relative;
    z-index: 1;
}

.auth-aside-kicker {
    margin-bottom: 18px;
    color: var(--auth-aside-muted);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.auth-aside-title {
    max-width: 360px;
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3vw, 2.55rem);
    font-weight: 600;
    line-height: 1.06;
    letter-spacing: -0.05em;
    color: var(--auth-aside-text);
}

.auth-aside-note {
    max-width: 310px;
    margin-top: 16px;
    color: var(--auth-aside-muted);
    font-size: 0.88rem;
    line-height: 1.6;
}

.auth-art {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-top: 44px;
}

.auth-art-star {
    color: #ff7a63;
    font-size: 4rem;
    line-height: 1;
}

.auth-art-circle {
    width: 84px;
    height: 84px;
    border: 1px solid color-mix(in srgb, var(--auth-aside-text) 26%, transparent);
    border-radius: 50%;
}

.auth-art-word {
    align-self: flex-start;
    color: var(--auth-aside-muted);
    font-family: var(--font-display);
    font-size: 0.95rem;
    letter-spacing: -0.04em;
}

.auth-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    padding: clamp(28px, 4.5vw, 52px);
    background: var(--surface);
}

.auth-card h1 {
    font-size: clamp(1.65rem, 2.6vw, 2.15rem);
    letter-spacing: -0.045em;
}

.auth-card .lead {
    margin: 0 0 6px;
    font-size: 0.93rem;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 4px;
}

.auth-note {
    color: var(--muted);
    font-size: 0.77rem;
    line-height: 1.5;
}

.auth-note a {
    color: var(--accent-ink);
    font-weight: 600;
}

/* Подтверждение номера через Auth4App */

.auth-phone {
    white-space: nowrap;
}

.auth-code-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-soft);
}

.auth-code-value {
    font-family: var(--font-display);
    font-size: clamp(1.55rem, 3vw, 2rem);
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.16em;
    font-variant-numeric: tabular-nums;
}

.auth-copy {
    flex: 0 0 auto;
    padding: 8px 12px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--accent-ink);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.auth-copy:hover {
    background: var(--accent-soft);
}

.auth-copy:focus-visible {
    outline: 2px solid var(--accent-ink);
    outline-offset: 2px;
}

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

.auth-messenger {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.auth-messenger:hover {
    border-color: var(--border-strong);
    background: var(--surface-soft);
    color: var(--text);
}

.auth-messenger img {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    object-fit: contain;
}

.auth-other-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.auth-other-link {
    display: inline-flex;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--text);
    font-size: 0.84rem;
    text-decoration: none;
}

.auth-other-link:hover {
    color: var(--accent-ink);
}

.auth-qr-block {
    padding-top: 12px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.85rem;
}

.auth-qr-block summary {
    color: var(--text);
    font-weight: 500;
    cursor: pointer;
}

.auth-qr {
    width: 168px;
    margin: 14px auto 10px;
    padding: 8px;
    border-radius: 12px;
    background: #fff;
}

.auth-qr svg {
    display: block;
    width: 100%;
    height: auto;
}

.auth-qr-note {
    margin: 0 0 6px;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.5;
    text-align: center;
}

.auth-wait {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 0.85rem;
}

.auth-timer {
    color: var(--text);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.auth-restart-form {
    margin: 0;
}

.code-input {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: 0.5em;
    text-align: center;
}

/* Подвал */

.site-footer {
    margin-top: 40px;
    padding: 58px 0 26px;
    background: var(--footer-bg);
    color: var(--footer-text);
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) repeat(3, minmax(130px, 0.7fr));
    gap: 40px;
}

.footer-brand {
    max-width: 380px;
}

.brand-inverse {
    margin-right: 0;
    color: var(--footer-title);
}

.brand-inverse:hover {
    color: var(--footer-title);
}

.footer-tagline {
    margin-top: 18px;
    color: var(--footer-text);
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-region {
    margin-top: 14px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

.footer-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
}

.footer-title {
    margin-bottom: 4px;
    color: var(--footer-title);
    font-size: 14px;
    font-weight: 600;
}

.footer-col a {
    color: var(--footer-text);
    font-size: 0.88rem;
    text-decoration: none;
}

.footer-col a:hover {
    color: var(--footer-title);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 46px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 13px;
}

/* Адаптивность */

@media (max-width: 1080px) {
    .container {
        padding: 0 40px;
    }

    .event-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .event-layout {
        grid-template-columns: minmax(0, 1fr) 340px;
    }
}

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

@media (max-width: 960px) {
    :root {
        --header-h: 124px;
    }

    .header-inner {
        flex-wrap: wrap;
        row-gap: 10px;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .header-search {
        order: 3;
        flex: 1 0 100%;
        max-width: none;
        margin-right: 0;
    }

    .header-tools {
        margin-left: auto;
    }

    .brand-note {
        display: none;
    }

    .event-hero {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .event-hero-copy {
        max-width: 760px;
    }

    .event-hero-media {
        max-width: 680px;
    }

    .event-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .event-aside {
        position: static;
        order: -1;
    }

    .booking-card {
        max-width: 640px;
    }
}

@media (max-width: 860px) {
    .auth-stage {
        grid-template-columns: 1fr;
        max-width: 540px;
        min-height: 0;
    }

    .auth-aside {
        padding: 28px;
    }

    .auth-art {
        display: none;
    }

    .auth-aside-note {
        max-width: 420px;
    }

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

    .footer-brand {
        grid-column: 1 / -1;
        max-width: 520px;
    }
}

@media (max-width: 760px) {
    .container {
        padding: 0 18px;
    }

    .site-main {
        padding-top: 12px;
        padding-bottom: 56px;
    }

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

    .header-inner {
        gap: 12px;
        min-height: 68px;
    }

    .brand-mark {
        width: 40px;
        height: 40px;
        border-radius: 13px;
    }

    .brand-mark svg {
        width: 20px;
        height: 20px;
    }

    .brand-note {
        display: none;
    }

    .brand-text {
        font-size: 1.05rem;
    }

    .site-nav {
        gap: 1px;
    }

    .nav-link {
        padding: 8px 10px;
        font-size: 0.84rem;
    }

    .nav-login {
        padding: 10px 14px;
        font-size: 0.84rem;
    }

    .nav-login .icon {
        display: none;
    }

    .page-head {
        margin-top: 12px;
    }

    .page-head-with-action {
        align-items: flex-start;
    }

    .feed-head {
        margin-top: 18px;
    }

    .feed-controls {
        width: 100%;
    }

    .event-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .category-nav {
        height: 48px;
        gap: 20px;
    }

    .feed-head {
        margin-top: 28px;
    }

    .feed-controls {
        margin-top: 24px;
    }

    .date-strip {
        gap: 4px;
    }

    .account-hero {
        align-items: flex-start;
        gap: 16px;
        padding: 22px;
    }

    .account-avatar {
        width: 58px;
        height: 58px;
        border-radius: 17px;
        font-size: 1.6rem;
    }

    .account-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .account-card {
        min-height: 142px;
    }

    .account-panel {
        padding: 22px;
    }

    .auth-layout {
        padding-top: 4px;
    }

    .auth-aside {
        padding: 24px;
    }

    .auth-aside-title {
        font-size: 1.45rem;
    }

    .auth-aside-note {
        display: none;
    }

    .auth-card {
        padding: 24px;
    }

    .site-footer {
        padding-top: 44px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px 20px;
    }

    .footer-bottom {
        margin-top: 34px;
        font-size: 0.7rem;
    }
}

@media (max-width: 560px) {
    .header-inner {
        gap: 8px;
        min-height: 64px;
    }

    .brand {
        gap: 9px;
    }

    .brand-mark {
        width: 36px;
        height: 36px;
        border-radius: 12px;
    }

    .brand-mark svg {
        width: 19px;
        height: 19px;
    }

    .brand-text {
        font-size: 0.98rem;
    }

    .nav-link {
        padding: 7px 8px;
        font-size: 0.79rem;
    }

    .nav-link .icon {
        display: none;
    }

    .nav-login {
        padding: 9px 12px;
        font-size: 0.79rem;
    }

    .header-search-submit {
        padding: 0 13px;
        font-size: 0.8rem;
    }

    .city-picker-toggle {
        width: 40px;
        height: 40px;
        padding: 0;
        justify-content: center;
    }

    .city-picker-value,
    .city-picker-toggle > .icon:last-child {
        display: none;
    }

    .city-menu {
        width: min(280px, calc(100vw - 36px));
    }

    .feed-title {
        font-size: clamp(1.5rem, 8vw, 2rem);
    }

    .event-quickmeta {
        flex-direction: column;
        gap: 8px;
    }

    .event-hero-media {
        aspect-ratio: 4 / 3.4;
        border-radius: 24px;
    }

    .event-placeholder-date strong {
        font-size: 4.2rem;
    }

    .event-title-row h1 {
        font-size: clamp(1.75rem, 8vw, 2.4rem);
    }

    .detail-row {
        padding: 12px 13px;
        gap: 11px;
    }

    .detail-row-icon {
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }

    .booking-card {
        padding: 18px;
    }

    .account-hero {
        gap: 14px;
    }

    .account-avatar {
        display: none;
    }

    .auth-aside {
        padding: 22px;
    }

    .auth-aside-kicker {
        margin-bottom: 10px;
    }

    .auth-aside-title {
        font-size: 1.3rem;
    }

    .auth-card {
        padding: 22px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 26px;
    }

    .footer-brand {
        grid-column: auto;
    }

    .footer-col {
        gap: 7px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .event-card:hover {
        transform: none;
    }
}
