:root {
    --bg-base: #fafaf8;
    --bg-surface: #ffffff;
    --bg-surface-strong: #ffffff;
    --text-main: #1a1a1a;
    --text-soft: #4a4a4a;
    --text-muted: #8a8a8a;
    --line-soft: rgba(0, 0, 0, 0.08);
    --line-strong: rgba(0, 0, 0, 0.15);
    --brand: #1a1a1a;
    --brand-hover: #333333;
    --accent: #96793e;
    --success: #166534;
    --warning: #92400e;
    --danger: #991b1b;
    --radius-lg: 12px;
    --radius-md: 8px;
    --shadow-soft: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.09);
}

[data-theme="dark"] {
    --bg-base: #121212;
    --bg-surface: #1e1e1e;
    --bg-surface-strong: #1a1a1a;
    --text-main: #e8e6e3;
    --text-soft: #b0aca6;
    --text-muted: #787470;
    --line-soft: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.15);
    --brand: #e8e6e3;
    --brand-hover: #d0cdc8;
    --accent: #c9a455;
    --success: #4ade80;
    --warning: #fbbf24;
    --danger: #f87171;
    --shadow-soft: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* ─── Dark theme overrides for hardcoded colors ─── */

[data-theme="dark"] .site-alert.success {
    background: rgba(74, 222, 128, 0.1);
    border-color: rgba(74, 222, 128, 0.25);
}

[data-theme="dark"] .site-alert.error,
[data-theme="dark"] .form-error-box {
    background: rgba(248, 113, 113, 0.1);
    border-color: rgba(248, 113, 113, 0.25);
}

[data-theme="dark"] .site-header {
    background: rgba(26, 26, 26, 0.82);
}

[data-theme="dark"] .event-media {
    background: #2a2724;
}

[data-theme="dark"] .event-fallback {
    color: #5a554e;
}

[data-theme="dark"] .ticket-form input[type="text"],
[data-theme="dark"] .ticket-form input[type="email"],
[data-theme="dark"] .ticket-form input[type="number"],
[data-theme="dark"] .ticket-form select,
[data-theme="dark"] .ticket-form textarea,
[data-theme="dark"] .tickets-search-form input[type="email"] {
    background: var(--bg-surface);
}

[data-theme="dark"] .ticket-type-row .ticket-qty-select {
    background-image:
        linear-gradient(45deg, transparent 50%, #787470 50%),
        linear-gradient(135deg, #787470 50%, transparent 50%);
}

[data-theme="dark"] .booking-captcha-image {
    filter: brightness(0.9);
}

[data-theme="dark"] img.event-image {
    filter: brightness(0.92);
}

[data-theme="dark"] .btn-buy {
    background: #e8e6e3;
    color: #121212;
}

[data-theme="dark"] .btn-buy:hover {
    background: #d0cdc8;
    color: #121212;
}

[data-theme="dark"] .btn-buy.btn-muted {
    background: transparent;
    color: var(--text-soft);
}

[data-theme="dark"] .btn-buy.btn-outline {
    background: transparent;
    color: var(--text-main);
}

[data-theme="dark"] .tickets-link {
    background: #e8e6e3;
    color: #121212;
}

[data-theme="dark"] .tickets-link:hover {
    background: #d0cdc8;
    color: #121212;
}

[data-theme="dark"] .logo-emoji {
    background: #e8e6e3;
}

[data-theme="dark"] .logo-emoji-icon {
    filter: brightness(0.9);
}

[data-theme="dark"] .ticket-inline-emoji {
    background: #e8e6e3;
}

[data-theme="dark"] .ticket-inline-emoji-icon {
    color: #121212;
}

/* ─── Theme toggle ─── */

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    border: 1px solid var(--line-soft);
    background: transparent;
    color: var(--text-soft);
    cursor: pointer;
    font-size: 1.1rem;
    transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
    padding: 0;
    line-height: 1;
}

.theme-toggle:hover {
    color: var(--text-main);
    border-color: var(--line-strong);
    background: rgba(128, 128, 128, 0.06);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    display: none;
}

:root .theme-toggle .icon-moon,
[data-theme="light"] .theme-toggle .icon-moon {
    display: inline;
}

[data-theme="dark"] .theme-toggle .icon-sun {
    display: inline;
}

[data-theme="dark"] .theme-toggle .icon-moon {
    display: none;
}

/* ─── Header controls ─── */

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

/* ─── Screen reader only ─── */

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

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    line-height: 1.6;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-base);
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
    font-feature-settings: "kern" 1;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ─── Header ─── */

.site-header {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line-soft);
    position: sticky;
    top: 0;
    z-index: 120;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 72px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-main);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    transition: opacity 0.15s ease;
}

.logo:hover {
    opacity: 0.8;
}

.logo-image {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 8px;
    object-fit: contain;
}

.logo-emoji {
    width: 40px;
    height: 40px;
    min-width: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--brand);
}

.logo-emoji-icon {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    border-radius: inherit;
}

.ticket-inline-icon {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

.ticket-inline-emoji {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 4px;
    background: var(--brand);
}

.ticket-inline-emoji-icon {
    width: 14px;
    height: 14px;
    display: block;
    color: #ffffff;
}

.logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--brand);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

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

/* ─── Header links (phone + tickets) ─── */

.header-links {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.header-phone {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    padding: 0 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--line-soft);
    background: transparent;
    color: var(--text-soft);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.15s ease;
}

.header-phone:hover {
    color: var(--text-main);
}

.tickets-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    padding: 0 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--brand);
    background: var(--brand);
    color: #ffffff;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    transition: background-color 0.15s ease;
}

.tickets-link:hover {
    background: var(--brand-hover);
}

/* legacy .social-links compat */
.social-links {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    padding: 0 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--line-soft);
    background: transparent;
    color: var(--text-soft);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.social-links a:hover {
    color: var(--text-main);
    background: rgba(0, 0, 0, 0.03);
}

.social-links .tickets-link {
    border-color: var(--brand);
    background: var(--brand);
    color: #ffffff;
}

.social-links .tickets-link:hover {
    background: var(--brand-hover);
}

.social-links .logout-btn {
    height: 38px;
    padding: 0 14px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(220, 38, 38, 0.3);
    background: transparent;
    color: var(--danger);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.875rem;
}

.social-links .logout-btn:hover {
    background: rgba(220, 38, 38, 0.05);
}

/* ─── Locale switch ─── */

.locale-switch {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 4px;
}

.locale-switch a {
    min-width: 42px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid var(--line-soft);
    background: transparent;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.locale-switch a:hover {
    color: var(--text-soft);
    border-color: var(--line-strong);
}

.locale-switch a.is-active {
    color: var(--text-main);
    border-color: var(--brand);
    background: rgba(0, 0, 0, 0.03);
}

/* ─── Main ─── */

main {
    padding-top: 8px;
    padding-bottom: 56px;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.25;
    letter-spacing: -0.01em;
}

/* ─── Alerts ─── */

.site-alert {
    border-radius: var(--radius-md);
    padding: 14px 18px;
    margin: 16px 0;
    text-align: center;
    border: 1px solid transparent;
    font-size: 0.9375rem;
}

.site-alert.success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: var(--success);
}

.site-alert.error {
    background: #fef2f2;
    border-color: #fecaca;
    color: var(--danger);
}

/* ─── UI Components ─── */

.ui-card {
    background: var(--bg-surface);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.ui-note {
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.5;
}

.ui-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    border: 1px solid var(--line-soft);
    background: var(--bg-base);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
}

/* ─── Summary grid ─── */

.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.summary-grid.booking-summary {
    margin: 0 0 14px;
}

.summary-item {
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-md);
    background: var(--bg-base);
    padding: 12px 14px;
}

.summary-item span {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.summary-item strong {
    display: block;
    margin-top: 4px;
    font-size: 1.125rem;
    color: var(--text-main);
}

/* ─── Buttons ─── */

.btn-buy {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    border-radius: var(--radius-md);
    border: none;
    background: var(--brand);
    color: #ffffff;
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 600;
    padding: 10px 20px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.btn-buy:hover {
    background: var(--brand-hover);
}

.btn-buy.btn-muted {
    border: 1px solid var(--line-strong);
    background: transparent;
    color: var(--text-soft);
}

.btn-buy.btn-muted:hover {
    color: var(--text-main);
    background: rgba(0, 0, 0, 0.03);
}

.btn-buy.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--line-strong);
}

.btn-buy.btn-outline:hover {
    background: rgba(0, 0, 0, 0.03);
}

.btn-buy.btn-social {
    min-height: 38px;
    font-size: 0.875rem;
    padding: 8px 14px;
}

.btn-buy:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* ─── Hero ─── */

.home-hero {
    margin: 40px 0 32px;
    text-align: center;
    padding: 48px 24px 36px;
}

.home-hero__inner {
    max-width: 720px;
    margin: 0 auto;
}

.home-hero__title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 12px;
    color: var(--text-main);
}

.home-hero__subtitle {
    font-size: clamp(1rem, 2.2vw, 1.15rem);
    color: var(--text-soft);
    max-width: 580px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ─── Home summary (legacy) ─── */

.home-summary {
    max-width: 720px;
    margin: 0 auto 22px;
    grid-template-columns: 1fr;
}

.home-socials {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 4px 0 26px;
}

/* ─── Pagination ─── */

.pagination-wrap {
    margin-top: 28px;
    display: flex;
    justify-content: center;
}

/* ─── Events grid ─── */

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

.event-card {
    background: var(--bg-surface);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-soft);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

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

.event-media {
    height: 210px;
    position: relative;
    background: #f0ede8;
    display: block;
    text-decoration: none;
    color: inherit;
}

a.event-media {
    display: block;
    text-decoration: none;
    color: inherit;
}

.event-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 65%, rgba(0, 0, 0, 0.04) 100%);
}

.event-fallback {
    width: 100%;
    height: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #bbb5a8;
}

.event-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px;
    flex: 1;
}

.event-date {
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.event-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

.event-title a {
    color: inherit;
    text-decoration: none;
}

.event-title a:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.event-location {
    color: var(--text-soft);
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.event-description {
    color: var(--text-soft);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-top: 2px;
}

.event-price-tag {
    margin-top: 2px;
    color: var(--accent);
    font-size: 1.05rem;
    font-weight: 700;
}

.event-type-preview {
    color: var(--text-soft);
    font-size: 0.875rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
}

.event-actions {
    margin-top: auto;
    padding-top: 6px;
}

.no-events {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line-soft);
    background: var(--bg-surface);
}

.no-events h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.no-events p {
    color: var(--text-muted);
}

/* ─── Features section ─── */

.home-features {
    margin-top: 72px;
}

.home-features__title {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.home-features__subtitle {
    color: var(--text-muted);
    text-align: center;
    max-width: 600px;
    margin: 0 auto 28px;
    font-size: 0.9375rem;
}

.home-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.home-feature-card {
    border-radius: var(--radius-lg);
    border: 1px solid var(--line-soft);
    background: var(--bg-surface);
    padding: 24px 20px;
    transition: box-shadow 0.2s ease;
}

.home-feature-card:hover {
    box-shadow: var(--shadow-soft);
}

.home-feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--bg-base);
    color: var(--text-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    margin-bottom: 14px;
}

.home-feature-icon .ticket-inline-icon {
    width: 22px;
    height: 22px;
    border-radius: 5px;
}

.home-feature-icon .ticket-inline-emoji {
    width: 22px;
    height: 22px;
}

.home-feature-icon .ticket-inline-emoji-icon {
    width: 18px;
    height: 18px;
}

.home-feature-card h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.home-feature-card p {
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* ─── Event detail ─── */

.event-detail-wrap {
    max-width: 980px;
    margin: 28px auto 70px;
}

.event-detail-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 20px;
    align-items: start;
}

.event-info-card,
.booking-panel,
.recent-tickets-card {
    background: var(--bg-surface);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.event-info-card {
    overflow: hidden;
}

.event-info-card__image {
    width: 100%;
    height: 280px;
    object-fit: cover;
}

.event-info-card__body {
    padding: 20px;
}

.event-info-card__title {
    font-size: clamp(1.5rem, 4vw, 1.85rem);
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.015em;
}

.event-info-card__desc {
    color: var(--text-soft);
    margin-bottom: 14px;
    line-height: 1.6;
}

.event-info-card__meta {
    color: var(--text-soft);
    margin-bottom: 6px;
    font-size: 0.9375rem;
}

.event-info-card__meta i {
    color: var(--text-muted);
    width: 18px;
}

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

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

/* ─── Booking panel ─── */

.booking-panel {
    position: sticky;
    top: 88px;
    padding: 20px;
}

.booking-title {
    margin-bottom: 14px;
    font-size: 1.15rem;
    font-weight: 600;
}

.booking-summary-note {
    margin-bottom: 12px;
}

.booking-fields-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ticket-form input[type="text"],
.ticket-form input[type="email"],
.ticket-form input[type="number"],
.ticket-form select,
.ticket-form textarea,
.tickets-search-form input[type="email"] {
    width: 100%;
    min-height: 44px;
    border-radius: var(--radius-md);
    border: 1px solid var(--line-strong);
    background: #ffffff;
    color: var(--text-main);
    padding: 10px 14px;
    font-size: 0.9375rem;
    transition: border-color 0.15s ease;
}

.ticket-form input:focus,
.ticket-form select:focus,
.ticket-form textarea:focus,
.tickets-search-form input:focus {
    outline: none;
    border-color: var(--brand);
}

.ticket-form input::placeholder,
.tickets-search-form input::placeholder {
    color: var(--text-muted);
}

.booking-divider {
    border: 0;
    border-top: 1px solid var(--line-soft);
    margin: 16px 0;
}

.booking-section-title {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.ticket-type-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.ticket-type-note {
    font-size: 0.875rem;
    color: var(--text-muted);
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: baseline;
}

.ticket-type-price {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
}

.ticket-type-stock {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.ticket-type-row .ticket-qty-select {
    width: 88px;
    min-width: 88px;
    text-align: center;
    text-align-last: center;
    font-weight: 600;
    padding-right: 28px;
    appearance: none;
    -webkit-appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, #94a3b8 50%),
        linear-gradient(135deg, #94a3b8 50%, transparent 50%);
    background-position:
        calc(100% - 16px) calc(50% - 3px),
        calc(100% - 11px) calc(50% - 3px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

.ticket-type-row .ticket-qty-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.booking-mobile-total {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    padding: 10px 14px;
    margin-bottom: 14px;
    font-size: 0.875rem;
    box-shadow: var(--shadow-md);
}

.booking-section {
    margin-bottom: 16px;
}

.booking-payment-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.875rem;
    font-weight: 500;
}

.booking-payment-grid {
    display: grid;
    gap: 8px;
}

.booking-payment-option {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    cursor: pointer;
    transition: border-color 0.15s ease;
}

.booking-payment-option:hover {
    border-color: var(--line-strong);
}

.booking-captcha-wrap {
    margin-bottom: 16px;
}

.booking-captcha-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.875rem;
    font-weight: 500;
}

.booking-captcha-image-wrap {
    margin-bottom: 8px;
}

.booking-captcha-image {
    width: 100%;
    max-width: 220px;
    height: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--line-soft);
}

.booking-captcha-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

.booking-captcha-grid input[name="captcha_answer"] {
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

.booking-captcha-refresh {
    width: auto;
    padding: 10px 14px;
}

.booking-submit {
    width: 100%;
}

.pending-note {
    margin: 0;
    color: var(--warning);
    font-size: 0.9375rem;
}

/* ─── Recent tickets card ─── */

.recent-tickets-card {
    max-width: 980px;
    margin: -24px auto 60px;
    padding: 20px;
}

.recent-tickets-card h4 {
    margin-bottom: 12px;
    font-weight: 600;
}

.recent-tickets-list {
    display: grid;
    gap: 8px;
}

.recent-tickets-list a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.recent-tickets-list a:hover {
    text-decoration: underline;
}

/* ─── My Tickets page ─── */

.tickets-page {
    max-width: 980px;
    margin: 28px auto 70px;
}

.tickets-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.tickets-page-title {
    font-size: clamp(1.6rem, 4vw, 1.85rem);
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.015em;
}

.tickets-help-note {
    margin: 0 0 14px;
}

.tickets-error {
    color: var(--danger);
    margin-top: 8px;
    font-size: 0.875rem;
}

.tickets-empty-card {
    padding: 28px;
}

.tickets-empty-title {
    margin: 0 0 8px;
    font-weight: 600;
}

.tickets-empty-text {
    margin: 0;
}

.tickets-search-card {
    padding: 20px;
    margin-bottom: 16px;
}

.tickets-search-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

.ticket-order-grid {
    display: grid;
    gap: 14px;
}

.ticket-order-card {
    padding: 20px;
}

.ticket-order-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.ticket-order-number {
    margin: 0 0 4px;
    font-weight: 600;
}

.ticket-order-event {
    color: var(--text-soft);
}

.ticket-order-date {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.ticket-order-meta {
    text-align: right;
    min-width: 200px;
}

.ticket-order-total {
    font-weight: 700;
    font-size: 1.05rem;
}

.ticket-order-method {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.ticket-order-divider {
    border: 0;
    border-top: 1px solid var(--line-soft);
    margin: 14px 0;
}

.ticket-order-status {
    font-size: 0.75rem;
    margin-top: 6px;
}

.tickets-pager {
    margin-top: 20px;
}

.ticket-issued-list {
    display: grid;
    gap: 8px;
}

.ticket-issued-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.ticket-issued-type {
    color: var(--text-muted);
}

/* ─── Footer ─── */

.site-footer {
    margin-top: 80px;
    border-top: 1px solid var(--line-soft);
    background: var(--bg-surface-strong);
}

.site-footer__content {
    text-align: center;
    padding: 32px 0;
}

.site-footer__rights {
    margin-bottom: 16px;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.footer-contacts {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 0.875rem;
}

.footer-phone,
.footer-email {
    color: var(--text-soft);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    transition: color 0.15s ease;
}

.footer-phone:hover,
.footer-email:hover {
    color: var(--text-main);
}

.footer-socials {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.footer-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--line-soft);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.footer-social-icon:hover {
    color: var(--text-main);
    border-color: var(--line-strong);
    background: rgba(0, 0, 0, 0.03);
}

/* legacy footer-links compat */
.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.875rem;
}

.footer-links a {
    color: var(--text-soft);
    text-decoration: none;
    font-weight: 500;
}

.footer-links a:hover {
    color: var(--text-main);
}

.footer-separator {
    color: var(--line-strong);
}

/* ─── Form error ─── */

.form-error-box {
    text-align: left;
    margin-bottom: 14px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--danger);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    font-size: 0.9375rem;
}

/* ─── Responsive ─── */

@media (max-width: 1024px) {
    .events-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

    .event-detail-layout {
        grid-template-columns: 1fr;
    }

    .booking-panel {
        position: static;
    }
}

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

    .logo-image {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }

    .logo-emoji {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }

    .logo-emoji-icon {
        width: 100%;
        height: 100%;
    }
}

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

    .header-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .logo {
        justify-content: center;
    }

    .header-actions {
        justify-content: center;
    }

    .header-controls {
        justify-content: center;
    }

    .locale-switch {
        width: auto;
        justify-content: center;
        margin-right: 0;
    }

    .locale-switch a {
        flex: none;
        max-width: none;
    }

    .header-links {
        width: 100%;
        justify-content: center;
    }

    .social-links {
        width: 100%;
        justify-content: center;
    }

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

    .summary-grid.booking-summary {
        display: none;
    }

    .home-hero {
        padding: 36px 16px 28px;
        margin: 24px 0;
    }

    .home-features {
        margin-top: 48px;
    }

    .home-feature-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .home-feature-card {
        padding: 16px 14px;
    }

    .home-feature-icon {
        width: 36px;
        height: 36px;
        border-radius: 8px;
        font-size: 1rem;
        margin-bottom: 10px;
    }

    .home-feature-icon .ticket-inline-emoji {
        width: 18px;
        height: 18px;
    }

    .home-feature-icon .ticket-inline-emoji-icon {
        width: 14px;
        height: 14px;
    }

    .home-feature-card h4 {
        font-size: 0.875rem;
        margin-bottom: 4px;
    }

    .home-feature-card p {
        font-size: 0.8125rem;
        line-height: 1.4;
    }

    .booking-fields-grid {
        grid-template-columns: 1fr;
    }

    .ticket-type-row {
        grid-template-columns: 1fr auto;
        gap: 10px;
    }

    .ticket-type-row .ui-badge {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .booking-mobile-total {
        display: flex;
        position: sticky;
        bottom: 8px;
        z-index: 10;
    }

    .tickets-page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .tickets-page-header .btn-buy {
        width: 100%;
    }

    .tickets-search-form {
        grid-template-columns: 1fr;
    }

    .tickets-search-form .btn-buy {
        width: 100%;
    }

    .ticket-order-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .ticket-order-meta {
        width: 100%;
        min-width: 0;
        text-align: left;
    }

    .footer-contacts {
        flex-direction: column;
        gap: 8px;
    }

    .footer-links {
        flex-direction: column;
        gap: 8px;
    }

    .footer-separator {
        display: none;
    }
}

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

    .event-media {
        height: 190px;
    }

    .event-title {
        font-size: 1.1rem;
    }

    .btn-buy {
        padding: 10px 16px;
    }

    .home-feature-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .home-feature-card {
        padding: 14px 10px;
    }

    .home-feature-card h4 {
        font-size: 0.8125rem;
    }

    .home-feature-card p {
        font-size: 0.75rem;
    }
}

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