/* Аварийный экран из HTML: виден только если styles.css не загрузился */
#meethub-boot-fail.meethub-boot-fail,
.meethub-boot-fail {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

@font-face {
  font-family: "AKONY";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/akony.woff?v=tg27") format("woff");
}

/* Manrope локально — Google Fonts в Telegram WebView часто не грузится */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/manrope/manrope-cyrillic-400.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/manrope/manrope-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/manrope/manrope-cyrillic-500.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/manrope/manrope-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/manrope/manrope-cyrillic-600.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/manrope/manrope-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/manrope/manrope-cyrillic-700.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/manrope/manrope-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/fonts/manrope/manrope-cyrillic-800.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/fonts/manrope/manrope-latin-800.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root,
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #09090b;
  --bg-soft: #111113;
  --card: #141416;
  --card-border: #27272a;
  --text: #fafafa;
  --muted: #a1a1aa;
  --accent: #0f766e;
  --accent-fg: #ecfdf8;
  --brand-accent: #2dd4bf;
  --accent-2: #71717a;
  --accent-3: #52525b;
  --danger: #f87171;
  --qr-glow: rgba(15, 118, 110, 0.18);
  --scan-frame: #14b8a6;
  --surface-raised: #18181b;
  --surface-border: #27272a;
  --surface-hover-border: #3f3f46;
  --input-bg: #0f0f11;
  --input-border: #3f3f46;
  --input-placeholder: #71717a;
  --topbar-bg: rgba(9, 9, 11, 0.92);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.45);
  --glow-1-color: transparent;
  --glow-2-color: transparent;
  --glow-opacity: 0;
  --noise-opacity: 0;
  --hero-art-bg: #18181b;
  --accent-soft: rgba(15, 118, 110, 0.16);
  --accent-border: rgba(20, 184, 166, 0.32);
  --accent-border-strong: rgba(20, 184, 166, 0.48);
  --accent-hover-bg: rgba(15, 118, 110, 0.22);
  --accent-glow: rgba(15, 118, 110, 0.14);
  --inset-bg: rgba(255, 255, 255, 0.03);
  --inset-bg-strong: rgba(0, 0, 0, 0.28);
  --inset-border: rgba(255, 255, 255, 0.08);
  --cover-gradient: linear-gradient(145deg, #18181b, #27272a);
  --drawer-bg: #18181b;
  --backdrop: rgba(0, 0, 0, 0.55);
  --font-display: "AKONY", "Manrope", system-ui, sans-serif;
  --radius-card: 14px;
  --radius-control: 10px;
  --pill-radius: 10px;
  --pill-min-h: 38px;
  --pill-pad-y: 8px;
  --pill-pad-x: 12px;
  --pill-fw: 600;
  --pill-fs: 13px;
  --pill-muted: var(--muted);
  --pill-ghost-border: var(--card-border);
  --pill-ghost-bg: transparent;
  --pill-hover-fg: var(--text);
  --pill-hover-border: #3f3f46;
  --pill-hover-bg: #1c1c1f;
  --pill-active-fg: var(--text);
  --pill-active-border: #3f3f46;
  --pill-active-bg: #27272a;
  --tg-safe-top: 0px;
  --tg-safe-right: 0px;
  --tg-safe-bottom: 0px;
  --tg-safe-left: 0px;
  --tg-content-safe-top: 0px;
  --tg-content-safe-right: 0px;
  --tg-content-safe-bottom: 0px;
  --tg-content-safe-left: 0px;
  /* Система (notch) и chrome Telegram складываются, не max — иначе лого выше «Закрыть» */
  --meethub-system-top: max(
    env(safe-area-inset-top, 0px),
    var(--tg-safe-top),
    var(--tg-safe-area-inset-top, 0px)
  );
  --meethub-system-bottom: max(
    env(safe-area-inset-bottom, 0px),
    var(--tg-safe-bottom),
    var(--tg-safe-area-inset-bottom, 0px)
  );
  --meethub-system-left: max(
    env(safe-area-inset-left, 0px),
    var(--tg-safe-left),
    var(--tg-safe-area-inset-left, 0px)
  );
  --meethub-system-right: max(
    env(safe-area-inset-right, 0px),
    var(--tg-safe-right),
    var(--tg-safe-area-inset-right, 0px)
  );
  --meethub-tg-chrome-top: max(
    var(--tg-content-safe-top),
    var(--tg-content-safe-area-inset-top, 0px)
  );
  --meethub-tg-chrome-bottom: max(
    var(--tg-content-safe-bottom),
    var(--tg-content-safe-area-inset-bottom, 0px)
  );
  --meethub-tg-chrome-left: max(
    var(--tg-content-safe-left),
    var(--tg-content-safe-area-inset-left, 0px)
  );
  --meethub-tg-chrome-right: max(
    var(--tg-content-safe-right),
    var(--tg-content-safe-area-inset-right, 0px)
  );
  --meethub-safe-top: calc(var(--meethub-system-top) + var(--meethub-tg-chrome-top));
  --meethub-safe-bottom: calc(var(--meethub-system-bottom) + var(--meethub-tg-chrome-bottom));
  --meethub-safe-left: calc(var(--meethub-system-left) + var(--meethub-tg-chrome-left));
  --meethub-safe-right: calc(var(--meethub-system-right) + var(--meethub-tg-chrome-right));
}

/* Админка и орг-панель — UI Manrope; заголовки intro — display */
body[data-page="admin"],
body[data-page^="organizer"] {
  --font-display: "AKONY", "Manrope", system-ui, sans-serif;
}

body[data-page="admin"] .brand-badge,
body[data-page^="organizer"] .brand-badge,
body[data-page="admin"] .card h2,
body[data-page^="organizer"] .card h2:not(.organizer-page-title),
body[data-page^="organizer"] .organizer-hub-tile h3 {
  text-transform: none;
  letter-spacing: -0.015em;
  font-weight: 800;
  font-family: "Manrope", system-ui, sans-serif;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f4f5;
  --bg-soft: #e4e4e7;
  --card: #ffffff;
  --card-border: #e4e4e7;
  --text: #18181b;
  --muted: #71717a;
  --accent: #0f766e;
  --accent-fg: #ffffff;
  --brand-accent: #0d9488;
  --accent-2: #a1a1aa;
  --accent-3: #71717a;
  --danger: #dc2626;
  --qr-glow: rgba(15, 118, 110, 0.12);
  --scan-frame: #0f766e;
  --surface-raised: #ffffff;
  --surface-border: #e4e4e7;
  --surface-hover-border: #d4d4d8;
  --input-bg: #ffffff;
  --input-border: #d4d4d8;
  --input-placeholder: #a1a1aa;
  --topbar-bg: rgba(255, 255, 255, 0.92);
  --shadow-sm: 0 1px 2px rgba(24, 24, 27, 0.06);
  --shadow-md: 0 4px 16px rgba(24, 24, 27, 0.08);
  --shadow-lg: 0 12px 32px rgba(24, 24, 27, 0.1);
  --glow-1-color: transparent;
  --glow-2-color: transparent;
  --glow-opacity: 0;
  --noise-opacity: 0;
  --hero-art-bg: #f4f4f5;
  --accent-soft: rgba(15, 118, 110, 0.08);
  --accent-border: rgba(15, 118, 110, 0.24);
  --accent-border-strong: rgba(15, 118, 110, 0.38);
  --accent-hover-bg: rgba(15, 118, 110, 0.12);
  --accent-glow: rgba(15, 118, 110, 0.1);
  --inset-bg: #f4f4f5;
  --inset-bg-strong: #ececef;
  --inset-border: #e4e4e7;
  --cover-gradient: linear-gradient(145deg, #e4e4e7, #d4d4d8);
  --drawer-bg: #ffffff;
  --backdrop: rgba(24, 24, 27, 0.35);
  --pill-ghost-border: var(--card-border);
  --pill-hover-bg: #f4f4f5;
  --pill-active-fg: var(--text);
  --pill-active-border: #d4d4d8;
  --pill-active-bg: #ffffff;
}

html.theme-transition,
html.theme-transition * {
  transition:
    background-color 0.22s ease,
    border-color 0.22s ease,
    color 0.18s ease,
    box-shadow 0.22s ease !important;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--text);
  font-family: "Manrope", system-ui, sans-serif;
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
}

.bg-noise,
.glow {
  display: none !important;
}

.bg-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.04) 0.5px, transparent 0.5px);
  background-size: 2px 2px;
  opacity: var(--noise-opacity);
  z-index: 0;
}

.glow {
  position: fixed;
  filter: blur(70px);
  z-index: 0;
  pointer-events: none;
  opacity: var(--glow-opacity);
}

.glow-1 {
  width: 360px;
  height: 360px;
  background: var(--glow-1-color);
  top: 10%;
  left: -120px;
  animation: drift 8s ease-in-out infinite alternate;
}

.glow-2 {
  width: 300px;
  height: 300px;
  background: var(--glow-2-color);
  top: 45%;
  right: -80px;
  animation: drift 9s ease-in-out infinite alternate-reverse;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 120;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: max(16px, var(--meethub-safe-top)) 28px 16px 28px;
  border-bottom: 1px solid var(--card-border);
  background: var(--topbar-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  overflow: visible;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  max-width: 28ch;
  line-height: 1.35;
}

.brand-badge {
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
  text-transform: uppercase;
  text-decoration: none;
  display: inline-block;
  width: fit-content;
  cursor: pointer;
}

a.brand-badge:link,
a.brand-badge:visited,
a.brand-badge:hover,
a.brand-badge:active {
  color: var(--text);
  text-decoration: none;
}

.brand-badge span {
  color: var(--brand-accent);
}

.scanner-confirm-kicker span {
  color: var(--brand-accent);
}

.topbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  overflow: visible;
  position: relative;
  z-index: 2;
}

.profile-btn {
  gap: 8px;
  max-width: 260px;
}

.profile-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.profile-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.08);
}

.profile-name {
  max-width: 148px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-caret {
  color: var(--muted);
  font-size: 11px;
}

.profile-role {
  border: 1px solid var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}

.desktop-nav {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: var(--bg-soft);
}

/* TMA: fallback высоты ряда «Закрыть / •••», пока SDK не отдал contentSafeArea */
body.meethub-tg-miniapp {
  --meethub-tg-chrome-top: max(
    var(--tg-content-safe-top),
    var(--tg-content-safe-area-inset-top, 0px),
    48px
  );
}

/*
 * Telegram Mini App: одна шапка = notch + ряд системных кнопок TG.
 * Лого центрируется в том же ряду, что «Закрыть» и меню.
 */
body.meethub-tg-miniapp .topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  justify-items: center;
  gap: 0;
  justify-content: stretch;
  box-sizing: border-box;
  /* сверху только system safe; высота ряда кнопок — content chrome */
  padding-top: var(--meethub-system-top);
  padding-bottom: 0;
  min-height: calc(var(--meethub-system-top) + var(--meethub-tg-chrome-top));
}

body.meethub-tg-miniapp .topbar .brand {
  grid-column: 1;
  justify-self: center;
  align-self: center;
  text-align: center;
  min-width: 0;
  max-width: none;
  margin: 0;
  /* держим лого в полосе TG-кнопок, не уезжает к Dynamic Island */
  height: var(--meethub-tg-chrome-top);
  display: flex;
  align-items: center;
  justify-content: center;
}

body.meethub-tg-miniapp .topbar .brand-badge {
  font-size: 16px;
  letter-spacing: 0.02em;
  line-height: 1.15;
}

body.meethub-tg-miniapp .topbar .brand > p {
  display: none;
}

body.meethub-tg-miniapp .topbar .desktop-nav,
body.meethub-tg-miniapp .topbar .topbar-actions,
body.meethub-tg-miniapp .topbar > .theme-menu-wrap {
  display: none !important;
}

/* Блок профиля в drawer (☰), только в TMA */
.meethub-drawer-profile {
  margin: 0 0 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.meethub-drawer-profile.hidden {
  display: none !important;
}

.meethub-drawer-profile-label {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.meethub-drawer-profile-user {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.meethub-drawer-profile-user .profile-avatar,
.meethub-drawer-profile-user .profile-avatar-fallback {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  font-size: 14px;
}

.meethub-drawer-profile-names {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  min-width: 0;
}

.meethub-drawer-profile-name {
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.meethub-drawer-profile-id {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
  word-break: break-all;
}

.meethub-drawer-profile-id code {
  font-family: ui-monospace, monospace;
  font-size: 10px;
  color: rgba(236, 244, 255, 0.85);
}

.meethub-drawer-profile .meethub-drawer-copy-id,
.meethub-drawer-profile .meethub-drawer-logout {
  width: 100%;
  min-width: 0;
  justify-content: center;
}

/* Базовые пилюли: сабнав, топбар, табы, .btn */
.btn,
.btn:link,
.nav-link,
a.nav-link,
.organizer-subnav-link,
.mobile-drawer-links a,
.mobile-tab,
.organizer-tab,
.organizer-passes-tab,
.auth-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: var(--pill-min-h);
  padding: var(--pill-pad-y) var(--pill-pad-x);
  border-radius: var(--pill-radius);
  border: 1px solid var(--pill-ghost-border);
  background: var(--pill-ghost-bg);
  color: var(--pill-muted);
  font-family: inherit;
  font-size: var(--pill-fs);
  font-weight: var(--pill-fw);
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    color 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

.nav-link {
  min-width: 96px;
  gap: 6px;
}

.nav-ico {
  display: inline-flex;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  align-items: center;
  justify-content: center;
  opacity: 0.88;
}

.nav-ico-svg {
  display: block;
  width: 16px;
  height: 16px;
}

.nav-label {
  display: inline-block;
  line-height: 1.1;
}

.nav-link.active .nav-ico,
.mobile-tab.active .nav-ico {
  opacity: 1;
}

.mobile-tab,
.mobile-drawer-links a,
.organizer-subnav-link {
  gap: 6px;
}

.desktop-nav .nav-link {
  padding-left: 10px;
  padding-right: 10px;
}

a.nav-link,
a.nav-link:visited,
a.nav-link:hover,
a.nav-link:active {
  text-decoration: none;
}

.btn {
  width: auto;
  min-width: 140px;
}

.organizer-subnav-link:hover,
.nav-link:not(.active):hover,
.mobile-drawer-links a:hover,
.mobile-tab:not(.active):hover,
.organizer-tab:not(.active):hover,
.organizer-passes-tab:not(.active):hover,
.auth-tab:not(.active):hover {
  color: var(--pill-hover-fg);
  border-color: var(--pill-hover-border);
  background: var(--pill-hover-bg);
}

.organizer-subnav-link.active,
.nav-link.active,
.mobile-tab.active,
.organizer-tab.active,
.organizer-passes-tab.active,
.auth-tab.active {
  color: var(--pill-active-fg);
  border-color: var(--pill-active-border);
  background: var(--pill-active-bg);
  box-shadow: var(--shadow-sm);
}

/* Основное действие */
.btn:not(.ghost):not(.danger):not(.danger-solid):not(.organizer-pass-revoke-btn):not(.theme-toggle-btn):not(.theme-menu-item),
.btn:not(.ghost):not(.danger):not(.danger-solid):not(.organizer-pass-revoke-btn):not(.theme-toggle-btn):not(.theme-menu-item):link {
  color: var(--accent-fg);
  border-color: var(--accent);
  background: var(--accent);
  font-weight: 700;
}

.btn:not(.ghost):not(.danger):not(.danger-solid):not(.organizer-pass-revoke-btn):not(.theme-toggle-btn):not(.theme-menu-item):hover {
  border-color: color-mix(in srgb, var(--accent) 80%, black);
  background: color-mix(in srgb, var(--accent) 82%, black);
  box-shadow: var(--shadow-sm);
  transform: none;
}

.btn.ghost,
.btn.ghost:link {
  color: var(--pill-muted);
  border-color: var(--pill-ghost-border);
  background: var(--pill-ghost-bg);
}

.btn.ghost:hover {
  color: var(--pill-hover-fg);
  border-color: var(--pill-hover-border);
  background: var(--pill-ghost-bg);
  box-shadow: none;
  transform: none;
}

.btn.ghost.active,
.btn.ghost.active:link {
  color: var(--pill-active-fg);
  border-color: var(--pill-active-border);
  background: var(--pill-active-bg);
}

.btn.danger {
  color: #fecaca;
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.12);
}

.btn.danger:hover {
  background: rgba(239, 68, 68, 0.2);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.12);
  transform: none;
}

.layout {
  position: relative;
  z-index: 1;
  max-width: 1260px;
  margin: 0 auto;
  padding: 26px;
  display: grid;
  gap: 14px;
}

.card {
  border-radius: var(--radius-card);
  border: 1px solid var(--card-border);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.card h2 {
  margin: 0;
  font-size: 20px;
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.15;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  max-width: 18ch;
  text-transform: uppercase;
}

.hero p {
  margin: 10px 0 0;
  color: var(--muted);
  max-width: 52ch;
  font-size: 15px;
}

.hero-metrics {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.hero-metrics article {
  border: 1px solid var(--card-border);
  border-radius: var(--radius-control);
  padding: 14px 16px;
  background: var(--surface-raised);
}

.hero-metric-nearest {
  overflow: hidden;
}

.mh-metric-swap {
  position: relative;
  min-height: 3.05em;
  overflow: hidden;
}

.mh-metric-swap__face {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  transition:
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.4s ease;
  will-change: transform, opacity;
}

.mh-metric-swap__face:not(.is-active):not(.is-enter):not(.is-exit) {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(115%);
}

.mh-metric-swap__face.is-active {
  position: relative;
  opacity: 1;
  transform: translateY(0);
  z-index: 2;
}

.mh-metric-swap__face.is-exit {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(-110%);
  z-index: 1;
  pointer-events: none;
}

.mh-metric-swap__face.is-enter {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(115%);
  z-index: 3;
  pointer-events: none;
}

.mh-metric-swap__face.is-enter.is-active {
  position: relative;
  opacity: 1;
  transform: translateY(0);
}

.mh-metric-swap__value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  display: block;
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mh-metric-swap__label {
  color: var(--muted);
  display: block;
  margin-top: 0;
  font-size: 13px;
  line-height: 1.2;
}

@media (prefers-reduced-motion: reduce) {
  .mh-metric-swap__face {
    transition: none;
  }
}

.hero-metrics span {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  display: block;
  line-height: 1;
}

.hero-metrics small {
  color: var(--muted);
  display: block;
  margin-top: 6px;
  font-size: 13px;
}

.hero-art {
  display: none;
}

.ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.ring-a {
  width: 230px;
  height: 230px;
  animation: rotate 10s linear infinite;
}

.ring-b {
  width: 170px;
  height: 170px;
  animation: rotate 7s linear infinite reverse;
}

.ring-c {
  width: 110px;
  height: 110px;
  animation: rotate 5s linear infinite;
}

.hero-code {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-shadow: none;
}

.status-pill {
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 12px;
  color: var(--muted);
}

.auth-grid,
.filters-grid,
.create-grid {
  display: grid;
  gap: 10px;
}

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

.filters-grid {
  grid-template-columns: 1.6fr 1fr 1fr;
  align-items: end;
}

.filters-grid .price-row,
.filters-grid .filters-date-row,
.filters-grid .filters-actions {
  grid-column: 1 / -1;
}

.price-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.filters-date-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.filters-date-field > span {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.2;
}

.filters-date-field input[type="date"],
input[type="date"] {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  height: 44px;
  padding: 10px 12px;
  line-height: normal;
  color: var(--text);
  color-scheme: inherit;
}

.filters-date-field input[type="date"]::-webkit-date-and-time-value,
input[type="date"]::-webkit-date-and-time-value {
  text-align: left;
  min-height: 1.35em;
  color: var(--text);
}

.filters-date-field input[type="date"]::-webkit-calendar-picker-indicator,
input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0.75;
  cursor: pointer;
  margin-left: 4px;
}

.filters-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.filters-actions .btn {
  width: 100%;
  min-height: 42px;
}

.filters-toggle {
  display: none;
}

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

input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]),
textarea {
  width: 100%;
  min-height: 40px;
  border-radius: var(--radius-control);
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text);
  padding: 0 11px;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]):focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--accent-border-strong);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

input[type="checkbox"],
input[type="radio"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  accent-color: var(--accent);
  flex-shrink: 0;
}

/* Селекты: без нативного вида (иначе на телефоне «плоская» полоска без высоты и рамки) */
select {
  width: 100%;
  box-sizing: border-box;
  min-height: 44px;
  height: auto;
  border-radius: var(--radius-control);
  border: 1px solid var(--input-border);
  background-color: var(--input-bg);
  color: var(--text);
  padding: 10px 40px 10px 12px;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.35;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9' fill='none'%3E%3Cpath d='M1 2l6 5 6-5' stroke='%238f98ab' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px 9px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

select:focus-visible {
  outline: none;
  border-color: var(--accent-border-strong);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

select option {
  background: var(--input-bg);
  color: var(--text);
}

textarea {
  padding: 10px 11px;
  resize: vertical;
}

button {
  font-family: inherit;
}

input::placeholder {
  color: var(--input-placeholder);
}

.link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  text-align: center;
}

a.btn,
a.btn:visited,
a.btn:hover,
a.btn:active {
  text-decoration: none;
}

.btn:focus-visible,
.nav-link:focus-visible,
.organizer-subnav-link:focus-visible,
.mobile-tab:focus-visible,
.organizer-tab:focus-visible,
.organizer-passes-tab:focus-visible,
.mobile-drawer-links a:focus-visible,
.auth-tab:focus-visible,
.scanner-exit-link:focus-visible {
  outline: 2px solid var(--accent-border-strong);
  outline-offset: 2px;
}

.topbar-actions .btn {
  min-width: 0;
  height: 40px;
  min-height: 40px;
  padding: 10px 12px;
}

.profile-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid var(--card-border);
  background: var(--topbar-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.profile-menu-id {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: var(--bg-soft);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.profile-menu-id:hover {
  background: var(--surface-raised);
  border-color: var(--pill-hover-border);
}

.profile-menu-id-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
}

.profile-menu-id-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  word-break: break-all;
}

a.profile-menu-link {
  text-decoration: none;
  color: inherit;
}

a.profile-menu-link:hover {
  background: rgba(255, 255, 255, 0.06);
}

.profile-menu-logout,
#authLogoutBtn {
  margin: 0;
  width: 100%;
  min-width: 0;
  justify-content: center;
}

.topbar-actions .status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  white-space: nowrap;
}

.content-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 14px;
}

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

.event-card {
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-control);
  overflow: hidden;
  background: var(--surface-raised);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.event-card:hover {
  transform: translateY(-1px);
  border-color: var(--surface-hover-border);
  box-shadow: var(--shadow-sm);
}

/* Обложка мероприятия: квадрат, размер ограничен для удобства */
.event-cover {
  position: relative;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--cover-gradient);
}

/* Предпросмотр на create: обложка сверху по центру */
.event-card > .event-cover {
  width: min(100%, 152px);
  margin: 8px auto 4px;
  border-radius: 12px;
}

/* Главная, карта: клик по карточке ведёт на страницу события */
.events-grid > .event-card[data-event-id] {
  cursor: pointer;
}

.events-grid > .event-card[data-event-id]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Главная, карта, кабинет: слева квадрат с равными отступами от краёв карточки */
.events-grid > .event-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 12px;
  box-sizing: border-box;
}

.events-grid > .event-card > .event-cover {
  width: 118px;
  min-width: 118px;
  max-width: 118px;
  margin: 0;
  align-self: center;
  flex-shrink: 0;
}

.events-grid > .event-card > .event-body {
  flex: 1;
  min-width: 0;
  padding: 0;
}

.events-grid > .event-card > .event-body:only-child {
  padding: 0;
}

.event-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}

.event-body {
  padding: 10px;
}

.create-shell {
  padding: 20px;
}

.create-page-head h2 {
  margin: 0 0 6px;
}

.create-jump-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.create-jump-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--surface-raised);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  scroll-margin-top: 88px;
}

.create-jump-nav a:hover {
  color: var(--text);
  border-color: var(--accent-border);
}

.create-edit-context {
  margin: 0 0 18px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--accent-border);
  background: var(--accent-soft);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.create-edit-context-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.create-edit-context-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.create-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 16px;
  align-items: start;
}

.create-form-advanced {
  display: grid;
  gap: 14px;
}

.create-section {
  border: 1px solid var(--card-border);
  border-radius: 16px;
  background: var(--surface-raised);
  padding: 16px;
  display: grid;
  gap: 12px;
  scroll-margin-top: 96px;
}

.create-section-head {
  display: grid;
  gap: 4px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--card-border);
  margin-bottom: 2px;
}

.create-section-kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent, #2dd4bf);
}

.create-section-head h3 {
  margin: 0;
  font-size: 17px;
  color: var(--text);
}

.create-section-lead {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

.create-section h3 {
  margin: 0;
  font-size: 15px;
  color: var(--text);
}

.create-optional-mark {
  font-weight: 500;
  font-size: 11px;
  color: var(--muted);
  text-transform: lowercase;
  letter-spacing: 0;
}

.create-option-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
}

.create-option-card:has(input:checked) {
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

.create-option-card input {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: var(--accent, #0f766e);
}

.create-option-card-body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.create-option-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.create-option-card-text {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.create-referral-fields {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  border: 1px dashed var(--card-border);
  background: rgba(0, 0, 0, 0.12);
}

.create-referral-fields.is-hidden,
#createReferralFields.hidden {
  display: none;
}

.create-details {
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.create-details-summary {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.create-details-summary::-webkit-details-marker {
  display: none;
}

.create-details-summary::after {
  content: "+";
  font-weight: 800;
  color: var(--muted);
}

.create-details[open] .create-details-summary::after {
  content: "−";
}

.create-details-hint {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.create-details-body {
  display: grid;
  gap: 10px;
  padding: 0 14px 14px;
}

.create-geolocate-field .create-geolocate-label {
  visibility: hidden;
}

.create-geolocate-field .btn {
  width: 100%;
  min-height: 42px;
}

.create-actions-bar {
  position: sticky;
  bottom: calc(68px + env(safe-area-inset-bottom, 0px));
  z-index: 8;
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--card-border);
  background: color-mix(in srgb, var(--surface-raised) 92%, transparent);
  backdrop-filter: blur(12px);
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.22);
}

.create-actions-bar-btns {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 8px;
}

html[data-theme="light"] .create-section {
  background: #ffffff;
  border-color: #e4e4e7;
  box-shadow: 0 1px 2px rgba(24, 24, 27, 0.04);
}

html[data-theme="light"] .create-option-card {
  background: #fafafa;
}

html[data-theme="light"] .create-option-card:has(input:checked) {
  background: var(--accent-soft);
}

html[data-theme="light"] .create-referral-fields,
html[data-theme="light"] .create-details,
html[data-theme="light"] .create-recurrence-fields {
  background: #f4f4f5;
}

html[data-theme="light"] .create-actions-bar {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 -8px 24px rgba(24, 24, 27, 0.08);
}

html[data-theme="light"] .create-checkbox-field label,
html[data-theme="light"] .create-section .field-hint,
html[data-theme="light"] .create-section .form-field label {
  color: #52525b;
}

.form-field {
  display: grid;
  gap: 6px;
}

.form-field label {
  font-size: 12px;
  color: var(--muted);
}

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

.create-inline-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
}

.field-hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.create-desc-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 2px 0 8px;
}

.create-desc-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--card-border);
  background: var(--surface-raised);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.create-desc-tool:hover {
  background: var(--bg-soft);
  border-color: var(--surface-hover-border);
}

.create-desc-tool:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.create-desc-tool__glyph {
  display: inline-block;
  line-height: 1;
  pointer-events: none;
}

.create-desc-tool__glyph--bold {
  font-weight: 800;
}

.create-desc-tool__glyph--italic {
  font-style: italic;
  font-weight: 600;
}

.create-desc-tool__glyph--underline {
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 700;
}

.create-desc-tool__glyph--strike {
  text-decoration: line-through;
  font-weight: 600;
}

.create-desc-tool__glyph--link {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.create-submit-btn {
  width: 100%;
  min-height: 44px;
  font-size: 14px;
}

.create-preview {
  position: sticky;
  top: 86px;
}

.create-preview-head {
  display: grid;
  gap: 2px;
  margin-bottom: 12px;
}

.create-preview-head h3 {
  margin: 0;
  font-size: 15px;
}

.create-preview-sub {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.create-preview h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.preview-card {
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.create-preview .preview-card > .event-cover,
.create-preview .preview-card-banner {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: none;
  height: auto;
  margin: 0;
  aspect-ratio: 4 / 1;
  border-radius: 0;
  align-self: stretch;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.22);
}

.create-preview .preview-card > .event-cover img,
.create-preview .preview-card-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

.create-preview .preview-card > .event-body {
  padding: 14px;
}

#previewCover {
  position: relative;
}

#previewImage {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-body h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.event-body p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.preview-description.markdown-body {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
}

.event-meta {
  color: var(--muted);
  font-size: 12px;
}

.event-meta .event-distance {
  display: block;
  margin-top: 4px;
  font-size: 11px;
}

.event-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}

.event-actions-row,
.ticket-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.tag {
  font-size: 11px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  padding: 4px 8px;
  color: var(--muted);
}

/* Высота явная: иначе height:100% без высоты родителя даёт сбой Leaflet и «вылезание» снизу */
.mh-map-shell {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  isolation: isolate;
  background: var(--bg-soft);
}

#map {
  width: 100%;
  min-height: 320px;
  height: clamp(340px, 44vh, 540px);
  border-radius: 12px;
  overflow: hidden;
  border: none;
  background: var(--bg-soft);
  position: relative;
  z-index: 0;
  isolation: isolate;
}

.mh-map-shell #map {
  border-radius: inherit;
}

#map .leaflet-container {
  width: 100%;
  height: 100%;
  border-radius: 12px;
}

.mh-map-preload {
  position: absolute;
  inset: 0;
  z-index: 1200;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 18px;
  text-align: center;
  background: var(--bg-soft);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.32s ease, visibility 0.32s ease;
}

.mh-map-shell.is-loading .mh-map-preload {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mh-map-preload__text {
  margin: 0;
  max-width: 22ch;
  font-size: 15px;
  line-height: 1.45;
  color: var(--muted);
  animation: mh-map-preload-pulse 1.6s ease-in-out infinite;
}

@keyframes mh-map-preload-pulse {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mh-map-preload__text {
    animation: none;
    opacity: 1;
  }

  .mh-map-preload {
    transition: none;
  }
}

.mh-map-fallback {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  min-height: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px 18px;
  text-align: center;
  background: var(--bg-soft);
  border-radius: 12px;
}

.mh-map-fallback__text {
  margin: 0;
  max-width: 28ch;
  font-size: 15px;
  line-height: 1.4;
  color: var(--muted);
}

.mh-map-fallback__btn {
  min-height: 44px;
  padding: 0 18px;
}

/* Leaflet: тёмный фон до прогрузки тайлов (дефолт в leaflet.css — светлый) */
.leaflet-container {
  background: var(--bg-soft) !important;
  outline: none !important;
}

.mh-map-chrome {
  border: 1px solid var(--card-border) !important;
  border-radius: 12px !important;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
  background: var(--surface-raised) !important;
  display: flex;
  flex-direction: column;
  margin-bottom: 10px !important;
}

.mh-map-chrome.leaflet-bar a,
.mh-map-chrome.leaflet-bar a:hover {
  background: transparent;
  border: none;
  color: inherit;
}

.mh-map-chrome-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0 !important;
  padding: 0;
  border: none !important;
  border-radius: 0 !important;
  border-bottom: 1px solid var(--card-border) !important;
  background: transparent !important;
  color: var(--accent) !important;
  font-size: 0;
  line-height: 0;
  cursor: pointer;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent;
  appearance: none;
}

.mh-map-chrome-btn:last-child {
  border-bottom: none !important;
}

.mh-map-chrome-btn svg {
  display: block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  pointer-events: none;
}

.mh-map-chrome-btn:hover,
.mh-map-chrome-btn:focus-visible {
  background: var(--bg-soft) !important;
  color: var(--brand-accent) !important;
  outline: none;
}

.mh-map-chrome-btn:active {
  transform: scale(0.96);
}

.mh-map-chrome-btn:disabled,
.mh-map-chrome-btn.is-locating {
  opacity: 0.65;
  cursor: wait;
}

.mh-map-chrome-btn.is-locating {
  animation: mh-locate-pulse 0.9s ease-in-out infinite;
}

@keyframes mh-locate-pulse {
  0%,
  100% {
    color: var(--accent);
  }
  50% {
    color: var(--brand-accent, #7ee8ff);
  }
}

.leaflet-bottom.leaflet-right .mh-map-chrome {
  margin-right: 12px !important;
  margin-bottom: 12px !important;
}

/* Скрыть дефолтный Leaflet zoom, если где-то остался */
.leaflet-control-zoom {
  display: none !important;
}

/* Кастомная метка места события / площадки (Leaflet DivIcon) */
.mh-leaflet-venue-icon {
  background: transparent !important;
  border: none !important;
}

.mh-leaflet-venue-icon__img {
  display: block;
  width: 17px;
  height: 42px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

/* /map: ширина ~95% экрана, карта на всю доступную высоту под хедером */
html:has(body[data-page="map"]) {
  height: 100%;
}

body[data-page="map"] {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  margin: 0;
}

body[data-page="map"] > main.layout {
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 10px 0 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
}

body[data-page="map"] > main.layout > section.card:first-of-type {
  width: 95%;
  max-width: none;
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 14px 16px;
}

body[data-page="map"] > main.layout > section.card:first-of-type .card-head {
  flex-shrink: 0;
  margin-bottom: 8px;
}

body[data-page="map"] .mh-map-shell,
body[data-page="map"] #map {
  flex: 1 1 auto;
  min-height: min(42vh, 360px);
  width: 100%;
  height: auto;
  max-height: none;
}

body[data-page="map"] .mh-map-shell {
  display: flex;
  flex-direction: column;
  min-height: min(42vh, 360px);
}

body[data-page="map"] .mh-map-shell #map {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}

body[data-page="map"] > main.layout > section.card:last-of-type {
  width: 95%;
  max-width: none;
  flex: 0 1 auto;
  max-height: min(28vh, 220px);
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 12px 16px;
}

body[data-page="map"] > main.layout > section.card:last-of-type #eventsList {
  flex: 1 1 auto;
  min-height: 0;
  max-height: min(32vh, 268px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

/* Отступ под таббар только на мобиле — иначе карта схлопывается */
@media (max-width: 680px) {
  body[data-page="map"] {
    padding-bottom: 0;
  }

  body[data-page="map"] > main.layout {
    gap: 10px;
    padding-top: 10px;
    padding-left: max(12px, var(--meethub-safe-left));
    padding-right: max(12px, var(--meethub-safe-right));
    padding-bottom: calc(78px + var(--meethub-safe-bottom));
  }

  body[data-page="map"] > main.layout > section.card:first-of-type {
    padding: 12px 14px;
    border-radius: 20px;
    min-height: 0;
  }

  body[data-page="map"] > main.layout > section.card:first-of-type .card-head {
    margin-bottom: 8px;
  }

  body[data-page="map"] .mh-map-shell,
  body[data-page="map"] #map {
    min-height: min(46vh, 420px);
  }

  body[data-page="map"] > main.layout > section.card:last-of-type {
    max-height: min(26vh, 200px);
    padding: 10px 14px;
    border-radius: 20px;
  }

  body[data-page="map"] > main.layout > section.card:last-of-type #eventsList {
    max-height: min(24vh, 180px);
  }

  body.meethub-tg-miniapp[data-page="map"] .mh-map-shell,
  body.meethub-tg-miniapp[data-page="map"] #map {
    min-height: min(50dvh, 480px);
  }

  body[data-page="map"] .events-grid > .event-card > .event-cover {
    width: 100%;
    min-width: 0;
    max-width: none;
    aspect-ratio: 16 / 9;
  }

  body[data-page="map"] .events-grid > .event-card > .event-body h3 {
    font-size: 15px;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  body[data-page="map"] .events-grid > .event-card .event-actions-row {
    flex-wrap: wrap;
    gap: 8px;
  }

  body[data-page="map"] .events-grid > .event-card .event-actions-row .btn,
  body[data-page="map"] .events-grid > .event-card .event-actions-row .link-btn {
    flex: 1 1 auto;
    min-width: min(100%, 140px);
    justify-content: center;
  }
}

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

.ticket-card {
  border: 1px solid var(--card-border);
  border-radius: 14px;
  background: linear-gradient(150deg, var(--accent-soft), var(--surface-raised) 55%, var(--bg-soft));
  padding: 12px;
}

.ticket-card--archive {
  opacity: 0.9;
  border-color: var(--card-border);
  background: var(--bg-soft);
}

.user-tickets-tabs {
  margin-top: 8px;
}

/* ——— Мои проходки (/tickets): список без градиентов ——— */
.user-tickets-section {
  padding: 22px 20px 26px;
}

.user-tickets-head {
  align-items: flex-start;
  margin-bottom: 2px;
}

.user-tickets-head h2 {
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

.user-tickets-lead {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 54ch;
}

body[data-page="tickets"] .user-tickets-section .organizer-passes-main-tabs {
  margin-top: 16px;
}

body[data-page="tickets"] .user-tickets-section .organizer-passes-tab-hint {
  margin-top: 12px;
  background: var(--inset-bg);
  border-color: var(--inset-border);
  color: var(--muted);
}

.user-passes-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 6px;
}

.user-pass-card {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--card-border);
  background: var(--surface-raised);
  box-shadow: var(--shadow-sm);
}

.user-pass-card--archive {
  opacity: 0.9;
  border-color: var(--card-border);
  background: var(--bg-soft);
}

.user-pass-card--archive .user-pass-thumb img {
  filter: grayscale(0.35);
}

.user-pass-thumb {
  flex: 0 0 80px;
  width: 80px;
  align-self: flex-start;
  aspect-ratio: 1;
  max-height: 80px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--cover-gradient);
  border: 1px solid var(--card-border);
}

.user-pass-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.user-pass-thumb--empty {
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-pass-thumb-glyph {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.12em;
  color: var(--muted);
  opacity: 0.55;
}

.user-pass-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.user-pass-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 12px;
}

.user-pass-title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.28;
  color: var(--text);
}

.user-pass-format-badge {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--bg-soft);
  color: var(--muted);
}

.user-pass-format-badge--round {
  border-color: rgba(15, 118, 110, 0.35);
  background: rgba(15, 118, 110, 0.1);
  color: #0f766e;
}

.user-pass-when,
.user-pass-place {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.user-pass-status {
  display: inline-block;
  margin-top: 4px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--bg-soft);
  border: 1px solid var(--card-border);
  color: var(--muted);
  width: fit-content;
}

.user-pass-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.user-pass-btn-primary {
  min-height: 42px;
  padding: 0 18px;
}

.user-pass-btn-secondary {
  min-height: 42px;
}

.user-pass-empty {
  padding: 28px 20px;
  text-align: center;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  border-radius: 14px;
  border: 1px dashed var(--card-border);
  background: var(--inset-bg);
}

@media (max-width: 520px) {
  .user-pass-card {
    flex-direction: column;
    align-items: stretch;
  }

  .user-pass-thumb {
    width: min(100%, 140px);
    flex-basis: auto;
    max-width: 140px;
    max-height: none;
    aspect-ratio: 1 / 1;
    align-self: center;
    margin-inline: auto;
  }
}

.detail-card {
  padding: 20px;
}

.detail-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.detail-head h2 {
  margin: 0;
}

.detail-description {
  color: var(--muted);
  line-height: 1.45;
  margin: 0 0 10px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

/* Страница события: заголовок сверху, под ним широкая галерея */
.event-detail-page-head {
  margin-bottom: 10px;
}

.event-detail-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.event-share-card .card-head {
  align-items: flex-start;
  gap: 8px;
  flex-wrap: nowrap;
}

.event-share-card .card-head h2 {
  min-width: 0;
  flex: 1 1 auto;
  font-size: clamp(13px, 3.6vw, 17px);
  letter-spacing: 0.02em;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.event-share-card .card-head .btn {
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 6px 10px;
  min-height: 34px;
  font-size: 12px;
}

.modal-close-x {
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px !important;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
  border-radius: 10px;
}

.event-share-hint {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.4;
}

.event-share-qr-host {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 14px;
  padding: 12px;
  border-radius: 14px;
  background: #ffffff;
  width: max-content;
  max-width: min(280px, 78vw);
  min-height: 0;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid var(--card-border);
}

html[data-theme="dark"] .event-share-qr-host,
.event-share-qr-host--dark {
  background: #09090b;
}

.event-share-qr-host img,
.event-share-qr-host canvas,
.event-share-qr-host svg,
.event-share-qr-host table {
  display: block;
  max-width: 100%;
  height: auto !important;
  margin: 0 auto;
  border-radius: 8px;
}

.event-share-url-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.event-share-url-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.event-share-url-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: var(--input-bg);
  color: var(--text);
  font-size: 13px;
  box-sizing: border-box;
}

.event-share-url-row .btn {
  width: 100%;
  min-height: 44px;
}

.event-share-social {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.event-waitlist-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.event-similar {
  margin-top: 20px;
  width: 100%;
}

.events-grid--similar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  width: 100%;
}

@media (min-width: 720px) {
  .events-grid--similar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.events-grid--similar .event-card {
  cursor: pointer;
  width: 100%;
  min-width: 0;
}

.events-grid--similar .event-cover {
  aspect-ratio: 1;
}

.events-grid--similar .event-body h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  line-height: 1.25;
}

.events-grid--similar .event-meta {
  white-space: normal;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.create-checkbox-field label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
}

.event-detail-gallery {
  width: 100%;
  margin: 0 0 12px;
}

/* Только теги; цены — в левой колонке под фактами */
.event-detail-meta-bar {
  margin: 0 0 10px;
}

.event-tags--detail {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.event-contact-organizer-btn {
  min-height: 32px;
  padding: 0 12px;
  font-size: 13px;
}

.event-detail-price-heading {
  display: block;
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.event-detail-price-plain {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}

.event-detail-price-block--plain .event-detail-price-heading {
  margin-bottom: 4px;
}

.event-detail-gallery-main {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  aspect-ratio: 4 / 1;
  max-height: min(40vh, 320px);
}

.event-detail-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.event-detail-gallery-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.event-detail-gallery-thumb {
  padding: 0;
  margin: 0;
  width: 64px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  background: rgba(0, 0, 0, 0.4);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.event-detail-gallery-thumb:hover {
  transform: translateY(-1px);
}

.event-detail-gallery-thumb.is-active {
  border-color: var(--accent);
}

.event-detail-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.event-detail-gallery--empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 160px;
  margin: 0 0 12px;
  padding: 24px 16px;
  border-radius: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(135deg, var(--accent-soft) 0%, rgba(139, 92, 246, 0.06) 50%, rgba(8, 10, 16, 0.9) 100%),
    rgba(12, 14, 20, 0.6);
}

.event-detail-gallery-empty-badge {
  font-family: var(--font-display);
  letter-spacing: 0.2em;
  font-size: 13px;
  color: var(--accent);
  opacity: 0.9;
}

.event-detail-gallery-empty-title {
  font-family: "Manrope", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  text-align: center;
  line-height: 1.3;
  color: var(--text);
  max-width: 28ch;
}

.create-event-images {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.create-event-image-field {
  margin: 0;
}

.create-event-image-preview {
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: var(--cover-gradient);
  margin: 0 0 10px;
}

.create-event-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.create-event-image-preview--cover {
  width: 120px;
  aspect-ratio: 1 / 1;
}

.create-event-image-preview--banner {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 4 / 1;
}

.create-event-image-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.create-event-photos-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 10px;
}

.create-event-photo-row-inner {
  display: grid;
  grid-template-columns: 88px minmax(280px, 1fr) 56px;
  gap: 10px;
  align-items: center;
}

.create-event-photo-preview {
  width: 88px;
  height: 88px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  background: var(--cover-gradient);
  flex-shrink: 0;
}

.create-event-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.create-event-photo-upload {
  min-width: 0;
  width: 100%;
}

/*
 * Планшет/десктоп: превью отдельной строкой, кнопка загрузки тянется на всю ширину колонки формы.
 * Иначе в двухколоночном create средняя ячейка остаётся узкой (88px + 56px съедают строку).
 */
@media (min-width: 901px) {
  .create-event-photo-row-inner {
    grid-template-columns: minmax(0, 1fr) 56px;
    grid-template-rows: auto auto;
    gap: 12px;
    align-items: center;
  }

  .create-event-photo-preview {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
  }

  .create-event-photo-upload {
    grid-column: 1;
    grid-row: 2;
    min-width: 0;
    width: 100%;
  }

  button.create-event-photo-remove.btn {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
    align-self: center;
  }
}

.create-event-photo-upload-btn {
  position: relative;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  height: 56px;
  padding: 0 32px;
  border-radius: 12px;
  border: 1px solid var(--accent-border);
  background: var(--accent-soft);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.create-event-photo-upload-btn:hover {
  border-color: var(--accent-border-strong);
  background: var(--accent-soft);
}

.create-event-photo-upload-btn:focus-within {
  outline: 2px solid var(--accent-border-strong);
  outline-offset: 2px;
}

.create-event-photo-upload-btn.is-loading {
  pointer-events: none;
  opacity: 0.75;
}

.create-event-photo-upload-text {
  pointer-events: none;
  user-select: none;
  text-align: center;
  line-height: 1.3;
  white-space: nowrap;
}

/* Нативный input перекрывает кнопку — без системной «Выберите файл» */
.create-event-photo-upload-btn .create-event-photo-file {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
  font-size: 0;
}

/* Та же высота, что у кнопки загрузки; перебить .btn { min-width: 140px } */
button.create-event-photo-remove.btn {
  box-sizing: border-box;
  min-width: 56px;
  width: 56px;
  max-width: 56px;
  height: 56px;
  min-height: 56px;
  padding: 0;
  margin: 0;
  border-radius: 12px;
  flex-shrink: 0;
  justify-self: center;
  align-self: center;
  font-size: 18px;
  line-height: 1;
}

/* Единый фон: таблица фактов + цены/карта — меньше «пустоты» между колонками */
.event-detail-split-shell {
  margin: 0;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--card-border);
  background: var(--inset-bg);
}

.event-detail-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 400px);
  gap: 14px 16px;
  margin: 0;
  align-items: start;
}

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

/* Компактный блок фактов внутри оболочки */
.event-detail-facts {
  margin: 0;
  padding: 0;
  border-radius: 12px;
  border: 1px solid var(--inset-border);
  background: var(--inset-bg-strong);
  overflow: hidden;
}

.event-detail-split-shell .event-detail-facts {
  border-color: var(--inset-border);
  background: var(--surface-raised);
}

.event-detail-fact {
  display: grid;
  grid-template-columns: minmax(96px, 30%) 1fr;
  gap: 8px 12px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--inset-border);
  align-items: center;
}

.event-detail-fact:last-child {
  border-bottom: none;
}

.event-detail-fact-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  line-height: 1.25;
}

.event-detail-fact-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.35;
  word-break: break-word;
}

.event-detail-desc {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--inset-border);
  background: var(--surface-raised);
}

.event-detail-desc-title {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* Markdown: страница события и предпросмотр в create */
.markdown-body > *:first-child {
  margin-top: 0;
}

.markdown-body > *:last-child {
  margin-bottom: 0;
}

.markdown-body p {
  margin: 0 0 0.65em;
  max-width: 100%;
}

.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
  margin: 0.85em 0 0.45em;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text);
}

.markdown-body h2:first-child,
.markdown-body h3:first-child,
.markdown-body h4:first-child {
  margin-top: 0;
}

.markdown-body ul,
.markdown-body ol {
  margin: 0 0 0.65em;
  padding-left: 1.35em;
}

.markdown-body li {
  margin: 0.2em 0;
}

.markdown-body blockquote {
  margin: 0.5em 0 0.85em;
  padding: 6px 0 6px 12px;
  border-left: 3px solid var(--accent-border);
  color: var(--muted);
}

.markdown-body hr {
  margin: 0.75em 0;
  border: none;
  border-top: 1px solid var(--card-border);
}

.markdown-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.markdown-body u {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.markdown-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
  padding: 0.12em 0.35em;
  border-radius: 6px;
  background: var(--inset-bg);
  word-break: break-word;
}

.markdown-body pre {
  margin: 0.5em 0 0.85em;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--inset-bg-strong);
  border: 1px solid var(--inset-border);
  overflow-x: auto;
  font-size: 12px;
  line-height: 1.4;
}

.markdown-body pre code {
  padding: 0;
  background: none;
  font-size: inherit;
}

.markdown-body table {
  width: 100%;
  margin: 0.5em 0 0.85em;
  border-collapse: collapse;
  font-size: 13px;
}

.markdown-body th,
.markdown-body td {
  border: 1px solid var(--card-border);
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
}

.markdown-body th {
  font-weight: 700;
  background: var(--inset-bg);
}

.event-detail-desc-body.markdown-body {
  white-space: normal;
}

.event-detail-desc-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: stretch;
}

.event-card-review-line {
  margin: 6px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent, var(--accent));
  letter-spacing: 0.02em;
}

.event-reviews-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--card-border, rgba(255, 255, 255, 0.08));
}

.event-reviews-section.card-subtle {
  background: transparent;
  border-radius: 0;
  padding-left: 0;
  padding-right: 0;
}

.event-reviews-title {
  margin: 0 0 8px;
  font-size: 16px;
}

.event-reviews-stats {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--text);
}

.event-reviews-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.event-review-item {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: var(--inset-bg);
}

.event-review-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  font-size: 13px;
  margin-bottom: 6px;
}

.event-review-author {
  font-weight: 700;
  color: var(--text);
}

.event-review-stars-label {
  color: var(--accent, var(--accent));
  font-weight: 600;
}

.event-review-time {
  color: var(--muted);
  font-size: 12px;
  margin-left: auto;
}

.event-review-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.event-review-form {
  margin-top: 8px;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.event-review-form-title {
  margin: 0;
  font-size: 15px;
}

.event-review-own--pending {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(250, 204, 21, 0.12);
  border: 1px solid rgba(250, 204, 21, 0.35);
  color: var(--text);
}

.event-detail-desc-body {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.event-detail-desc-body.is-clamped {
  max-height: calc(var(--event-desc-clamp-lines, 4) * 1.5em);
  overflow: hidden;
}

.event-detail-desc-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 100%;
  margin: 2px 0 0;
  padding: 8px 10px;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  background: var(--bg-soft);
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.event-detail-desc-toggle:hover {
  background: var(--inset-bg-strong);
  color: var(--text);
  border-color: var(--surface-hover-border);
}

.event-detail-desc-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.event-detail-desc-toggle__chev {
  display: block;
  transition: transform 0.2s ease;
}

.event-detail-desc-toggle.is-open .event-detail-desc-toggle__chev {
  transform: rotate(180deg);
}

.event-actions-row--detail {
  margin-top: 0;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.event-actions-row--detail > .btn:not(.link-btn) {
  width: auto;
  max-width: 100%;
}

.event-actions-row--detail > .event-meta {
  flex: 1 1 100%;
}

.event-detail-map-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.event-detail-col-main .event-detail-price-block {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--inset-border);
  background: var(--surface-raised);
}

.event-detail-col-main .event-detail-price-heading {
  margin: 0 0 6px;
}

.event-detail-map-title {
  display: block;
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.event-detail-map {
  width: 100%;
  height: clamp(260px, 36vh, 380px);
  min-height: 260px;
  border-radius: 12px;
  border: none;
  background: var(--bg-soft);
  overflow: hidden;
  z-index: 0;
}

.event-detail-map-hint {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

/* Реферальный баннер под картой */
.event-referral-banner {
  margin-top: 8px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--card-border);
  background: var(--surface-raised);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.event-referral-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.event-referral-head-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card h2,
.detail-head h2,
.event-detail-page-head h2,
.auth-hero h1,
.ticket-qr-kicker,
.scanner-confirm-kicker,
.event-referral-eyebrow,
.event-referral-title,
.event-detail-gallery-empty-badge,
.hero-code,
.organizer-hub-tile h3,
.paid-checkout-card .card-head h2 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.event-referral-eyebrow {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1;
}

.event-referral-title {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  line-height: 1.15;
  color: var(--text);
}

.event-referral-title .event-referral-pct {
  text-transform: none;
  letter-spacing: 0.02em;
  font-family: "Manrope", system-ui, sans-serif;
}

.event-referral-pct {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1;
}

.event-referral-panel {
  padding: 12px;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.event-referral-panel-hint {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}

.event-referral-actions-btns {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.event-referral-btn {
  appearance: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-fg);
  transition: opacity 0.12s ease, transform 0.12s ease;
  white-space: nowrap;
}

.event-referral-btn:hover {
  opacity: 0.9;
}

.event-referral-btn:active {
  transform: scale(0.98);
}

.event-referral-btn--qr {
  min-width: 64px;
  background: var(--surface-raised);
  color: var(--text);
  border-color: var(--card-border);
}

.event-referral-progress {
  display: grid;
  grid-template-columns: repeat(var(--referral-steps, 10), minmax(0, 1fr));
  gap: 5px;
}

.event-referral-seg {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
}

.event-referral-seg.is-filled {
  background: var(--accent);
}

.event-referral-foot {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

html[data-theme="light"] .event-detail-split-shell .event-detail-facts,
html[data-theme="light"] .event-detail-col-main .event-detail-price-block,
html[data-theme="light"] .event-detail-desc {
  background: #ffffff;
  border-color: #e4e4e7;
  box-shadow: 0 1px 2px rgba(24, 24, 27, 0.04);
}

html[data-theme="light"] .event-detail-fact-label,
html[data-theme="light"] .event-detail-desc-title,
html[data-theme="light"] .event-detail-map-title,
html[data-theme="light"] .event-detail-price-heading {
  color: #52525b;
}

html[data-theme="light"] .event-referral-banner {
  background: #ffffff;
  border-color: #e4e4e7;
}

html[data-theme="light"] .btn.ghost,
html[data-theme="light"] .btn.ghost:link {
  color: #3f3f46;
  border-color: #d4d4d8;
  background: #ffffff;
}

html[data-theme="light"] .btn.ghost:hover {
  color: #18181b;
  border-color: #a1a1aa;
  background: #fafafa;
}

/*
 * Попап маркера Leaflet: без className фон остаётся белым (стили библиотеки).
 * Сбрасываем margin/padding у .leaflet-popup-content — иначе баннер «внутри» белой рамки.
 */
.mh-leaflet-popup .leaflet-popup-content-wrapper {
  padding: 0;
  overflow: hidden;
  border-radius: 16px;
  background: var(--surface-raised);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-lg);
  max-width: min(400px, calc(100vw - 24px));
  color: var(--text);
}

.mh-leaflet-popup .leaflet-popup-content {
  margin: 0 !important;
  padding: 0 !important;
  width: auto !important;
  min-width: 280px !important;
  max-width: min(400px, calc(100vw - 24px)) !important;
  box-sizing: border-box;
  line-height: 1.4;
}

.mh-leaflet-popup .leaflet-popup-tip {
  background: var(--surface-raised);
  box-shadow: none;
}

/* Компактный попап площадки: список запланированных событий */
.mh-venue-overview-popup .leaflet-popup-content {
  min-width: 200px !important;
  max-width: min(280px, calc(100vw - 28px)) !important;
}

.mh-venue-ov-popup {
  padding: 12px 14px 10px;
  box-sizing: border-box;
}

.mh-venue-ov-name {
  display: block;
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.mh-venue-ov-addr {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted);
}

.mh-venue-ov-events {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mh-venue-ov-event {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 6px 0 0;
  border-top: 1px solid var(--card-border);
}

.mh-venue-ov-event:first-child {
  border-top: none;
  padding-top: 0;
}

.mh-venue-ov-event-title {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mh-venue-ov-event-when {
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.mh-venue-ov-empty {
  margin: 0;
  padding-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.mh-leaflet-popup a.leaflet-popup-close-button {
  color: var(--muted);
  font-weight: 800;
  width: 30px;
  height: 30px;
  line-height: 30px;
  top: 8px;
  right: 8px;
  z-index: 2;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-raised) 78%, transparent);
  text-shadow: none;
}

.mh-leaflet-popup a.leaflet-popup-close-button:hover {
  color: var(--text);
  background: var(--bg-soft);
}

/* Горизонтально: слева обложка на всю высоту (stretch), ширина = высота (JS) */
.mh-leaflet-popup .mh-map-popup {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: min(380px, calc(100vw - 28px));
  max-width: 380px;
  min-width: 0;
  margin: 0;
  padding: 0;
  gap: 0;
}

.mh-leaflet-popup .mh-map-popup__banner {
  flex: 0 0 148px;
  box-sizing: border-box;
  width: 148px;
  /* высоту не фиксируем — stretch на всю карточку, без поля снизу */
  height: auto;
  min-height: 0;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  border-radius: 15px 0 0 15px;
  background: var(--cover-gradient);
  align-self: stretch;
  line-height: 0;
}

.mh-leaflet-popup .mh-map-popup__banner img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  object-fit: cover;
  object-position: center;
}

.mh-leaflet-popup .mh-map-popup__banner--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: normal;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent) 22%, transparent), transparent 58%),
    var(--cover-gradient, var(--bg-soft));
}

.mh-leaflet-popup .mh-map-popup__banner-glyph {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: color-mix(in srgb, var(--text) 55%, var(--accent));
  opacity: 0.9;
}

.mh-leaflet-popup .mh-map-popup__inner {
  flex: 1 1 auto;
  min-width: 0;
  padding: 12px 32px 12px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
}

.mh-leaflet-popup .mh-map-popup__title {
  display: block;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: normal;
  text-transform: none;
  margin: 0;
  color: var(--text);
  word-break: normal;
  overflow-wrap: break-word;
  line-height: 1.3;
}

.mh-leaflet-popup .mh-map-popup__meta {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.mh-leaflet-popup .mh-map-popup__meta-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}

.mh-leaflet-popup .mh-map-popup__meta-text {
  min-width: 0;
  word-break: normal;
  overflow-wrap: break-word;
}

.mh-leaflet-popup .mh-map-popup__ico {
  flex: 0 0 auto;
  display: inline-flex;
  margin-top: 2px;
  color: color-mix(in srgb, var(--accent) 75%, var(--muted));
  opacity: 0.95;
}

.mh-leaflet-popup .mh-map-popup__ico svg {
  display: block;
}

.mh-leaflet-popup .mh-map-popup__line {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--muted);
  word-break: break-word;
  overflow-wrap: anywhere;
}

.mh-leaflet-popup .mh-map-popup__line--muted {
  color: var(--muted);
  font-size: 12px;
  opacity: 0.85;
}

.mh-leaflet-popup .mh-map-popup__actions {
  margin-top: 2px;
  padding-top: 8px;
  border-top: 1px solid color-mix(in srgb, var(--card-border) 85%, transparent);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mh-leaflet-popup .mh-map-popup__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 10px;
  background: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 70%, #000);
  color: var(--accent-fg, #fff) !important;
  text-decoration: none !important;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: var(--shadow-sm);
  transition: filter 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.mh-leaflet-popup .mh-map-popup__btn:hover {
  filter: brightness(1.06);
  background: var(--accent);
}

.mh-leaflet-popup .mh-map-popup__nav {
  display: none;
}

@media (max-width: 420px) {
  .mh-leaflet-popup .leaflet-popup-content {
    min-width: 0 !important;
  }

  .mh-leaflet-popup .mh-map-popup {
    width: min(100vw - 28px, 380px);
  }

  .mh-leaflet-popup .mh-map-popup__inner {
    padding: 12px 34px 12px 12px;
    gap: 8px;
  }

  .mh-leaflet-popup .mh-map-popup__title {
    font-size: 15px;
  }
}

.event-detail-prices {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.event-detail-prices li {
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--card-border);
  font-size: 13px;
  color: var(--text);
}

.create-price-tiers-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
}

.create-price-tier-row {
  display: grid;
  grid-template-columns: 1fr minmax(100px, 120px) auto;
  gap: 8px;
  align-items: end;
}

.create-price-tier-row input[type="text"],
.create-price-tier-row input[type="number"] {
  width: 100%;
}

.paid-checkout-tier-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0 4px;
}

.paid-checkout-tier-option {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: var(--surface-raised);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.paid-checkout-tier-option:hover {
  border-color: var(--surface-hover-border);
}

.paid-checkout-tier-option:has(input:checked) {
  border-color: var(--accent-border-strong);
  background: var(--accent-soft);
}

.paid-checkout-tier-option input {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--muted);
  background: transparent;
  box-shadow: none;
}

.paid-checkout-tier-option input:checked {
  border-color: var(--brand-accent);
  background:
    radial-gradient(circle at center, var(--brand-accent) 0 35%, transparent 37%),
    transparent;
}

.paid-checkout-tier-label {
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.paid-checkout-tier-price {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.paid-checkout-tier-option:has(input:checked) .paid-checkout-tier-label,
.paid-checkout-tier-option:has(input:checked) .paid-checkout-tier-price {
  color: var(--brand-accent);
}

@media (max-width: 900px) {
  .event-detail-main-grid {
    grid-template-columns: 1fr;
  }

  .event-detail-map {
    height: clamp(240px, 42vh, 340px);
    min-height: 240px;
  }

  .event-detail-split-shell {
    padding: 10px 12px;
  }

  .event-detail-fact {
    grid-template-columns: 1fr;
    gap: 3px;
    padding: 8px 10px;
    align-items: start;
  }

  .event-actions-row--detail {
    flex-direction: column;
    align-items: stretch;
  }

  .create-price-tier-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .create-event-photo-row-inner {
    grid-template-columns: minmax(0, 1fr) 56px;
    grid-template-rows: auto auto;
    justify-items: stretch;
    align-items: center;
  }

  .create-event-photo-preview {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 160px;
    height: 120px;
    justify-self: center;
  }

  .create-event-photo-upload {
    grid-column: 1;
    grid-row: 2;
    min-width: 0;
  }

  button.create-event-photo-remove.btn {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
    align-self: center;
  }
}

.ticket-code-plain {
  margin-top: 8px;
  display: inline-block;
  padding: 6px 9px;
  border-radius: 8px;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.85);
  color: #fff;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-weight: 700;
  letter-spacing: 0.08em;
  word-break: break-all;
}

.ticket-qr-section {
  position: relative;
  margin-top: 18px;
  padding: 16px;
  border-radius: var(--radius-card);
  border: 1px solid var(--card-border);
  background: var(--surface-raised);
  box-shadow: var(--shadow-md);
  display: grid;
  gap: 14px;
  justify-items: center;
  align-content: start;
  overflow: hidden;
  box-sizing: border-box;
}

.ticket-qr-section::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto;
  height: 70%;
  background: radial-gradient(ellipse at 50% 0%, var(--qr-glow), transparent 55%);
  opacity: 0.25;
  pointer-events: none;
}

.ticket-qr-section-head {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
  width: 100%;
}

.ticket-qr-kicker {
  font-family: var(--font-display);
  letter-spacing: 0.14em;
  font-size: 13px;
  font-weight: 800;
  color: var(--accent);
  opacity: 0.95;
}

.ticket-qr-badge {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: none;
}

.ticket-qr-frame {
  position: relative;
  z-index: 1;
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
  padding: 14px;
  border-radius: 14px;
  background: #030305;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-sm);
  box-sizing: border-box;
  line-height: 0;
}

.ticket-qr-frame--round {
  padding: 0;
  border-radius: 50%;
  background: transparent;
  border: none;
  box-shadow: none;
}

.ticket-qr-section[data-pass-format="round"] {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(20, 184, 166, 0.12), transparent 55%),
    var(--surface-raised);
}

.ticket-qr-section[data-pass-format="round"] .ticket-qr-badge {
  background: #0f766e;
}

.mh-round-pass-host {
  display: grid;
  place-items: center;
  width: min(84vw, 300px);
  min-height: min(84vw, 300px);
  background: transparent;
  filter: drop-shadow(0 12px 32px rgba(15, 23, 42, 0.14));
}

.mh-round-pass {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.mh-round-pass-canvas {
  display: block;
  width: 100%;
  height: auto;
  max-width: min(84vw, 300px);
  border-radius: 50%;
}

/* Круглый видоискатель: квадрат + radius 50% (не овал от разных w/h) */
body[data-page="scanner"][data-pass-format="round"] .scanner-target {
  width: min(68vmin, 280px);
  height: min(68vmin, 280px);
  max-width: 72vw;
  max-height: 72vw;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(45, 212, 191, 0.85);
  background: transparent;
}

body[data-page="scanner"][data-pass-format="round"] .scanner-corner {
  display: none;
}

body[data-page="scanner"][data-pass-format="round"] .scanner-target-wrap::after {
  display: none;
}

body[data-page="scanner"][data-pass-format="round"] .scanner-vignette {
  background: radial-gradient(
    circle 34vmin at 50% 46%,
    transparent 52%,
    rgba(0, 0, 0, 0.2) 70%,
    rgba(2, 4, 14, 0.78) 100%
  );
}

body[data-pass-format="round"] .scanner-target {
  border-radius: 50%;
}

.ticket-qr-host {
  display: block;
  width: max-content;
  max-width: 100%;
  padding: 0;
  margin: 0;
  background: #ffffff;
  border-radius: 10px;
  line-height: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.ticket-qr-host img,
.ticket-qr-host canvas,
.ticket-qr-host svg {
  display: block;
  max-width: min(70vw, 240px);
  height: auto !important;
  border-radius: 8px;
}

.ticket-qr-mini img,
.ticket-qr-mini canvas,
.ticket-qr-mini svg {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.event-share-qr-host img,
.event-share-qr-host canvas,
.event-share-qr-host svg {
  border-radius: 8px;
}

.ticket-qr-hint {
  position: relative;
  z-index: 1;
  margin: 0;
  text-align: center;
  max-width: 320px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

/* Страница одной проходки: данные + QR / рефералка */
body[data-page="ticket"] .detail-card {
  width: 100%;
  max-width: 100%;
}

body[data-page="ticket"] .ticket-detail-head {
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 4px;
}

body[data-page="ticket"] .ticket-detail-title-block {
  min-width: 0;
  flex: 1 1 auto;
}

body[data-page="ticket"] .ticket-detail-kicker {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1;
}

body[data-page="ticket"] .ticket-detail-head h2 {
  margin: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

body[data-page="ticket"] .ticket-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 24px 28px;
  align-items: start;
  margin-top: 6px;
}

body[data-page="ticket"] .ticket-detail-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

body[data-page="ticket"] .ticket-detail-aside {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  position: sticky;
  top: calc(var(--meethub-safe-top, 0px) + 72px);
}

body[data-page="ticket"] .ticket-detail-summary {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--card-border);
  background: var(--inset-bg);
}

body[data-page="ticket"] .ticket-detail-cover {
  width: 112px;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--inset-border);
  background: var(--inset-bg-strong);
}

body[data-page="ticket"] .ticket-detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body[data-page="ticket"] .ticket-detail-cover--empty {
  display: flex;
  align-items: center;
  justify-content: center;
}

body[data-page="ticket"] .ticket-detail-cover-glyph {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.12em;
  color: var(--muted);
  opacity: 0.55;
}

body[data-page="ticket"] .ticket-detail-summary-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body[data-page="ticket"] .ticket-detail-event-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}

body[data-page="ticket"] .ticket-detail-place {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--muted);
}

body[data-page="ticket"] .ticket-detail-meta-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 10px;
}

body[data-page="ticket"] .ticket-detail-stat {
  min-width: 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--inset-border);
  background: var(--surface-raised);
}

body[data-page="ticket"] .ticket-detail-stat-label {
  display: block;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 6px;
}

body[data-page="ticket"] .ticket-detail-stat-value {
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 600;
  color: var(--text);
  overflow-wrap: anywhere;
}

body[data-page="ticket"] .ticket-detail-code {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-all;
}

body[data-page="ticket"] .ticket-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body[data-page="ticket"] .ticket-detail-map-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding-top: 4px;
}

body[data-page="ticket"] .ticket-detail-map-kicker {
  display: block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

body[data-page="ticket"] .ticket-detail-map.event-detail-map {
  min-height: 240px;
  height: 280px;
}

body[data-page="ticket"] .ticket-detail-route-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

body[data-page="ticket"] .ticket-qr-section--detail {
  margin-top: 0;
  width: 100%;
  max-width: none;
  justify-self: stretch;
  padding: 14px;
  gap: 12px;
}

body[data-page="ticket"] .ticket-qr-section--detail .ticket-qr-section-head {
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

body[data-page="ticket"] .ticket-qr-hint--detail {
  max-width: 28ch;
  width: auto;
  box-sizing: border-box;
  padding: 0;
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
}

body[data-page="ticket"] .ticket-detail-aside .event-referral-banner {
  margin-top: 0;
}

body[data-page="ticket"] .ticket-detail-head--qr-archive {
  margin-bottom: 8px;
}

body[data-page="ticket"] .ticket-qr-archive-note {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
  margin: 0 0 22px;
  max-width: 520px;
}

body[data-page="ticket"] .ticket-qr-section--archive-only {
  margin-top: 0;
}

@media (max-width: 960px) {
  body[data-page="ticket"] .ticket-detail-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  body[data-page="ticket"] .ticket-detail-aside {
    position: static;
  }
}

@media (max-width: 720px) {
  body[data-page="ticket"] .ticket-detail-meta-grid {
    grid-template-columns: 1fr 1fr;
  }

  body[data-page="ticket"] .ticket-detail-stat:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  body[data-page="ticket"] .ticket-detail-summary {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  body[data-page="ticket"] .ticket-detail-cover {
    width: 100%;
    max-width: none;
    aspect-ratio: 16 / 9;
  }

  body[data-page="ticket"] .ticket-detail-meta-grid {
    grid-template-columns: 1fr;
  }

  body[data-page="ticket"] .ticket-detail-stat:last-child {
    grid-column: auto;
  }

  body[data-page="ticket"] .ticket-detail-actions {
    flex-direction: column;
  }

  body[data-page="ticket"] .ticket-detail-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

.ticket-qr-mini-wrap {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.35);
}

.ticket-qr-mini-label {
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 2px;
  color: var(--accent);
  opacity: 0.9;
}

.ticket-qr-mini {
  flex: 1;
  display: grid;
  place-items: center;
  min-height: 96px;
  padding: 6px;
  border-radius: 10px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.ticket-qr-mini img,
.ticket-qr-mini canvas {
  border-radius: 4px;
}

.logs details summary {
  cursor: pointer;
}

#log {
  margin: 10px 0 0;
  white-space: pre-wrap;
  color: #ced4e5;
  font-size: 12px;
}

.toast {
  position: fixed;
  left: 50%;
  top: calc(var(--meethub-safe-top) + 10px);
  transform: translateX(-50%);
  width: min(96vw, 560px);
  max-width: 560px;
  border-radius: var(--radius-control);
  padding: 12px 14px;
  border: 1px solid var(--accent-border);
  background: var(--surface-raised);
  box-shadow: var(--shadow-lg);
  z-index: 2147483647;
  pointer-events: none;
}

.auth-page .topbar {
  position: relative;
}

.auth-layout {
  min-height: calc(100vh - 72px);
  display: grid;
  place-items: start center;
  padding: 28px 20px calc(120px + var(--meethub-safe-bottom));
  position: relative;
  z-index: 1;
}

.auth-shell {
  width: min(520px, 100%);
}

.auth-panel {
  border-radius: 22px;
  border: 1px solid var(--card-border);
  background: var(--card);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.auth-hero {
  padding: 32px 28px 28px;
  text-align: center;
  border-bottom: 1px solid var(--card-border);
  background: radial-gradient(ellipse 120% 80% at 50% -20%, var(--accent-soft), transparent 55%);
}

.auth-hero-kicker {
  margin: 0 0 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.auth-hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(22px, 5.6vw, 36px);
  line-height: 1.08;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}

.auth-hero-lead {
  margin: 14px auto 0;
  max-width: 38ch;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

.auth-step {
  padding: 24px 26px 26px;
}

.auth-step + .auth-step {
  border-top: 1px solid var(--card-border);
}

.auth-step-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.auth-step-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 15px;
  color: var(--bg);
  background: linear-gradient(135deg, var(--accent) 0%, #00c4a8 100%);
  box-shadow: 0 4px 20px var(--accent-border);
}

.auth-step-head-text h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.auth-step-desc {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.auth-step-desc strong {
  color: var(--text);
  font-weight: 600;
}

/* Плитки входа: без класса .btn — иначе nowrap и «зелёная» только у первой кнопки */
.auth-provider-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.auth-provider {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  box-sizing: border-box;
  padding: 16px 18px;
  min-height: 72px;
  border-radius: 16px;
  text-align: left;
  justify-content: flex-start;
  text-decoration: none;
  color: var(--text);
  white-space: normal;
  cursor: pointer;
  border: 1px solid var(--card-border);
  background: var(--bg-soft);
  box-shadow: var(--shadow-sm);
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.auth-provider:hover {
  border-color: var(--surface-hover-border);
  background: var(--surface-raised);
  box-shadow: var(--shadow-md);
}

.auth-provider:focus-visible {
  outline: 2px solid var(--accent-border-strong);
  outline-offset: 2px;
}

.auth-provider:active {
  transform: scale(0.99);
}

.auth-provider__mark {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.auth-provider--tg .auth-provider__mark {
  background: linear-gradient(145deg, #2aabee 0%, #229ed9 100%);
  color: #fff;
  box-shadow: 0 4px 18px rgba(42, 171, 238, 0.28);
}

.auth-provider--vk .auth-provider__mark {
  background: linear-gradient(145deg, #0077ff 0%, #0066dd 100%);
  color: #fff;
  box-shadow: 0 4px 18px rgba(0, 119, 255, 0.25);
}

.auth-provider__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.auth-provider__title {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.25;
  color: var(--text);
}

.auth-provider__sub {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.auth-email-card {
  margin-top: 10px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--card-border);
  background: var(--bg-soft);
  box-shadow: var(--shadow-sm);
}

.auth-email-card__head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.auth-email-card__mark {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 18px;
  background: linear-gradient(145deg, #6b7280 0%, #4b5563 100%);
  color: #fff;
  box-shadow: 0 4px 18px rgba(107, 114, 128, 0.25);
}

.auth-email-card__titles {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.auth-email-card__title {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.25;
  color: var(--text);
}

.auth-email-card__sub {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.auth-email-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-email-form .form-field {
  margin-bottom: 0;
}

.auth-email-field input {
  width: 100%;
  box-sizing: border-box;
}

.auth-email-sent-hint {
  margin: 0;
}

.auth-email-verify-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.auth-email-verify-actions .btn {
  flex: 1 1 auto;
  min-width: 120px;
}

.auth-step--register .auth-form {
  margin-top: 4px;
}

.auth-role-fieldset {
  margin: 0;
  padding: 0;
  border: none;
}

.auth-role-legend {
  padding: 0;
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.auth-organizer-title {
  margin: 18px 0 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.auth-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-field--full {
  grid-column: 1 / -1;
}

.auth-checkbox-line {
  grid-column: 1 / -1;
  margin-top: 4px;
}

.auth-submit-btn {
  margin-top: 18px;
  width: 100%;
  min-height: 48px;
  font-weight: 700;
  border-radius: 12px;
}

.auth-panel-footer {
  padding: 16px 26px 22px;
  border-top: 1px solid var(--card-border);
  background: var(--inset-bg);
}

.auth-back-btn {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  justify-content: center;
}

.auth-tabs {
  margin: 14px 0;
  display: flex;
  gap: 8px;
}

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

.auth-form .btn {
  width: 100%;
}

.auth-actions {
  margin-top: 10px;
  display: flex;
  justify-content: stretch;
}

.auth-actions .link-btn {
  width: 100%;
  min-height: 42px;
}

.auth-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.auth-role-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.role-option {
  position: relative;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 14px 14px 14px 42px;
  display: grid;
  gap: 4px;
  cursor: pointer;
  background: var(--bg-soft);
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.role-option input {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.role-option__main {
  font-weight: 700;
  font-size: 15px;
}

.role-option__hint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}

.role-option:hover {
  border-color: var(--surface-hover-border);
}

.role-option:has(input:checked) {
  border-color: var(--accent-border-strong);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent-soft);
}

.role-option:has(input:checked) .role-option__main {
  color: var(--accent);
}

.checkbox-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.checkbox-line input {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
}


.scanner-camera {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.scanner-camera-head {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.scanner-camera-head .btn {
  font-size: 13px;
}

.scanner-stage {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px var(--accent-border),
    0 24px 56px rgba(0, 0, 0, 0.38);
}

.scanner-video {
  display: block;
  width: 100%;
  max-height: 360px;
  border-radius: 18px;
  background: #030508;
  object-fit: cover;
}

.scanner-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
}

.scanner-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 72% 58% at 50% 42%,
    transparent 26%,
    rgba(0, 0, 0, 0.18) 48%,
    rgba(2, 4, 14, 0.82) 100%
  );
  pointer-events: none;
}

.scanner-target-wrap {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
}

.scanner-target {
  position: relative;
  width: min(78vw, 300px);
  height: min(42vw, 176px);
}

.scanner-corner {
  position: absolute;
  width: 36px;
  height: 36px;
  pointer-events: none;
  border-color: var(--scan-frame);
  border-style: solid;
  filter: drop-shadow(0 0 12px var(--accent-border-strong));
  animation: scanCornerPulse 2.4s ease-in-out infinite;
}

.scanner-corner.tr {
  animation-delay: 0.2s;
}

.scanner-corner.bl {
  animation-delay: 0.4s;
}

.scanner-corner.br {
  animation-delay: 0.6s;
}

.scanner-corner.tl {
  top: 0;
  left: 0;
  border-width: 3px 0 0 3px;
  border-radius: 5px 0 0 0;
}

.scanner-corner.tr {
  top: 0;
  right: 0;
  border-width: 3px 3px 0 0;
  border-radius: 0 5px 0 0;
}

.scanner-corner.bl {
  bottom: 0;
  left: 0;
  border-width: 0 0 3px 3px;
  border-radius: 0 0 0 5px;
}

.scanner-corner.br {
  bottom: 0;
  right: 0;
  border-width: 0 3px 3px 0;
  border-radius: 0 0 5px 0;
}

.scanner-overlay-text {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  margin: 0;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(4, 6, 12, 0.82);
  border: 1px solid var(--accent-border);
  color: #e8fbff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.scanner-manual-label {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.scanner-meta {
  display: grid;
  gap: 10px;
}

#scannerOcrDebug,
.scanner-ocr-debug {
  margin: 0;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.88);
  font-size: 10px;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 140px;
  overflow: auto;
  font-family: ui-monospace, monospace;
}

@keyframes scanCornerPulse {
  0%,
  100% {
    opacity: 0.65;
    filter: drop-shadow(0 0 8px var(--accent-border-strong));
  }
  50% {
    opacity: 1;
    filter: drop-shadow(0 0 16px rgba(0, 245, 212, 0.85));
  }
}

/* Fullscreen scanner layout (iPhone friendly) */
body[data-page="scanner"] .topbar,
body[data-page="scanner"] .mobile-tabbar {
  display: none !important;
}

body[data-page="scanner"] main.scanner-minimal {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  max-width: none;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  min-height: 100dvh;
}

.scanner-exit-link {
  position: fixed;
  top: calc(10px + var(--meethub-safe-top));
  left: 12px;
  z-index: 7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(6, 10, 18, 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 18px;
  font-weight: 700;
  color: rgba(232, 251, 255, 0.9);
  text-decoration: none;
  transition:
    color 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease;
}

.scanner-exit-link:hover {
  color: #fff;
  border-color: rgba(0, 245, 212, 0.45);
}

.scanner-torch-btn {
  position: fixed;
  top: calc(10px + var(--meethub-safe-top));
  right: calc(12px + 42px + 8px);
  z-index: 7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin: 0;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(6, 10, 18, 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: rgba(232, 251, 255, 0.92);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.scanner-torch-btn.hidden {
  display: none;
}

.scanner-torch-btn.is-on,
.scanner-torch-btn[aria-pressed="true"] {
  border-color: rgba(255, 196, 64, 0.7);
  color: #ffc440;
  background: rgba(40, 28, 8, 0.82);
  box-shadow: 0 0 0 2px rgba(255, 196, 64, 0.18);
}

.scanner-torch-icon {
  display: block;
}

.scanner-settings-btn {
  position: fixed;
  top: calc(10px + var(--meethub-safe-top));
  right: 12px;
  z-index: 7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin: 0;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(6, 10, 18, 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: rgba(232, 251, 255, 0.92);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.scanner-settings-btn[aria-expanded="true"],
.scanner-settings-btn:hover {
  border-color: rgba(0, 245, 212, 0.5);
  color: #00f5d4;
}

.scanner-settings-icon {
  display: block;
}

.scanner-settings-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #ff5c7a;
  box-shadow: 0 0 0 2px rgba(6, 10, 18, 0.85);
}

.scanner-event-chip {
  position: fixed;
  top: calc(58px + var(--meethub-safe-top));
  left: 50%;
  z-index: 6;
  transform: translateX(-50%);
  max-width: min(78vw, 280px);
  margin: 0;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0, 245, 212, 0.28);
  background: rgba(6, 10, 18, 0.78);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #e8fbff;
  font-family: "Manrope", sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.scanner-event-chip.is-empty {
  border-color: rgba(255, 92, 122, 0.45);
  color: rgba(255, 210, 220, 0.95);
}

.scanner-settings-sheet {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.scanner-settings-sheet.hidden {
  display: none;
}

.scanner-settings-backdrop {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
}

.scanner-settings-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 440px);
  max-height: min(78vh, 520px);
  overflow: auto;
  margin: 0;
  padding: 16px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  border-radius: 22px 22px 0 0;
  border: 1px solid rgba(0, 245, 212, 0.22);
  border-bottom: 0;
  background: linear-gradient(180deg, rgba(12, 18, 28, 0.98), rgba(6, 10, 18, 0.98));
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: scannerSettingsUp 0.22s ease;
}

@keyframes scannerSettingsUp {
  from {
    transform: translateY(24px);
    opacity: 0.6;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.scanner-settings-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 2px;
}

.scanner-settings-panel-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: #e8fbff;
}

.scanner-settings-close {
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(232, 251, 255, 0.85);
  font-size: 16px;
  cursor: pointer;
}

.scanner-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
}

.scanner-field-label {
  margin: 0;
  padding: 0 2px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(232, 251, 255, 0.5);
}

.scanner-select-shell {
  position: relative;
  width: 100%;
}

.scanner-select-shell::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 12px;
  width: 0;
  height: 0;
  margin-top: -3px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid rgba(0, 245, 212, 0.75);
  pointer-events: none;
}

.scanner-select {
  display: block;
  width: 100%;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  min-height: 48px;
  padding: 10px 34px 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--accent-border);
  background: rgba(6, 10, 18, 0.92);
  color: #e8fbff;
  font-family: "Manrope", sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.scanner-select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.scanner-select:focus {
  outline: none;
  border-color: var(--accent-border-strong);
  box-shadow: 0 0 0 2px rgba(0, 245, 212, 0.2);
}

.scanner-select option {
  background: #0a0c12;
  color: #e8fbff;
}

body[data-page="scanner"] .scanner-overlay-text {
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  max-width: min(70vw, 240px);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  background: rgba(6, 10, 18, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

body[data-page="scanner"] .scanner-overlay-text:empty {
  display: none;
}

.scanner-bottom-sheet {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.scanner-photo-link {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  user-select: none;
}

body[data-page="scanner"] main.layout {
  position: fixed;
  inset: 0;
  max-width: none;
  margin: 0;
  padding: 0;
  z-index: 1;
}

body[data-page="scanner"] .layout {
  height: 100vh;
}

body[data-page="scanner"] .card.detail-card {
  position: fixed;
  inset: 0;
  border-radius: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  padding: 0;
  overflow: hidden;
}

body[data-page="scanner"] .card.detail-card .card-head,
body[data-page="scanner"] .card.detail-card > p.event-meta {
  display: none !important;
}

body[data-page="scanner"] .scanner-camera-head,
body[data-page="scanner"] .scanner-meta,
body[data-page="scanner"] #scannerCameraStatus,
body[data-page="scanner"] main.layout > section.card:not(.detail-card) {
  display: none !important;
}

body[data-page="scanner"] main.scanner-minimal .scanner-stage {
  flex: 1;
  min-height: 0;
  position: relative;
  border-radius: 0;
  box-shadow: none;
}

body[data-page="scanner"] .scanner-video {
  height: 100%;
  max-height: none;
  border-radius: 0;
}

body[data-page="scanner"] .scanner-overlay {
  z-index: 2;
}

body[data-page="scanner"] .scanner-target {
  width: min(85vw, 320px);
  height: min(48vw, 200px);
  max-height: 38vh;
}

body[data-page="scanner"] main.scanner-minimal .scanner-overlay-text {
  bottom: calc(12px + var(--meethub-safe-bottom));
  left: 16px;
  right: 16px;
}

body[data-page="scanner"] .scanner-camera-controls {
  position: absolute;
  right: 12px;
  top: calc(var(--meethub-safe-top) + 52px);
  z-index: 4;
  display: grid;
  gap: 8px;
  width: min(104px, 28vw);
}

body[data-page="scanner"] .scanner-camera-controls .btn {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 8px 6px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
  border-radius: var(--pill-radius);
  background: rgba(6, 10, 18, 0.78);
  border: 1px solid var(--accent-border);
  color: #dffdf8;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

body[data-page="scanner"] .scanner-camera-controls .btn.ghost {
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(232, 251, 255, 0.88);
}

body[data-page="scanner"] .scanner-ocr-debug-wrap {
  position: absolute;
  left: 10px;
  right: calc(12px + min(104px, 28vw) + 10px);
  top: calc(var(--meethub-safe-top) + 10px);
  z-index: 3;
  pointer-events: none;
}

body[data-page="scanner"] #scannerOcrDebug,
body[data-page="scanner"] .scanner-ocr-debug {
  margin-top: 0;
  max-height: 55vh;
  font-size: 12px;
  background: rgba(0, 0, 0, 0.62);
  border-color: rgba(255, 255, 255, 0.14);
}

body[data-page="scanner"] #scannerForm.scanner-bottom-sheet {
  position: relative;
  flex-shrink: 0;
  left: auto;
  right: auto;
  bottom: auto;
  max-width: none;
  width: 100%;
  margin: 0;
  z-index: 4;
  padding: 12px 16px calc(14px + var(--meethub-safe-bottom));
  border-radius: 0;
  border-top: 1px solid var(--accent-border);
  border-left: none;
  border-right: none;
  border-bottom: none;
  background: rgba(4, 6, 12, 0.88);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.35);
}

body[data-page="scanner"] #scannerForm.scanner-bottom-sheet input[type="text"] {
  flex: 1;
  min-width: 0;
  min-height: 44px;
}

body[data-page="scanner"] .scanner-manual-label {
  color: rgba(255, 255, 255, 0.55);
}

body[data-page="scanner"] #scannerForm .ticket-actions-row {
  margin-top: 8px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

body[data-page="scanner"] #scannerForm .scanner-camera-picker-row {
  margin-top: 6px;
}

body[data-page="scanner"] #scannerForm #scannerCameraSelect {
  min-height: 36px;
}

body[data-page="scanner"] #scannerForm .btn {
  width: 100%;
  min-height: 39px;
  transform: none;
}

body[data-page="scanner"] #scannerForm input {
  min-height: 36px;
}

body[data-page="scanner"] .scanner-confirm {
  position: fixed;
  inset: 0;
  z-index: 25;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: max(16px, var(--meethub-safe-top)) max(16px, var(--meethub-safe-right))
    calc(16px + var(--meethub-safe-bottom)) max(16px, var(--meethub-safe-left));
  box-sizing: border-box;
  background: rgba(2, 4, 12, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

body[data-page="scanner"] .scanner-confirm.hidden {
  display: none;
}

body[data-page="scanner"] .scanner-confirm-card {
  position: relative;
  width: 100%;
  max-width: min(360px, calc(100vw - 32px));
  margin: 0 auto;
  flex-shrink: 0;
  border-radius: 24px;
  border: 1px solid rgba(0, 245, 212, 0.28);
  background: linear-gradient(180deg, rgba(14, 22, 34, 0.98), rgba(6, 10, 18, 0.98));
  padding: 22px 18px 18px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  text-align: center;
  overflow: hidden;
  box-sizing: border-box;
  animation: scannerConfirmIn 0.22s ease;
}

@keyframes scannerConfirmIn {
  from {
    transform: translateY(16px) scale(0.98);
    opacity: 0.5;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

body[data-page="scanner"] .scanner-confirm-card::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 0;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.95;
}

body[data-page="scanner"] .scanner-confirm-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 2px auto 10px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0, 245, 212, 0.28);
  background: rgba(0, 245, 212, 0.1);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(0, 245, 212, 0.95);
}

body[data-page="scanner"] .scanner-confirm-event {
  margin: 0 auto 10px;
  max-width: 280px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(232, 251, 255, 0.7);
  line-height: 1.35;
}

body[data-page="scanner"] .scanner-confirm-guest {
  margin: 0 auto 8px;
  max-width: 300px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: #f4fffc;
  word-break: break-word;
}

body[data-page="scanner"] .scanner-confirm-answers {
  margin: 0 auto 12px;
  width: 100%;
  max-width: 300px;
  max-height: min(32vh, 220px);
  overflow: auto;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  padding: 8px 10px;
  box-sizing: border-box;
}

body[data-page="scanner"] .scanner-confirm-answer-row {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 6px 10px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12px;
  line-height: 1.35;
}

body[data-page="scanner"] .scanner-confirm-answer-row:last-child {
  border-bottom: 0;
  padding-bottom: 2px;
}

body[data-page="scanner"] .scanner-confirm-answer-label {
  color: rgba(232, 251, 255, 0.55);
  font-weight: 600;
}

body[data-page="scanner"] .scanner-confirm-answer-value {
  color: rgba(244, 255, 252, 0.95);
  font-weight: 700;
  word-break: break-word;
}

body[data-page="scanner"] .scanner-confirm-title {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #f4fffc;
}

body[data-page="scanner"] .scanner-confirm-panel .scanner-confirm-sub {
  margin: 0 auto 16px;
  max-width: 280px;
  font-size: 14px;
  line-height: 1.4;
  color: rgba(232, 251, 255, 0.62);
}

body[data-page="scanner"] .scanner-confirm-code {
  display: block;
  margin: 0 auto 16px;
  padding: 14px 12px;
  max-width: 100%;
  box-sizing: border-box;
  border-radius: 16px;
  font-size: 22px;
  letter-spacing: 0.16em;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(0, 245, 212, 0.28);
  color: #f2fffc;
  text-align: center;
  word-break: keep-all;
  overflow-wrap: normal;
}

body[data-page="scanner"] .scanner-confirm-anim {
  position: relative;
  width: 76px;
  height: 76px;
  margin: 0 auto 8px;
}

body[data-page="scanner"] .scanner-confirm-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid rgba(0, 245, 212, 0.55);
  box-shadow: 0 0 22px rgba(0, 245, 212, 0.28);
  animation: scannerPulse 1.2s ease-in-out infinite;
}

body[data-page="scanner"] .scanner-confirm-glyph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #8fffea;
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 0 18px rgba(0, 245, 212, 0.45);
}

body[data-page="scanner"] .scanner-confirm-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 2px;
}

body[data-page="scanner"] .scanner-confirm-actions .btn {
  width: 100%;
  justify-content: center;
  min-height: 48px;
  border-radius: 14px;
}

body[data-page="scanner"] .scanner-confirm--first {
  background: radial-gradient(ellipse 70% 45% at 50% 18%, rgba(0, 245, 212, 0.18), transparent 55%),
    rgba(2, 4, 12, 0.72);
}

body[data-page="scanner"] .scanner-confirm-card--first::before {
  background: linear-gradient(90deg, transparent, #00f5d4, transparent);
}

body[data-page="scanner"] .scanner-confirm--repeat {
  background: radial-gradient(ellipse 70% 45% at 50% 18%, rgba(239, 68, 68, 0.22), transparent 55%),
    rgba(12, 4, 6, 0.78);
}

body[data-page="scanner"] .scanner-confirm-card--repeat {
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: 0 24px 64px rgba(80, 0, 0, 0.35);
}

body[data-page="scanner"] .scanner-confirm-card--repeat::before {
  background: linear-gradient(90deg, transparent, rgba(239, 68, 68, 0.95), transparent);
}

body[data-page="scanner"] .scanner-confirm-card--repeat .scanner-confirm-badge {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.14);
  color: #fecaca;
}

body[data-page="scanner"] .scanner-confirm-card--repeat .scanner-confirm-ring {
  border-color: rgba(239, 68, 68, 0.55);
  box-shadow: 0 0 24px rgba(239, 68, 68, 0.3);
  animation: scannerPulseRed 1.2s ease-in-out infinite;
}

body[data-page="scanner"] .scanner-confirm-card--repeat .scanner-confirm-glyph {
  color: #fecaca;
  text-shadow: 0 0 18px rgba(239, 68, 68, 0.45);
}

body[data-page="scanner"] .scanner-confirm-card--repeat .scanner-confirm-code {
  border-color: rgba(239, 68, 68, 0.3);
}

body[data-page="scanner"] .scanner-confirm--reentry {
  background: radial-gradient(ellipse 70% 45% at 50% 18%, rgba(96, 165, 250, 0.18), transparent 55%),
    rgba(2, 4, 12, 0.72);
}

body[data-page="scanner"] .scanner-confirm-card--reentry {
  border-color: rgba(96, 165, 250, 0.35);
}

body[data-page="scanner"] .scanner-confirm-card--reentry::before {
  background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.95), transparent);
}

body[data-page="scanner"] .scanner-confirm-card--reentry .scanner-confirm-badge {
  border-color: rgba(96, 165, 250, 0.35);
  background: rgba(96, 165, 250, 0.12);
  color: #93c5fd;
}

body[data-page="scanner"] .scanner-confirm-card--reentry .scanner-confirm-ring {
  border-color: rgba(96, 165, 250, 0.5);
  box-shadow: 0 0 22px rgba(96, 165, 250, 0.28);
}

body[data-page="scanner"] .scanner-confirm-card--reentry .scanner-confirm-glyph {
  color: #93c5fd;
  text-shadow: 0 0 16px rgba(96, 165, 250, 0.4);
}

body[data-page="scanner"] .scanner-confirm--wrong-event,
body[data-page="scanner"] .scanner-confirm--wrong-org {
  background: radial-gradient(ellipse 70% 45% at 50% 18%, rgba(251, 146, 60, 0.2), transparent 55%),
    rgba(12, 8, 2, 0.78);
}

body[data-page="scanner"] .scanner-confirm-card--wrong-event,
body[data-page="scanner"] .scanner-confirm-card--wrong-org {
  border-color: rgba(251, 146, 60, 0.45);
  box-shadow: 0 24px 64px rgba(60, 30, 0, 0.35);
}

body[data-page="scanner"] .scanner-confirm-card--wrong-event::before,
body[data-page="scanner"] .scanner-confirm-card--wrong-org::before {
  background: linear-gradient(90deg, transparent, rgba(251, 146, 60, 0.95), transparent);
}

body[data-page="scanner"] .scanner-confirm-card--wrong-event .scanner-confirm-badge,
body[data-page="scanner"] .scanner-confirm-card--wrong-org .scanner-confirm-badge {
  border-color: rgba(251, 146, 60, 0.4);
  background: rgba(251, 146, 60, 0.14);
  color: #fdba74;
}

body[data-page="scanner"] .scanner-confirm-card--wrong-event .scanner-confirm-ring,
body[data-page="scanner"] .scanner-confirm-card--wrong-org .scanner-confirm-ring {
  border-color: rgba(251, 146, 60, 0.55);
  box-shadow: 0 0 24px rgba(251, 146, 60, 0.28);
  animation: none;
}

body[data-page="scanner"] .scanner-confirm-card--wrong-event .scanner-confirm-glyph,
body[data-page="scanner"] .scanner-confirm-card--wrong-org .scanner-confirm-glyph {
  color: #fdba74;
  text-shadow: 0 0 16px rgba(251, 146, 60, 0.4);
}

body[data-page="scanner"] .scanner-confirm-card--wrong-event .scanner-confirm-code,
body[data-page="scanner"] .scanner-confirm-card--wrong-org .scanner-confirm-code {
  border-color: rgba(251, 146, 60, 0.3);
}

body[data-page="scanner"] .scanner-confirm-card--blocked {
  border-color: rgba(148, 163, 184, 0.3);
}

body[data-page="scanner"] .scanner-confirm-card--blocked::before {
  background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.8), transparent);
}

body[data-page="scanner"] .scanner-confirm-card--blocked .scanner-confirm-badge {
  border-color: rgba(148, 163, 184, 0.3);
  background: rgba(148, 163, 184, 0.1);
  color: #cbd5e1;
}

body[data-page="scanner"] .scanner-confirm-card--blocked .scanner-confirm-ring {
  border-color: rgba(148, 163, 184, 0.4);
  animation: none;
  opacity: 0.85;
  box-shadow: none;
}

body[data-page="scanner"] .scanner-confirm-card--blocked .scanner-confirm-glyph {
  color: #94a3b8;
  text-shadow: none;
  font-size: 32px;
}

body[data-page="scanner"] .btn.danger-solid {
  border-radius: var(--pill-radius);
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  border: 1px solid rgba(254, 202, 202, 0.35);
  color: #fff;
  font-weight: 800;
}

body[data-page="scanner"] .btn.danger-solid:hover {
  filter: brightness(1.06);
}

body[data-page="scanner"] .btn.light-border {
  border-color: rgba(255, 255, 255, 0.35);
  color: #f1f5f9;
}

body[data-page="scanner"] .btn.subtle {
  font-size: 13px;
  font-weight: 600;
  opacity: 0.92;
  border-color: var(--pill-ghost-border);
  background: var(--pill-ghost-bg);
  color: var(--muted);
}

@keyframes scannerPulse {
  0% {
    transform: scale(0.94);
    opacity: 0.5;
  }
  70% {
    transform: scale(1.03);
    opacity: 1;
  }
  100% {
    transform: scale(0.94);
    opacity: 0.5;
  }
}

@keyframes scannerPulseRed {
  0% {
    transform: scale(0.94);
    opacity: 0.55;
  }
  70% {
    transform: scale(1.03);
    opacity: 1;
  }
  100% {
    transform: scale(0.94);
    opacity: 0.55;
  }
}

#scannerResult {
  white-space: pre-wrap;
  word-break: break-word;
}

.mobile-tabbar {
  display: none;
}

.mobile-drawer {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(84px + var(--meethub-safe-bottom));
  z-index: 30;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-control);
  background: var(--drawer-bg);
  backdrop-filter: blur(8px);
  padding: 12px;
  box-shadow: var(--shadow-lg);
}

.mobile-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.mobile-drawer-links {
  display: grid;
  gap: 6px;
}

.mobile-drawer-links a {
  justify-content: flex-start;
  width: 100%;
  min-height: 44px;
  white-space: normal;
  color: var(--pill-hover-fg);
}

/* Сильнее, чем .mobile-drawer-links a { display: inline-flex } из общего блока пилюль */
.mobile-drawer-links a.mobile-drawer-auth-link.hidden {
  display: none !important;
}

.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: var(--backdrop);
  z-index: 25;
}

.hidden {
  display: none;
}

/* ——— Кабинет организатора ——— */
.organizer-layout {
  padding-bottom: 96px;
}

.organizer-main {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  width: 100%;
}

/* ——— Кабинет организатора: chrome ——— */
body[data-page^="organizer"] .organizer-main > .card {
  border-radius: 18px;
}

.organizer-intro-card {
  position: relative;
  overflow: hidden;
  padding: 22px 22px 18px;
  background:
    radial-gradient(120% 90% at 0% 0%, var(--accent-soft) 0%, transparent 55%),
    linear-gradient(180deg, var(--surface-raised) 0%, var(--card) 100%);
  border-color: var(--accent-border);
  animation: organizer-intro-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.organizer-intro-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--brand-accent), var(--accent));
}

@keyframes organizer-intro-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .organizer-intro-card {
    animation: none;
  }

  .organizer-kpi:hover,
  .organizer-quick-link:hover {
    transform: none;
  }
}

.organizer-intro-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.organizer-intro-kicker {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-accent);
}

.organizer-page-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.15;
}

.organizer-intro-lead {
  margin: 0;
  max-width: 58ch;
  font-size: 14px;
  line-height: 1.45;
}

.organizer-intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.organizer-panel-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.organizer-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.organizer-kpi {
  position: relative;
  z-index: 1;
  isolation: isolate;
  overflow: hidden;
  padding: 16px 16px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(24, 24, 27, 0.42);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
  backdrop-filter: blur(18px) saturate(1.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition:
    border-color 0.2s ease,
    transform 0.2s ease,
    background 0.2s ease;
}

.organizer-kpi::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(45, 212, 191, 0.18), transparent 55%),
    linear-gradient(160deg, rgba(39, 39, 42, 0.55), rgba(24, 24, 27, 0.25));
  pointer-events: none;
}

.organizer-kpi::after {
  content: "";
  position: absolute;
  inset: auto -18% -45% auto;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(45, 212, 191, 0.22);
  filter: blur(18px);
  z-index: -1;
  pointer-events: none;
}

.organizer-kpi:hover {
  border-color: var(--accent-border);
  transform: translateY(-2px);
  background: rgba(24, 24, 27, 0.52);
}

html[data-theme="light"] .organizer-kpi {
  border-color: rgba(24, 24, 27, 0.08);
  background: rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

html[data-theme="light"] .organizer-kpi::before {
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(15, 118, 110, 0.12), transparent 55%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.7), rgba(244, 244, 245, 0.35));
}

.organizer-intro-card--with-kpi {
  padding-bottom: 20px;
}

.organizer-intro-card--with-kpi .organizer-intro-lead {
  margin-bottom: 0;
}

/* Компактные строки вместо тяжёлых карточек/таблиц */
.organizer-simple-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.organizer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 14px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--card-border);
  background: rgba(24, 24, 27, 0.35);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

html[data-theme="light"] .organizer-row {
  background: rgba(255, 255, 255, 0.7);
}

.organizer-row-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.organizer-row-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.015em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.organizer-row-meta {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.organizer-row-meta code {
  font-size: 12px;
}

.organizer-row-side {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.organizer-row-side .btn {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

.organizer-passes-toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 14px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--card-border);
  background: var(--bg-soft);
}

.organizer-passes-toolbar-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.organizer-passes-toolbar-line .form-field {
  margin: 0;
}

.organizer-passes-toolbar-dates {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  align-items: end;
}

.organizer-passes-toolbar-dates .form-field {
  margin: 0;
}

.organizer-passes-tab-hint {
  display: none;
}

.organizer-promo-form.admin-inline-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px 12px;
  align-items: end;
}

.organizer-row--muted {
  opacity: 0.72;
}

.organizer-row--pending {
  border-color: var(--accent-border);
}

.organizer-finance-kpis {
  margin: 0 0 14px;
}

.organizer-finance-profile-line {
  margin: 0 0 4px;
}

.organizer-venues-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.organizer-kpi-label {
  display: block;
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.organizer-kpi-value {
  display: block;
  font-size: clamp(1.35rem, 3vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--brand-accent);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.organizer-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.organizer-quick-link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 16px 14px;
  border-radius: 16px;
  border: 1px solid var(--card-border);
  background: var(--surface-raised);
  text-decoration: none;
  color: inherit;
  transition:
    transform 0.2s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.organizer-quick-link:hover {
  transform: translateY(-3px);
  border-color: var(--accent-border-strong);
  background: linear-gradient(160deg, var(--accent-soft), var(--surface-raised) 55%);
  box-shadow: var(--shadow-md);
}

.organizer-quick-link:focus-visible {
  outline: 2px solid var(--accent-border-strong);
  outline-offset: 2px;
}

.organizer-quick-link strong {
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.organizer-quick-link span {
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}

button.organizer-quick-link {
  appearance: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
  width: 100%;
}

/* Act-as в teal-системе */
.organizer-subnav-link.meethub-admin-subnav-link {
  color: var(--brand-accent);
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

.meethub-act-as-bar {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 16px;
  margin: 0;
  background: linear-gradient(180deg, var(--accent-soft), transparent);
  border-bottom: 1px solid var(--accent-border);
}

.meethub-open-test-banner {
  position: sticky;
  top: var(--meethub-topbar-sticky-h, 72px);
  z-index: 90;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 9px 16px;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--brand-accent) 16%, var(--surface-raised)),
    color-mix(in srgb, var(--brand-accent) 8%, var(--bg))
  );
  border-bottom: 1px solid var(--accent-border);
  box-shadow: var(--shadow-sm);
}

.meethub-open-test-banner__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 6px 10px;
  text-align: center;
  font-family: "Manrope", sans-serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
}

.meethub-open-test-banner__mark {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-accent);
}

@media (max-width: 640px) {
  .meethub-open-test-banner {
    padding: 8px 12px;
  }
  .meethub-open-test-banner__inner {
    font-size: 12px;
  }
}

.meethub-act-as-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.meethub-act-as-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-accent);
}

.meethub-act-as-select {
  flex: 1;
  min-width: min(100%, 220px);
  max-width: 420px;
  min-height: 42px;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid var(--accent-border);
  background: var(--surface-raised);
  color: var(--text);
  font-family: "Manrope", sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.meethub-act-as-side {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin: 0 0 10px;
  padding: 10px;
  box-sizing: border-box;
  border-radius: 14px;
  border: 1px solid var(--accent-border);
  background: linear-gradient(180deg, var(--accent-soft), transparent);
}

.meethub-act-as-side .meethub-act-as-select {
  width: 100%;
  max-width: none;
  min-width: 0;
  flex: none;
}

.organizer-subnav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 0 0 20px;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid var(--card-border);
  background: var(--surface-raised);
  box-shadow: var(--shadow-sm);
}

.organizer-subnav-support {
  margin-left: auto;
}

body[data-page^="organizer"] .organizer-subnav-link.active,
body[data-page^="organizer"] .organizer-subnav-link[aria-current="page"] {
  color: var(--text);
  border-color: var(--accent-border);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent-glow);
}

body[data-page^="organizer"] .organizer-tab.active,
body[data-page^="organizer"] .organizer-passes-tab.active {
  color: var(--text);
  border-color: var(--accent-border);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent-glow);
}

/* Desktop: доп. навигация слева (орг + админ) */
@media (min-width: 900px) {
  .organizer-layout {
    display: flex;
    align-items: flex-start;
    gap: 22px;
  }

  .organizer-subnav {
    flex: 0 0 228px;
    width: 228px;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 6px;
    margin: 0;
    padding: 12px;
    border-bottom: none;
    position: sticky;
    top: calc(72px + var(--meethub-system-top, 0px));
    max-height: calc(100vh - 84px - var(--meethub-system-top, 0px));
    overflow-y: auto;
  }

  .organizer-subnav-link {
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
    text-align: left;
    gap: 8px;
  }

  .organizer-subnav-link .nav-label {
    flex: 1;
    min-width: 0;
  }

  .organizer-subnav-support {
    margin-left: 0;
    margin-top: 6px;
  }

  .organizer-main {
    flex: 1;
    min-width: 0;
  }
}

@media (max-width: 680px) {
  .organizer-kpi-grid {
    grid-template-columns: 1fr;
  }

  .organizer-intro-card {
    padding: 18px 16px 16px;
  }

  .organizer-page-title {
    font-size: 1.25rem;
  }
}

.organizer-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.organizer-hub-tile h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.organizer-hub-tile p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

a.organizer-hub-tile.link-card {
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

a.organizer-hub-tile.link-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-border-strong);
}

.organizer-hub-tile-btn {
  text-align: left;
  width: 100%;
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 18px 20px;
  background: var(--card);
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.organizer-hub-tile-btn:hover {
  transform: translateY(-2px);
  border-color: var(--accent-border-strong);
}

.organizer-finance-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.organizer-finance-big {
  margin: 8px 0 0;
  font-size: clamp(1.6rem, 3.5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--brand-accent);
  font-variant-numeric: tabular-nums;
}

.organizer-scanners-card .organizer-scanners-lead {
  margin-bottom: 18px;
}

/* ——— Админ-панель ——— */
.admin-layout {
  padding-bottom: 96px;
}

.admin-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.admin-intro-card {
  position: relative;
  overflow: hidden;
  padding: 22px 22px 18px;
  background:
    linear-gradient(135deg, var(--accent-soft) 0%, transparent 42%),
    var(--card);
  border-color: var(--accent-border);
}

.admin-intro-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--brand-accent), var(--accent));
}

.admin-intro-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.admin-intro-kicker {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-accent);
}

.admin-page-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.6vw, 1.55rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-intro-aside {
  margin: 0;
  max-width: 22ch;
  text-align: right;
  line-height: 1.35;
}

.admin-intro-lead {
  margin: 0;
  max-width: 62ch;
}

.admin-tabs-wrap {
  margin: 0;
  padding: 6px;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  background: var(--surface-raised);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.admin-tabs-scroll {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-border-strong) transparent;
  -webkit-overflow-scrolling: touch;
}

.admin-tabs-scroll::-webkit-scrollbar {
  height: 4px;
}

.admin-tabs-scroll::-webkit-scrollbar-thumb {
  background: var(--accent-border-strong);
  border-radius: 4px;
}

.admin-tab {
  flex: 0 0 auto;
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition:
    color 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.admin-tab:hover {
  color: var(--text);
  background: var(--bg-soft);
}

.admin-tab:focus-visible {
  outline: 2px solid var(--accent-border-strong);
  outline-offset: 2px;
}

.admin-tab[aria-selected="true"] {
  color: var(--text);
  border-color: var(--accent-border);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent-glow);
}

.admin-tab-panels {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.admin-tab-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.admin-tab-panel > .card {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.admin-tab-panel[hidden] {
  display: none !important;
}

.admin-section-hint {
  margin-top: 0;
  margin-bottom: 12px;
  max-width: 720px;
}

.admin-stats-root {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.admin-stat-card {
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.02);
}

.admin-stat-card--wide {
  grid-column: 1 / -1;
}

.admin-stat-value {
  margin: 6px 0 0;
  font-size: 1.35rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.admin-stats-split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.admin-stats-block-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-stats-block .admin-stats-block-title:not(:first-child) {
  margin-top: 14px;
}

.admin-stats-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
}

.admin-stats-list--compact {
  font-size: 12px;
}

.admin-stats-list li {
  margin-bottom: 4px;
}

.admin-top-events {
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
  line-height: 1.55;
}

.admin-top-ev-i {
  color: var(--muted);
  margin-right: 4px;
}

.admin-mono {
  font-size: 11px;
}

.admin-table-wrap {
  overflow-x: auto;
  margin-top: 8px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  width: 100%;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.admin-table-wrap--tight {
  margin-top: 16px;
}

.admin-data-table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  table-layout: auto;
}

.admin-data-table th,
.admin-data-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--card-border);
  vertical-align: top;
}

.admin-data-table th {
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

.admin-data-table tbody tr:last-child td {
  border-bottom: none;
}

.admin-pill {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--bg-soft);
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  vertical-align: middle;
}

.admin-pill--accent {
  border-color: var(--accent-border);
  background: var(--accent-soft);
  color: var(--brand-accent);
}

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

.admin-pass-format-field {
  margin: 0;
}

.admin-pass-format-label {
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

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

.admin-pass-format-option {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 0;
  padding: 14px 14px 14px 12px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: var(--bg-soft);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.admin-pass-format-option:has(input:checked) {
  border-color: rgba(15, 118, 110, 0.45);
  background: rgba(15, 118, 110, 0.08);
}

.admin-pass-format-option input {
  margin-top: 3px;
  accent-color: #0f766e;
}

.admin-pass-format-option span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.admin-pass-format-option strong {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}

.admin-pass-format-option small {
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

@media (max-width: 640px) {
  .admin-pass-format-toggle {
    grid-template-columns: 1fr;
  }
}

.admin-settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.admin-settings-actions {
  display: flex;
  justify-content: flex-start;
}

.admin-org-fee-input {
  width: 96px;
  min-height: 40px;
}

@media (max-width: 900px) {
  .admin-settings-grid {
    grid-template-columns: 1fr;
  }

  .admin-intro-aside {
    text-align: left;
    max-width: none;
  }
}

.admin-payout-form {
  margin-bottom: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
}

.admin-payout-form .form-field {
  margin-bottom: 0;
}

.admin-payout-form button[type="submit"] {
  grid-column: 1 / -1;
  justify-self: start;
}

.admin-csv-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-bottom: 12px;
}

.admin-csv-row .form-field {
  flex: 1 1 200px;
  min-width: 180px;
  margin-bottom: 0;
}

.admin-csv-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-notify-form {
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  align-items: end;
}

.admin-notify-form .form-field {
  margin-bottom: 0;
}

.admin-notify-form button[type="submit"] {
  grid-column: 1 / -1;
  justify-self: start;
}

.admin-security-table td:last-child {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-template-id {
  font-size: 11px;
  word-break: break-all;
  margin-bottom: 4px;
  opacity: 0.9;
}

.admin-payout-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 120px;
}

.admin-payout-status-btn {
  font-size: 11px !important;
  padding: 6px 8px !important;
  min-height: 0 !important;
}

.admin-payout-meta {
  margin: 4px 0 0;
  font-size: 11px;
}

.admin-roadmap-card .admin-roadmap-list {
  margin: 0;
  padding-left: 20px;
  line-height: 1.55;
}

.admin-roadmap-list li {
  margin-bottom: 8px;
}

.admin-intro-card .event-meta {
  margin-top: 0;
}

.admin-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-card-head h2 {
  margin: 0;
}

.admin-moderation-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-moderation-item {
  padding: 16px 18px;
}

.mh-org-approval-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid var(--accent-border);
  background: var(--accent-soft);
}

.mh-org-approval-banner__text {
  margin: 0;
  flex: 1 1 220px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
}

.admin-moderation-item-head h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.admin-moderation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.admin-reject-field {
  margin-top: 12px;
}

.admin-role-form {
  max-width: 420px;
}

.admin-audit-wrap {
  overflow-x: auto;
  margin-top: 8px;
  -webkit-overflow-scrolling: touch;
}

.admin-audit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-audit-table th,
.admin-audit-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--card-border);
  vertical-align: top;
}

.admin-audit-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-audit-id {
  word-break: break-all;
  max-width: 140px;
}

@media (max-width: 900px) {
  .admin-stats-split {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* Admin subnav link in org rail — цвет задан в блоке кабинета */

@media (min-width: 900px) {
  .admin-shell {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    grid-template-areas:
      "intro intro"
      "nav panels";
    gap: 18px 22px;
    align-items: start;
  }

  .admin-intro-card {
    grid-area: intro;
  }

  .admin-tabs-wrap {
    grid-area: nav;
    position: sticky;
    top: calc(72px + var(--meethub-system-top, 0px));
    max-height: calc(100vh - 84px - var(--meethub-system-top, 0px));
    overflow: auto;
    align-self: start;
  }

  .admin-tabs-scroll {
    flex-direction: column;
    flex-wrap: nowrap;
    overflow: visible;
    gap: 4px;
  }

  .admin-tab {
    width: 100%;
    justify-content: flex-start;
    text-align: left;
    white-space: normal;
    gap: 8px;
  }

  .admin-tab .nav-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
  }

  .admin-tab-panels {
    grid-area: panels;
    min-width: 0;
  }
}

.organizer-scanners-grid {
  display: grid;
  gap: 20px;
  align-items: start;
}

@media (min-width: 768px) {
  .organizer-scanners-grid {
    grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
    gap: 24px;
  }
}

.organizer-scanners-panel {
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--card-border);
  background: var(--bg-soft);
}

.organizer-scanners-heading {
  margin: 0 0 12px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.organizer-scanners-assign-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.organizer-scanners-assign-form .form-field {
  margin: 0;
}

.organizer-scanners-assign-form .form-field label {
  font-size: 13px;
}

.organizer-scanners-assign-form .btn {
  align-self: flex-start;
}

.user-assign-field-wrap {
  position: relative;
}

.user-assign-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 50;
  max-height: 280px;
  overflow-y: auto;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: var(--bg-soft);
  box-shadow: 0 14px 48px rgba(0, 0, 0, 0.5);
}

.user-assign-results.hidden {
  display: none !important;
}

.user-assign-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  border: none;
  border-bottom: 1px solid var(--card-border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
}

.user-assign-option:last-child {
  border-bottom: none;
}

.user-assign-option:hover,
.user-assign-option:focus-visible {
  background: var(--accent-soft);
  outline: none;
}

.user-assign-option-name {
  display: block;
  font-weight: 700;
  font-size: 14px;
}

.user-assign-option-meta {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}

.user-assign-empty {
  padding: 12px 14px;
  font-size: 13px;
  color: var(--muted);
}

.organizer-scanners-panel--list .organizer-scanners-empty {
  margin: 0;
}

.organizer-scanners-table-wrap {
  margin-top: 0;
}

.organizer-events-tabs {
  display: flex;
  gap: 10px;
  margin: 16px 0 14px;
  flex-wrap: wrap;
}

.organizer-events-tabs .organizer-tab {
  font-size: 14px;
}

.organizer-venue-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.organizer-venue-card-head h3 {
  margin: 0;
  font-size: 1rem;
}

.organizer-venue-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-sm {
  min-height: 34px;
  padding: 6px 12px;
  font-size: 12px;
}

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

.organizer-venue-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.organizer-venue-map-field {
  margin-top: 4px;
}

.organizer-venue-map-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--muted);
}

.organizer-venue-map {
  height: min(320px, 52vh);
  min-height: 220px;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  border: none;
  background: var(--bg-soft);
  z-index: 1;
}

.organizer-venue-map .leaflet-container {
  font-family: inherit;
}

.organizer-venue-map-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

/* ——— Проходки организатора (список продаж) ——— */
.organizer-passes-card .organizer-passes-card-head {
  align-items: flex-start;
}

.organizer-passes-lead {
  margin: 6px 0 0;
  max-width: 52ch;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

.organizer-passes-event-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 14, 22, 0.65);
}

.organizer-passes-event-filter-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: rgba(232, 251, 255, 0.9);
}

.organizer-passes-main-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.organizer-passes-main-tabs .organizer-passes-tab {
  min-height: 40px;
  padding: 8px 16px;
  font-weight: 700;
  font-size: 13px;
}

.organizer-passes-tab-hint {
  display: none !important;
}

.organizer-passes-toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 14px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--card-border);
  background: var(--bg-soft);
  box-shadow: none;
}

.organizer-passes-toolbar-title {
  display: none;
}

.organizer-passes-search-field {
  margin: 0;
}

.organizer-passes-search-field input {
  width: 100%;
  min-height: 40px;
}

.organizer-passes-toolbar-grid {
  display: none;
}

.organizer-passes-count {
  margin: 0;
  padding: 0;
  border: none;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  align-self: center;
}

.organizer-passes-list.organizer-simple-list,
.organizer-passes-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.organizer-passes-empty {
  padding: 22px 16px;
  border-radius: 14px;
  border: 1px dashed var(--card-border);
  background: transparent;
  text-align: center;
}

.organizer-passes-empty p {
  margin: 0 auto;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
  max-width: 36ch;
}

.organizer-pass-card {
  border-radius: 16px;
  border: 1px solid var(--accent-hover-bg);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.05) 0%, rgba(10, 12, 20, 0.94) 38%);
  padding: 16px 18px 14px;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.28);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.organizer-pass-card:hover {
  border-color: var(--accent-border);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.32);
}

.organizer-pass-card--archive {
  border-color: rgba(255, 255, 255, 0.08);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.02) 0%, rgba(8, 9, 14, 0.88) 40%);
  opacity: 0.96;
}

.organizer-pass-card--archive:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

.organizer-pass-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.organizer-pass-card-titles {
  flex: 1;
  min-width: 0;
}

.organizer-pass-event-title {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--text);
}

.organizer-pass-event-when {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

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

.organizer-pass-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}

.organizer-pass-pill--active {
  color: #0a0e12;
  background: rgba(0, 245, 212, 0.88);
  border-color: var(--accent-border-strong);
}

.organizer-pass-pill--pending {
  color: #1a1208;
  background: rgba(251, 191, 36, 0.9);
  border-color: rgba(251, 191, 36, 0.55);
}

.organizer-pass-card--pending {
  border-color: rgba(251, 191, 36, 0.4);
}

.organizer-pass-pill--used {
  color: #eaf9ff;
  background: rgba(99, 102, 241, 0.35);
  border-color: rgba(165, 180, 252, 0.35);
}

.organizer-pass-pill--exit {
  color: #fff8ec;
  background: rgba(245, 158, 11, 0.35);
  border-color: rgba(252, 211, 77, 0.35);
}

.organizer-pass-pill--void {
  color: #ffecec;
  background: rgba(239, 68, 68, 0.28);
  border-color: rgba(252, 165, 165, 0.35);
}

.organizer-pass-pill--muted {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}

.organizer-pass-dl {
  margin: 0;
  display: grid;
  gap: 8px 20px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.organizer-pass-dl-row {
  margin: 0;
}

.organizer-pass-dl-row dt {
  margin: 0 0 2px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(168, 177, 199, 0.85);
}

.organizer-pass-dl-row dd {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: rgba(232, 251, 255, 0.92);
  word-break: break-word;
}

.organizer-pass-revoke-btn {
  flex-shrink: 0;
  color: #fff !important;
  background: rgba(239, 68, 68, 0.95) !important;
  border-color: rgba(252, 165, 165, 0.65) !important;
  font-weight: 800;
  min-height: 36px;
  padding: 8px 14px;
  border-radius: var(--pill-radius);
}

.organizer-pass-revoke-btn:hover {
  background: rgba(220, 38, 38, 1) !important;
  border-color: rgba(254, 202, 202, 0.85) !important;
}

.organizer-finance-profile {
  margin-bottom: 18px;
}

.organizer-finance-payouts-title {
  margin: 0 0 10px;
  font-size: 1rem;
}

.organizer-payout-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.organizer-payout-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--card-border);
}

.organizer-support-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: 100%;
  max-width: 100vw;
  padding: max(12px, var(--meethub-safe-top, 0px)) max(12px, var(--meethub-safe-right, 0px))
    max(12px, var(--meethub-safe-bottom, 0px)) max(12px, var(--meethub-safe-left, 0px));
  overflow: hidden;
}

.organizer-support-overlay.hidden {
  display: none;
}

.organizer-support-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 4, 12, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.organizer-support-card {
  position: relative;
  z-index: 1;
  width: min(420px, calc(100vw - 24px));
  max-width: 100%;
  max-height: min(94dvh, 720px);
  overflow-x: hidden;
  overflow-y: auto;
  box-sizing: border-box;
  padding: 16px;
}

.organizer-support-card > .card-head {
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.organizer-support-card > .card-head h2 {
  flex: 1 1 auto;
  min-width: 0;
  font-size: clamp(15px, 4.2vw, 18px);
  line-height: 1.2;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}

.organizer-support-card .modal-close-x {
  flex: 0 0 auto;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  border-radius: 10px;
}

.organizer-support-card.event-share-card {
  width: min(440px, calc(100vw - 20px));
  max-height: min(96dvh, 780px);
  padding: 18px;
}

.support-contacts {
  display: grid;
  gap: 8px;
  margin: 12px 0 16px;
}

.support-contact-link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: rgba(0, 0, 0, 0.18);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.support-contact-link:hover {
  border-color: rgba(0, 245, 212, 0.35);
  background: rgba(0, 245, 212, 0.06);
}

.support-contact-kind {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(232, 251, 255, 0.55);
}

.support-contact-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  text-align: right;
  word-break: break-word;
}

.support-message-form {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.support-message-form textarea,
.support-message-form input[type="email"] {
  width: 100%;
  box-sizing: border-box;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
  resize: vertical;
}

.support-message-form .btn {
  width: 100%;
}

.paid-checkout-card {
  padding: 16px 16px 14px;
  width: min(400px, calc(100vw - 24px));
}

.paid-checkout-card .card-head {
  align-items: flex-start;
  margin-bottom: 8px;
}

.paid-checkout-card .card-head h2 {
  font-size: 15px;
  letter-spacing: 0.03em;
  line-height: 1.2;
}

.paid-checkout-card .paid-checkout-close {
  flex-shrink: 0;
  min-height: 32px;
  padding: 4px 10px;
  font-size: 13px;
}

.paid-checkout-event {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.paid-checkout-amount {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.paid-checkout-promo-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.paid-checkout-promo-row input {
  flex: 1 1 auto;
  min-width: 0;
}

.paid-checkout-promo-row .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.paid-checkout-promo-status {
  min-height: 1.2em;
  margin-top: 6px;
}

.paid-checkout-promo-status--ok {
  color: var(--brand-accent, #2dd4bf);
}

.paid-checkout-promo-status--error {
  color: #f87171;
}

.organizer-promo-form {
  margin-bottom: 16px;
}

.paid-checkout-tier-wrap > .field-hint {
  margin: 12px 0 0;
  font-size: 12px;
}

.paid-checkout-hint {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.4;
}

.paid-checkout-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.paid-checkout-actions .btn {
  width: 100%;
  min-height: 44px;
}

.paid-checkout-actions .btn.ghost {
  min-height: 40px;
  border-color: transparent;
  color: var(--muted);
}

.paid-checkout-success-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.paid-checkout-success-actions .btn,
.paid-checkout-success-actions .link-btn {
  width: 100%;
  min-height: 44px;
  text-align: center;
  justify-content: center;
  display: inline-flex;
  align-items: center;
}

.hidden-by-role {
  display: none !important;
}

body.no-create-role #createVenuePresetWrap {
  display: none !important;
}

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

@keyframes drift {
  from {
    transform: translateY(-10px) scale(1);
  }
  to {
    transform: translateY(12px) scale(1.08);
  }
}

@keyframes spin-var {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1080px) {
  .desktop-nav {
    display: none;
  }
  .hero {
    grid-template-columns: 1fr;
  }
  .content-grid {
    grid-template-columns: 1fr;
  }
  .create-layout {
    grid-template-columns: 1fr;
  }
  .create-preview {
    position: static;
    order: -1;
  }
  .create-actions-bar-btns {
    grid-template-columns: 1fr;
  }
  .create-inline-grid--datetime {
    grid-template-columns: 1fr;
  }
  .create-jump-nav {
    position: sticky;
    top: 0;
    z-index: 6;
    padding: 8px 0;
    margin-bottom: 12px;
    background: linear-gradient(to bottom, var(--bg, #09090b) 70%, transparent);
  }
  .events-grid {
    grid-template-columns: 1fr;
  }

  /* Мобилка: обложка — широкий баннер сверху */
  .events-grid > .event-card {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
  }

  .events-grid > .event-card > .event-cover {
    position: relative;
    width: 100%;
    min-width: 0;
    max-width: none;
    height: auto;
    aspect-ratio: 16 / 9;
    margin: 0;
    border-radius: 0;
    align-self: stretch;
    overflow: hidden;
    flex-shrink: 0;
  }

  .events-grid > .event-card > .event-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
  }

  .events-grid > .event-card > .event-body {
    padding: 14px 14px 16px;
  }

  .events-grid--similar .event-cover {
    aspect-ratio: 16 / 9;
  }

  .tickets-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .auth-grid,
  .create-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .filters-grid {
    grid-template-columns: 1fr 1fr;
  }

  .filters-grid > #searchInput,
  .filters-grid > #accessTypeFilter,
  .filters-grid > #districtFilter {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  :root {
    --pill-min-h: 44px;
    --pill-pad-y: 10px;
    --pill-pad-x: 16px;
    --pill-fs: 14px;
  }

  html,
  body {
    overflow-x: clip;
    max-width: 100%;
  }

  body {
    padding-bottom: calc(82px + var(--meethub-safe-bottom));
  }

  .layout {
    padding: 18px max(16px, var(--meethub-safe-left)) 18px max(16px, var(--meethub-safe-right));
    gap: 16px;
  }

  .card {
    padding: 18px;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    max-width: 100%;
    min-width: 0;
  }

  .card-head {
    margin-bottom: 14px;
    gap: 10px;
  }

  .card h2,
  .detail-head h2,
  .event-detail-page-head h2,
  .paid-checkout-card .card-head h2 {
    font-size: clamp(14px, 3.8vw, 17px);
    line-height: 1.2;
    letter-spacing: 0.02em;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .hero {
    gap: 18px;
  }

  .hero h1 {
    font-size: clamp(16px, 5vw, 22px);
    letter-spacing: 0.02em;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .auth-hero h1 {
    font-size: clamp(20px, 6.2vw, 28px);
    letter-spacing: 0.01em;
    line-height: 1.1;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .ticket-qr-kicker,
  .event-referral-title {
    font-size: 13px;
    letter-spacing: 0.03em;
  }

  .hero p {
    margin-top: 12px;
    font-size: 15px;
    line-height: 1.45;
  }

  .hero-metrics {
    margin-top: 18px;
    gap: 12px;
  }

  .hero-metrics article {
    padding: 12px 14px;
    border-radius: 14px;
  }

  .hero-metrics span {
    font-size: 24px;
  }

  .mh-metric-swap__value {
    font-size: 22px;
  }

  .hero-metrics small,
  .mh-metric-swap__label {
    font-size: 12px;
  }

  .hero-art {
    min-height: 200px;
    border-radius: 18px;
  }

  .hero-code {
    font-size: clamp(26px, 7vw, 34px);
  }

  .events-grid {
    gap: 14px;
  }

  .events-grid > .event-card {
    border-radius: 16px;
  }

  .events-grid > .event-card > .event-body h3 {
    font-size: 16px;
    line-height: 1.3;
  }

  .event-meta {
    font-size: 13px;
    line-height: 1.4;
  }

  .event-tags {
    margin: 10px 0;
    gap: 8px;
  }

  .filters-grid,
  .auth-grid,
  .create-grid {
    gap: 12px;
  }

  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]),
  textarea {
    min-height: 44px;
  }

  textarea {
    min-height: 108px;
    padding: 12px 14px;
  }

  select {
    min-height: 44px;
    padding: 10px 40px 10px 14px;
  }

  .detail-card {
    padding: 18px 16px;
    border-radius: 20px;
  }

  .detail-head {
    gap: 12px;
    margin-bottom: 12px;
  }

  .detail-grid {
    gap: 12px;
    margin-top: 12px;
  }

  .auth-layout {
    padding: max(20px, var(--meethub-safe-top)) max(16px, var(--meethub-safe-right))
      max(24px, var(--meethub-safe-bottom)) max(16px, var(--meethub-safe-left));
  }

  .auth-panel .auth-hero {
    padding: 24px 18px 20px;
  }

  .auth-step {
    padding: 20px 18px 22px;
  }

  .auth-panel-footer {
    padding: 14px 18px 18px;
  }

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

  .auth-tabs {
    gap: 10px;
    margin: 16px 0;
  }

  .toast {
    width: min(92vw, 520px);
    border-radius: 16px;
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.35;
  }

  .organizer-layout {
    padding-bottom: calc(102px + var(--meethub-safe-bottom));
  }

  .organizer-subnav {
    gap: 8px 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
  }

  .meethub-act-as-side {
    flex: 1 1 100%;
    order: -1;
    margin-bottom: 4px;
  }

  .organizer-hub-grid {
    gap: 14px;
  }

  .organizer-hub-tile-btn {
    padding: 16px 18px;
    border-radius: 16px;
  }

  .tickets-grid {
    gap: 12px;
  }

  .ticket-card {
    padding: 14px;
    border-radius: 16px;
  }

  .mobile-drawer {
    left: max(12px, var(--meethub-safe-left));
    right: max(12px, var(--meethub-safe-right));
    border-radius: 20px;
    padding: 14px;
  }

  .topbar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: max(10px, var(--meethub-safe-top)) max(14px, var(--meethub-safe-right)) 10px
      max(14px, var(--meethub-safe-left));
    min-height: 0;
  }

  body.meethub-tg-miniapp .topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
    justify-items: center;
    padding-top: var(--meethub-system-top);
    padding-bottom: 0;
    min-height: calc(var(--meethub-system-top) + var(--meethub-tg-chrome-top));
  }

  .topbar .brand > p {
    display: none;
  }
  .topbar .brand {
    flex-shrink: 1;
    min-width: 0;
    max-width: 100%;
  }
  .topbar .brand-badge {
    display: block;
    font-size: 13px;
    letter-spacing: 0.01em;
    line-height: 1;
    white-space: nowrap;
  }

  body.meethub-tg-miniapp .topbar .brand-badge {
    font-size: 15px;
    letter-spacing: 0.02em;
    line-height: 1.15;
  }

  body.meethub-tg-miniapp .topbar .brand {
    max-width: none;
    margin-top: 0;
  }
  .topbar-actions {
    flex: 1;
    min-width: 0;
    width: auto;
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0;
  }
  .topbar-actions::-webkit-scrollbar {
    display: none;
  }

  .topbar-actions .btn {
    width: auto;
    min-width: 0;
    flex-shrink: 0;
    height: auto;
    min-height: 36px;
    padding: 6px 12px;
    font-size: 12px;
  }

  .topbar-actions .profile-btn {
    max-width: min(160px, 46vw);
    min-width: 0;
  }

  .profile-menu {
    z-index: 400;
  }
  .auth-grid,
  .create-grid,
  .filters-grid,
  .tickets-grid {
    grid-template-columns: 1fr;
  }

  .filters.card .card-head {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .filters.card .card-head h2 {
    max-width: 100%;
    overflow-wrap: normal;
    word-break: keep-all;
    hyphens: none;
  }

  .filters-toggle {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 12px;
    font-size: 13px;
  }

  .filters.card:not(.is-expanded) .filters-panel {
    display: none;
  }

  .filters.card:not(.is-expanded) .card-head {
    margin-bottom: 0;
  }

  .filters.card.is-expanded .card-head {
    margin-bottom: 4px;
  }

  .filters-grid > #searchInput,
  .filters-grid > #accessTypeFilter,
  .filters-grid > #districtFilter {
    grid-column: auto;
  }

  .filters-actions .btn {
    min-height: 40px;
  }
  .detail-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .event-detail-head-actions {
    width: 100%;
    justify-content: stretch;
  }

  .event-detail-head-actions > .btn,
  .event-detail-head-actions > .link-btn {
    flex: 1 1 auto;
    min-width: 0;
    justify-content: center;
  }

  .ticket-qr-mini-wrap {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .ticket-qr-mini-label {
    align-self: center;
  }

  .auth-role-grid {
    grid-template-columns: 1fr;
  }
  .create-inline-grid {
    grid-template-columns: 1fr;
  }
  .create-inline-grid-3 {
    grid-template-columns: 1fr;
  }

  .btn {
    min-width: 0;
  }

  /* ——— Админ-панель на телефоне ——— */
  body[data-page="admin"] main.layout.admin-layout {
    max-width: 100%;
    min-width: 0;
    padding-left: max(12px, var(--meethub-safe-left));
    padding-right: max(12px, var(--meethub-safe-right));
    padding-top: 14px;
    box-sizing: border-box;
  }

  body[data-page="admin"] .admin-shell {
    gap: 12px;
  }

  body[data-page="admin"] .admin-shell > .card {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  body[data-page="admin"] .admin-intro-card .card-head {
    flex-direction: column;
    align-items: flex-start;
  }

  body[data-page="admin"] .admin-page-title {
    font-size: clamp(1.1rem, 4.5vw, 1.35rem);
  }

  body[data-page="admin"] .admin-tabs-wrap {
    margin-left: 0;
    margin-right: 0;
    padding: 6px;
  }

  body[data-page="admin"] .admin-tab {
    padding: 8px 12px;
    font-size: 12px;
  }

  body[data-page="admin"] .admin-tab-panels {
    gap: 12px;
  }

  body[data-page="admin"] .admin-tab-panel {
    gap: 12px;
  }

  body[data-page="admin"] .admin-tab-panel > .card {
    padding: 14px 14px 16px;
    border-radius: 16px;
  }

  body[data-page="admin"] .admin-card-head {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  body[data-page="admin"] .admin-card-head h2 {
    font-size: clamp(16px, 4vw, 18px);
    line-height: 1.25;
  }

  body[data-page="admin"] .admin-card-head .btn {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
  }

  body[data-page="admin"] .admin-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  body[data-page="admin"] .admin-stat-card {
    padding: 10px 12px;
    min-width: 0;
  }

  body[data-page="admin"] .admin-stat-card--wide {
    grid-column: 1 / -1;
  }

  body[data-page="admin"] .admin-stat-value {
    font-size: clamp(1.05rem, 4vw, 1.25rem);
    word-break: break-word;
  }

  body[data-page="admin"] .admin-stats-list,
  body[data-page="admin"] .admin-top-events {
    padding-left: 16px;
    word-break: break-word;
  }

  body[data-page="admin"] .admin-section-hint {
    max-width: none;
    font-size: 13px;
    line-height: 1.45;
    word-break: break-word;
  }

  body[data-page="admin"] .admin-table-wrap {
    margin-left: 0;
    margin-right: 0;
    border-radius: 10px;
  }

  body[data-page="admin"] .admin-data-table {
    min-width: 560px;
  }

  body[data-page="admin"] .admin-data-table th,
  body[data-page="admin"] .admin-data-table td {
    padding: 6px 8px;
    font-size: 11px;
  }

  body[data-page="admin"] .admin-data-table th {
    white-space: nowrap;
  }

  body[data-page="admin"] .admin-payout-form,
  body[data-page="admin"] .admin-notify-form {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  body[data-page="admin"] .admin-payout-form button[type="submit"],
  body[data-page="admin"] .admin-notify-form button[type="submit"] {
    width: 100%;
    justify-self: stretch;
  }

  body[data-page="admin"] .admin-role-form {
    max-width: none;
  }

  body[data-page="admin"] .admin-csv-row {
    flex-direction: column;
    gap: 10px;
  }

  body[data-page="admin"] .admin-csv-row .form-field {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
  }

  body[data-page="admin"] .admin-csv-actions {
    flex-direction: column;
  }

  body[data-page="admin"] .admin-csv-actions .btn {
    width: 100%;
    box-sizing: border-box;
  }

  body[data-page="admin"] .admin-moderation-item {
    padding: 12px 14px;
  }

  body[data-page="admin"] .admin-moderation-item-head h3 {
    font-size: 1rem;
    word-break: break-word;
  }

  body[data-page="admin"] .admin-moderation-actions {
    flex-direction: column;
  }

  body[data-page="admin"] .admin-moderation-actions .btn {
    width: 100%;
    justify-content: center;
  }

  body[data-page="admin"] .admin-payout-actions {
    min-width: 0;
    width: 100%;
  }

  body[data-page="admin"] .admin-audit-wrap {
    max-width: 100%;
  }

  body[data-page="admin"] .admin-audit-table {
    min-width: 300px;
    font-size: 12px;
  }

  body[data-page="admin"] .admin-audit-table th,
  body[data-page="admin"] .admin-audit-table td {
    padding: 6px 8px;
  }

  body[data-page="admin"] .admin-roadmap-list li {
    word-break: break-word;
  }

  /* Нижняя панель: скругление и отступы в духе Apple HIG (плавающий bar ~22–26pt, поля 16pt, safe area) */
  .mobile-tabbar {
    position: fixed;
    left: max(16px, var(--meethub-safe-left));
    right: max(16px, var(--meethub-safe-right));
    bottom: calc(10px + var(--meethub-safe-bottom));
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) 52px;
    gap: 4px;
    border: 1px solid var(--card-border);
    border-radius: 14px;
    background: var(--topbar-bg);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    box-shadow: var(--shadow-md);
    padding: 6px;
  }

  .mobile-tabbar .mobile-tab {
    min-height: 42px;
    min-width: 0;
    padding: 0 6px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 10px;
  }

  .mobile-tabbar .mobile-tab.active {
    color: var(--text);
    background: var(--surface-raised);
    border-color: var(--card-border);
    box-shadow: var(--shadow-sm);
  }

  .mobile-tabbar.no-create {
    grid-template-columns: repeat(3, minmax(0, 1fr)) 52px;
  }

  .mobile-tabbar .mobile-tab:last-child {
    font-size: 12px;
    font-weight: 600;
    padding: 0 4px;
    flex-direction: column;
    gap: 2px;
  }

  .mobile-tabbar .mobile-tab {
    flex-direction: column;
    gap: 2px;
  }

  .mobile-tabbar .nav-ico {
    width: 18px;
    height: 18px;
  }

  .mobile-tabbar .nav-ico-svg {
    width: 18px;
    height: 18px;
  }

  .mobile-tabbar .nav-label {
    font-size: 10px;
    letter-spacing: 0.01em;
  }
}

@media (min-width: 1081px) {
  .create-actions-bar {
    bottom: 16px;
  }

  .create-jump-nav {
    position: static;
    background: none;
    padding: 0;
  }
}

.create-actions-bar .create-moderation-hint {
  margin-top: 0;
  max-width: none;
}

.create-actions-bar #createEventModerationBtn {
  margin-top: 0;
  width: 100%;
  min-height: 44px;
}

.create-save-template-btn {
  width: 100%;
  min-height: 40px;
}

.create-recurrence-block {
  display: grid;
  gap: 10px;
}

.create-recurrence-fields {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  border: 1px dashed var(--card-border);
  background: rgba(0, 0, 0, 0.12);
}

.create-recurrence-fields.hidden {
  display: none;
}

.create-weekday-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.create-weekday-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--surface-raised);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.create-weekday-chip:has(input:checked) {
  border-color: var(--accent-border);
  background: var(--accent-soft);
  color: var(--text);
}

.create-weekday-chip input {
  margin: 0;
}

.create-recurrence-preview {
  white-space: pre-wrap;
  line-height: 1.45;
}

.create-recurrence-rules {
  display: grid;
  gap: 10px;
}

.create-recurrence-rule {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.03);
}

.create-recurrence-rule-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.create-recurrence-rule-head strong {
  font-size: 13px;
}

.create-recurrence-rule .create-weekday-chips {
  margin-top: 2px;
}

.create-recurrence-custom-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.create-recurrence-custom-count {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.create-year-cal-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.62);
}

.create-year-cal-modal.hidden {
  display: none;
}

.create-year-cal-dialog {
  width: min(980px, 100%);
  max-height: min(92vh, 900px);
  overflow: auto;
  border-radius: 18px;
  border: 1px solid var(--card-border);
  background: var(--surface-raised, #18181b);
  padding: 16px;
  display: grid;
  gap: 12px;
}

.create-year-cal-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.create-year-cal-head h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.create-year-cal-year-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.create-year-cal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}

.create-year-cal-month {
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 8px;
  background: rgba(0, 0, 0, 0.15);
}

.create-year-cal-month h4 {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.create-year-cal-weekdays,
.create-year-cal-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
}

.create-year-cal-weekdays span {
  text-align: center;
  font-size: 10px;
  color: var(--muted);
  font-weight: 700;
}

.create-year-cal-day {
  appearance: none;
  border: 0;
  border-radius: 8px;
  min-height: 28px;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.create-year-cal-day:hover {
  background: rgba(255, 255, 255, 0.08);
}

.create-year-cal-day.is-selected {
  background: var(--accent, #0f766e);
  color: #ecfdf8;
}

.create-year-cal-day.is-empty {
  visibility: hidden;
  pointer-events: none;
}

.create-year-cal-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.create-year-cal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

html[data-theme="light"] .create-recurrence-rule,
html[data-theme="light"] .create-year-cal-month {
  background: #fafafa;
}

html[data-theme="light"] .create-year-cal-dialog {
  background: #fff;
}

.create-template-apply-row {
  align-items: end;
}

.form-field-label {
  font-size: 12px;
  color: var(--muted);
}

.event-series-pick {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--accent-border);
  background: var(--accent-soft);
}

.event-series-pick label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.event-series-pick select {
  width: 100%;
}

.event-series-pick-hint {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.tag-series {
  border-color: rgba(45, 212, 191, 0.45);
}

@media (max-width: 720px) {
  .create-inline-grid-3 {
    grid-template-columns: 1fr;
  }

  .create-geolocate-field .create-geolocate-label {
    visibility: visible;
  }
}

.tag-status-draft {
  border-color: rgba(148, 163, 184, 0.45);
}

.tag-status-pending_moderation {
  border-color: rgba(251, 191, 36, 0.55);
  color: #fcd34d;
}

.tag-status-published {
  border-color: rgba(52, 211, 153, 0.45);
  color: #6ee7b7;
}

.tag-status-rejected {
  border-color: rgba(248, 113, 113, 0.55);
  color: #fca5a5;
}

.admin-inline-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.paid-checkout-qty-row {
  margin-top: 12px;
}

.paid-checkout-friend-row {
  margin-top: 10px;
}

.paid-checkout-friend-results {
  margin-top: 6px;
}

.invite-panel {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.invite-panel.hidden {
  display: none;
}

.invite-panel-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.invite-panel-card {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: min(90vh, 720px);
  overflow: auto;
}

.invite-create-form {
  margin-bottom: 16px;
}

.invite-links-list {
  display: grid;
  gap: 10px;
}

.invite-link-row {
  padding: 10px 12px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  border-radius: 10px;
}

.invite-link-row--inactive {
  opacity: 0.65;
}

.invite-link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.admin-refund-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  padding: 0 0.35rem;
  margin-left: 0.35rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.35;
  background: rgba(239, 68, 68, 0.85);
  color: #fff;
}

.admin-mod-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.admin-mod-subtab {
  border: 1px solid var(--border, rgba(255, 255, 255, 0.14));
  background: transparent;
  color: inherit;
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
  font: inherit;
}

.admin-mod-subtab.active {
  background: var(--accent-soft);
  border-color: var(--accent-border-strong);
}

.admin-moderation-list--detailed {
  gap: 16px;
}

.admin-moderation-item--detailed {
  display: grid;
  gap: 12px;
}

.admin-mod-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-mod-gallery--dual {
  gap: 14px;
}

.admin-mod-image-slot {
  margin: 0;
  display: grid;
  gap: 6px;
}

.admin-mod-image-slot figcaption {
  font-size: 0.75rem;
  color: var(--muted);
}

.admin-mod-thumb {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.admin-mod-thumb--cover {
  width: 88px;
  height: 88px;
}

.admin-mod-thumb--banner {
  width: 176px;
  height: 44px;
}

.admin-mod-facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.admin-mod-fact {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-mod-fact span {
  font-size: 0.78rem;
  opacity: 0.75;
}

.admin-mod-json {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.78rem;
  max-height: 280px;
  overflow: auto;
  padding: 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
}

.admin-mod-desc p {
  margin: 6px 0 0;
  white-space: pre-wrap;
}

/* ——— Theme menu & UI polish v3 ——— */
.theme-menu-wrap {
  position: relative;
  z-index: 3;
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: var(--pill-radius);
  border: 1px solid var(--card-border);
  background: var(--surface-raised);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.theme-toggle-btn:hover {
  background: var(--pill-hover-bg);
  border-color: var(--pill-hover-border);
}

.theme-toggle-icon {
  flex-shrink: 0;
}

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

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

.theme-toggle-current {
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.theme-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 160px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: var(--card);
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 200;
}

.theme-menu.open {
  display: grid;
  gap: 4px;
}

.theme-menu.theme-menu--portal {
  position: fixed;
  z-index: 10050;
  display: grid;
  gap: 4px;
}

.theme-menu-item {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.theme-menu-item:hover {
  background: var(--pill-hover-bg);
}

.theme-menu-item.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.theme-menu-wrap--drawer {
  margin-bottom: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--card-border);
}

.theme-menu-wrap--drawer .theme-toggle-btn {
  width: 100%;
  justify-content: flex-start;
}

.theme-menu-wrap--drawer .theme-menu {
  position: static;
  display: none;
  margin-top: 8px;
  box-shadow: none;
}

.theme-menu-wrap--drawer .theme-menu.open {
  display: grid;
}

@media (max-width: 720px) {
  .brand p {
    display: none;
  }

  .theme-toggle-current {
    display: none;
  }

  /* В меню ☰ подпись темы оставляем — в шапке TMA кнопки нет */
  .theme-menu-wrap--drawer .theme-toggle-current {
    display: inline;
  }

  /* Мобильный браузер: компактный топбар + мелкие display-заголовки */
  html,
  body {
    overflow-x: clip;
    max-width: 100%;
  }

  .topbar {
    gap: 6px;
    padding: max(8px, var(--meethub-safe-top)) max(10px, var(--meethub-safe-right)) 8px
      max(10px, var(--meethub-safe-left));
  }

  .topbar .brand {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 34vw;
  }

  .topbar .brand-badge {
    font-size: 11px;
    letter-spacing: 0;
    line-height: 1;
  }

  body.meethub-tg-miniapp .topbar .brand {
    max-width: none;
  }

  body.meethub-tg-miniapp .topbar .brand-badge {
    font-size: 15px;
    letter-spacing: 0.02em;
  }

  body.meethub-tg-miniapp .topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    padding-top: var(--meethub-system-top);
    padding-bottom: 0;
    min-height: calc(var(--meethub-system-top) + var(--meethub-tg-chrome-top));
  }

  .topbar-actions {
    flex: 1 1 auto;
    gap: 4px;
    min-width: 0;
  }

  .topbar-actions .theme-toggle-btn {
    min-height: 34px;
    padding: 6px 8px;
  }

  .topbar-actions .profile-name,
  .topbar-actions .profile-role {
    display: none;
  }

  .topbar-actions .profile-btn {
    max-width: none;
    gap: 4px;
    padding: 6px 8px;
    min-height: 34px;
  }

  .topbar-actions .profile-caret {
    font-size: 10px;
  }

  .topbar-actions .btn {
    min-height: 34px;
    padding: 6px 8px;
    font-size: 12px;
  }

  .card-head h2,
  .card h2,
  .detail-head h2,
  .event-detail-page-head h2,
  .paid-checkout-card .card-head h2 {
    font-size: clamp(12px, 3.4vw, 15px);
    letter-spacing: 0.01em;
    line-height: 1.2;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .hero h1 {
    font-size: clamp(14px, 4.2vw, 18px);
    letter-spacing: 0.01em;
    max-width: 100%;
  }

  .auth-hero h1 {
    font-size: clamp(18px, 6vw, 26px);
    letter-spacing: 0.01em;
  }

  .ticket-detail-head {
    gap: 8px;
  }

  .ticket-detail-title-block {
    min-width: 0;
    flex: 1 1 auto;
  }

  .ticket-detail-kicker {
    margin: 0 0 4px;
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    line-height: 1;
  }

  .ticket-detail-head h2 {
    font-size: clamp(13px, 3.6vw, 16px);
  }
}

.filters.card {
  padding: 16px 20px 20px;
}

.filters-panel {
  margin-top: 12px;
}

.card-head h2,
.card h2 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.tag {
  border-color: var(--card-border);
  background: var(--bg-soft);
  color: var(--muted);
  font-weight: 600;
}

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

.topbar {
  padding-left: max(20px, var(--meethub-safe-left));
  padding-right: max(20px, var(--meethub-safe-right));
}

.layout {
  padding: 20px;
  gap: 16px;
}

#authNavBtn.btn.ghost {
  border-color: var(--card-border);
  background: var(--surface-raised);
  font-weight: 600;
}

html[data-theme="light"] select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9' fill='none'%3E%3Cpath d='M1 2l6 5 6-5' stroke='%235c6478' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

html[data-theme="light"] .mobile-tabbar {
  border-color: var(--card-border);
  background: var(--topbar-bg);
  box-shadow: var(--shadow-md);
}

html[data-theme="light"] .auth-panel {
  background: var(--card);
  border-color: var(--card-border);
  box-shadow: var(--shadow-lg);
}

html[data-theme="light"] .auth-hero {
  background: radial-gradient(ellipse 120% 80% at 50% -20%, rgba(15, 118, 110, 0.08), transparent 55%);
}

/* Светлая тема: QR-рамка и мобильные поверхности TG/VK */
html[data-theme="light"] .ticket-qr-frame {
  background: #18181b;
  border-color: #d4d4d8;
}

html[data-theme="light"] .filters.card,
html[data-theme="light"] .card {
  box-shadow: var(--shadow-sm);
}

html[data-theme="light"] .topbar {
  border-bottom-color: var(--card-border);
  background: var(--topbar-bg);
}

html[data-theme="light"] .theme-menu {
  background: var(--surface-raised);
  border-color: var(--card-border);
  box-shadow: var(--shadow-lg);
}

html[data-theme="light"] .mobile-drawer {
  background: var(--drawer-bg);
  border-color: var(--card-border);
  box-shadow: var(--shadow-lg);
}

html[data-theme="light"] body.meethub-tg-miniapp .topbar {
  background: var(--topbar-bg);
}

.layout {
  gap: 18px;
}

.card h2 {
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hero-metrics span,
.mh-metric-swap__value {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Доп. поля регистрации на create */
.create-custom-fields-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 8px 0 10px;
}

.create-custom-field-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(110px, 0.7fr) auto auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: var(--bg-soft);
}

.create-cf-required {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  margin-bottom: 8px;
  cursor: pointer;
}

.guest-custom-fields,
.paid-checkout-custom-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 12px 0;
}

.guest-cf-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  cursor: pointer;
}

.guest-cf-req {
  color: var(--brand-accent);
}

.organizer-row-answers {
  color: var(--brand-accent);
}

@media (max-width: 720px) {
  .create-custom-field-row {
    grid-template-columns: 1fr;
  }
}

.ring {
  border-color: var(--card-border);
  opacity: 0.65;
}

/* —— Страница профиля —— */
.profile-layout {
  max-width: 720px;
}

.profile-hero-card {
  padding: 18px 18px 16px;
}

.profile-hero {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-avatar--lg,
.profile-avatar.profile-avatar--lg {
  width: 72px;
  height: 72px;
  font-size: 22px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.profile-avatar--lg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-avatar-edit {
  position: relative;
  display: inline-flex;
  cursor: pointer;
  border-radius: 50%;
}

.profile-avatar-edit__hint {
  position: absolute;
  left: 50%;
  bottom: -2px;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-accent);
  background: var(--surface-raised);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
}

.profile-hero-text h2 {
  margin: 0 0 4px;
}

.profile-lead {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.profile-user-id-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 10px 0 0;
}

.profile-user-id-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.profile-user-id-btn {
  appearance: none;
  margin: 0;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--card-border);
  background: var(--bg-soft);
  color: var(--text);
  cursor: pointer;
  max-width: 100%;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.profile-user-id-btn:hover {
  border-color: var(--accent-border-strong);
  background: var(--accent-soft);
}

.profile-user-id-btn code {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  word-break: break-all;
  color: inherit;
}

.profile-section .card-head {
  margin-bottom: 14px;
}

.profile-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.profile-form--row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
}

.profile-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-identities {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-identity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: var(--bg-soft);
}

.profile-identity__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.profile-identity__title {
  font-weight: 700;
  font-size: 15px;
}

.profile-identity__sub {
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-identity__actions {
  display: flex;
  flex-shrink: 0;
  gap: 8px;
}

.profile-link-email {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--card-border);
}

.profile-fieldset {
  margin: 0;
  padding: 0;
  border: none;
}

.profile-fieldset legend {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 8px;
}

.profile-fieldset-hint {
  margin: 0 0 10px;
}

.profile-cat-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-cat-chip {
  appearance: none;
  border: 1px solid var(--card-border);
  background: var(--bg-soft);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.profile-cat-chip.is-active {
  border-color: var(--brand-accent);
  color: var(--brand-accent);
  background: color-mix(in srgb, var(--brand-accent) 12%, transparent);
}

.profile-cat-chip__rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25em;
  height: 1.25em;
  border-radius: 999px;
  background: var(--brand-accent);
  color: #041016;
  font-size: 11px;
  font-weight: 800;
}

.profile-sort-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-sort-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: var(--bg-soft);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}

.profile-sort-option:has(input:checked) {
  border-color: var(--brand-accent);
  color: var(--brand-accent);
}

/* ——— Site footer ——— */
.site-footer {
  position: relative;
  z-index: 2;
  width: 100%;
  margin-top: clamp(40px, 6vw, 72px);
  padding: 0;
  overflow: clip;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(45, 212, 191, 0.12), transparent 55%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 28%),
    var(--bg-soft);
  border-top: 1px solid var(--card-border);
  animation: siteFooterIn 0.55s ease both;
}

@keyframes siteFooterIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.site-footer-logo {
  width: 100%;
  padding: clamp(20px, 3.5vw, 32px) 0 clamp(14px, 2.5vw, 20px);
  box-sizing: border-box;
}

.site-footer-logo-link {
  display: grid;
  gap: 0;
  justify-items: center;
  text-decoration: none;
  color: inherit;
  width: 100%;
}

.site-footer-wordmark {
  display: block;
  width: auto;
  max-width: 100%;
  padding: 0 clamp(12px, 3vw, 24px);
  box-sizing: border-box;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(18px, 3.2vw, 26px);
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(250, 250, 250, 0.42);
  white-space: nowrap;
  overflow: hidden;
  transition: color 0.2s ease;
}

.site-footer-wordmark span {
  color: rgba(45, 212, 191, 0.45);
}

.site-footer-logo-link:hover .site-footer-wordmark {
  color: rgba(250, 250, 250, 0.62);
}

.site-footer-logo-link:hover .site-footer-wordmark span {
  color: rgba(45, 212, 191, 0.7);
}

html[data-theme="light"] .site-footer-wordmark {
  color: rgba(24, 24, 27, 0.38);
}

html[data-theme="light"] .site-footer-wordmark span {
  color: rgba(13, 148, 136, 0.5);
}

html[data-theme="light"] .site-footer-logo-link:hover .site-footer-wordmark {
  color: rgba(24, 24, 27, 0.58);
}

html[data-theme="light"] .site-footer-logo-link:hover .site-footer-wordmark span {
  color: rgba(13, 148, 136, 0.75);
}

.site-footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 10px;
  padding: 0 clamp(16px, 4vw, 32px) clamp(22px, 4vw, 34px);
  box-sizing: border-box;
}

.site-footer-nav-link {
  appearance: none;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.02em;
  line-height: 1;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.site-footer-nav-link:hover {
  border-color: var(--accent-border-strong);
  background: var(--accent-soft);
  color: var(--brand-accent);
  transform: translateY(-1px);
}

.site-footer-credit {
  border-top: 1px solid var(--card-border);
  background: rgba(0, 0, 0, 0.22);
  padding: 14px clamp(16px, 4vw, 32px);
  text-align: center;
}

.site-footer-credit-line {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.site-footer-credit-line a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid rgba(45, 212, 191, 0.45);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.site-footer-credit-line a:hover {
  color: var(--brand-accent);
  border-bottom-color: var(--brand-accent);
}

body.has-site-footer .site-footer {
  margin-bottom: 0;
}

@media (max-width: 900px) {
  body.has-site-footer .site-footer {
    padding-bottom: calc(8px + var(--meethub-safe-bottom));
    margin-bottom: calc(72px + var(--meethub-safe-bottom));
  }
}

html[data-theme="light"] .site-footer {
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(13, 148, 136, 0.1), transparent 55%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.02), transparent 28%),
    var(--bg-soft);
}

html[data-theme="light"] .site-footer-credit {
  background: rgba(0, 0, 0, 0.04);
}

@media (max-width: 640px) {
  .profile-form--row {
    grid-template-columns: 1fr;
  }

  .profile-identity {
    flex-direction: column;
    align-items: stretch;
  }

  .profile-identity__actions {
    width: 100%;
  }

  .profile-identity__actions .btn {
    flex: 1;
  }

  .site-footer-nav {
    gap: 8px;
  }

  .site-footer-nav-link {
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
  }
}


