:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f0f3fa;
  --text: #121526;
  --muted: #687184;
  --line: #e2e7f0;
  --primary: #4437dc;
  --primary-dark: #3026a8;
  --primary-soft: #efedff;
  --ink: #081427;
  --ink-soft: #0d1b32;
  --gold: #f2d58a;
  --shadow: 0 18px 46px rgba(30, 39, 74, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 46%, #eef2f8 100%);
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.site-header {
  position: fixed;
  z-index: 30;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 clamp(16px, 5vw, 58px);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(226, 231, 240, 0.82);
  box-shadow: 0 12px 34px rgba(29, 38, 74, 0.08);
  backdrop-filter: blur(18px);
}

.header-leading {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 26px);
  min-width: 0;
}

.primary-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 900;
  text-decoration: none;
}

.brand-mark {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.32), transparent 42%),
    linear-gradient(135deg, var(--primary), #746bff);
  box-shadow: 0 10px 24px rgba(68, 55, 220, 0.28);
}

.brand-copy {
  display: grid;
  gap: 2px;
  line-height: 1.05;
}

.top-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.user-clock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border: 0;
  padding: 0 4px;
  background: transparent;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 900;
  white-space: nowrap;
}

.profile-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.profile-menu-toggle {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  padding: 0;
  background: var(--surface);
  box-shadow: 0 12px 24px rgba(30, 39, 74, 0.1);
}

.profile-menu-toggle:hover,
.profile-menu.active .profile-menu-toggle {
  border-color: rgba(68, 55, 220, 0.44);
  box-shadow: 0 14px 28px rgba(68, 55, 220, 0.16);
}

.profile-orb {
  position: relative;
  display: block;
  width: 20px;
  height: 20px;
  overflow: hidden;
  border: 2px solid var(--primary);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.95), transparent 24%),
    linear-gradient(135deg, rgba(68, 55, 220, 0.1), rgba(68, 55, 220, 0.28));
}

.profile-orb::before,
.profile-orb::after,
.profile-orb span {
  position: absolute;
  inset: 4px;
  border: 1.5px solid rgba(68, 55, 220, 0.78);
  border-radius: 50%;
  content: '';
}

.profile-orb::before {
  transform: scaleX(0.42);
}

.profile-orb::after {
  transform: scaleY(0.42);
}

.profile-orb span {
  inset: 8px 3px;
}

.profile-dropdown {
  position: absolute;
  z-index: 60;
  top: calc(100% + 10px);
  right: 0;
  display: grid;
  min-width: 220px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 22px 48px rgba(30, 39, 74, 0.18);
  backdrop-filter: blur(18px);
}

.profile-dropdown button {
  min-height: 40px;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 0 16px;
  background: transparent;
  color: var(--text);
  font-weight: 900;
  text-align: left;
}

.profile-dropdown button:last-child {
  border-bottom: 0;
  color: var(--primary);
}

.profile-dropdown button:hover {
  background: var(--primary-soft);
}

.nav-link,
.auth-button,
.primary-action,
.secondary-action {
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0 14px;
  font-weight: 900;
}

.nav-link,
.secondary-action {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
}

.auth-button,
.primary-action {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(68, 55, 220, 0.22);
}

.auth-button:hover,
.primary-action:hover {
  background: var(--primary-dark);
}

.city-combobox {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  text-transform: none;
}

.city-combobox-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 34px 0 14px;
  background:
    linear-gradient(45deg, transparent 50%, var(--primary) 50%) calc(100% - 17px) 13px / 7px 7px
      no-repeat,
    linear-gradient(135deg, var(--primary) 50%, transparent 50%) calc(100% - 12px) 13px / 7px 7px
      no-repeat,
    #ffffff;
  color: var(--primary);
  font-weight: 900;
  white-space: nowrap;
}

.city-combobox-toggle:hover,
.city-combobox.open .city-combobox-toggle {
  border-color: rgba(68, 55, 220, 0.5);
  box-shadow: 0 10px 24px rgba(68, 55, 220, 0.12);
}

.city-combobox-menu {
  position: absolute;
  z-index: 70;
  top: calc(100% + 9px);
  left: 50%;
  display: grid;
  min-width: 220px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 22px 48px rgba(30, 39, 74, 0.18);
  transform: translateX(-50%);
  backdrop-filter: blur(18px);
}

.city-combobox-menu label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 900;
  text-align: left;
  white-space: nowrap;
}

.city-combobox-menu label:hover {
  background: var(--primary-soft);
}

.city-combobox-menu input {
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
}

main {
  min-height: 100vh;
}

.hero {
  padding: 118px clamp(20px, 7vw, 96px) 64px;
}

.hero-content {
  width: min(900px, 100%);
  margin: 0 auto 52px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 880px;
  margin: 0 auto 18px;
  font-size: clamp(2.8rem, 6vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 680px;
  margin: 0 auto 24px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.6;
}

.landing-content {
  display: grid;
  gap: 52px;
  width: min(980px, 100%);
  margin: 0 auto;
}

.feature-grid,
.quick-start-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.feature-card,
.quick-start-card {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  align-items: center;
  min-height: 128px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(29, 38, 74, 0.08);
  text-align: left;
}

.feature-card h3,
.feature-card p {
  margin: 0;
}

.feature-card h3 {
  margin-bottom: 6px;
}

.feature-card p,
.quick-start-card span:last-child {
  color: var(--muted);
  line-height: 1.45;
}

.feature-icon,
.quick-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 1.55rem;
  font-weight: 900;
}

.quick-start-card {
  cursor: pointer;
}

.quick-start-card strong {
  display: block;
  color: var(--primary);
  font-size: 1.75rem;
  line-height: 1.05;
}

.quick-start-card span:last-child {
  grid-column: 2;
  font-weight: 900;
}

.quick-start-card.muted-card {
  cursor: default;
}

.auth-dialog {
  width: min(760px, calc(100% - 28px));
  max-height: calc(100vh - 28px);
  padding: 0;
  border: 0;
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: auto;
}

#authDialog {
  width: min(480px, calc(100vw - 28px));
  max-height: min(480px, calc(100vh - 28px));
  border-radius: 24px;
  overflow: hidden;
}

#authDialog.auth-survey-mode {
  width: min(640px, calc(100vw - 28px));
  max-height: min(640px, calc(100vh - 28px));
}

.auth-dialog::backdrop {
  background: rgba(18, 21, 38, 0.5);
  backdrop-filter: blur(10px);
}

.auth-card {
  position: relative;
  padding: clamp(24px, 5vw, 40px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
}

#authDialog .auth-card {
  display: grid;
  min-height: min(480px, calc(100vh - 28px));
  padding: 30px 44px 24px;
  border: 0;
  border-radius: 24px;
  background: #696969;
  color: #ffffff;
}

#authDialog.auth-register-mode .auth-card {
  padding-top: 22px;
  padding-bottom: 18px;
}

#authDialog.auth-survey-mode .auth-card {
  min-height: min(640px, calc(100vh - 28px));
  padding: 24px 52px 24px;
}

.auth-back-button {
  position: absolute;
  top: 24px;
  left: 24px;
  width: 46px;
  height: 46px;
  border: 0;
  background: transparent;
  color: #ffffff;
  font-size: 3rem;
  font-weight: 300;
  line-height: 1;
}

.close-button {
  position: absolute;
  top: 14px;
  right: 14px;
}

.icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
}

#authDialog .auth-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: center;
  width: 100%;
}

#authDialog .auth-step.hidden {
  display: none;
}

#authDialog .auth-step h2 {
  margin: 12px 0 18px;
  color: #ffffff;
  font-size: 1.65rem;
  font-weight: 500;
  line-height: 1.15;
  text-align: center;
}

#authDialog.auth-register-mode .auth-step h2 {
  margin: 9px 0 12px;
  font-size: 1.55rem;
}

#authDialog .auth-subtitle {
  margin: 0 0 18px;
  color: #ffffff;
  font-size: 1.08rem;
  text-align: center;
}

#authDialog.auth-register-mode .auth-subtitle {
  margin-bottom: 12px;
}

.auth-logo {
  display: grid;
  place-items: center;
  width: 122px;
  height: 122px;
  border-radius: 50%;
  background: #d9d9d9;
}

.auth-logo img {
  display: block;
  width: 60px;
  height: 40px;
}

#authDialog.auth-register-mode .auth-logo {
  width: 116px;
  height: 116px;
}

.auth-step label {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--muted);
  font-weight: 800;
}

.auth-step input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 13px;
  background: #ffffff;
  color: var(--text);
}

.auth-step input:focus {
  border-color: var(--primary);
  outline: 3px solid rgba(68, 55, 220, 0.14);
}

.basic-profile-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.7fr 1fr;
  gap: 12px;
}

#authDialog .basic-profile-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  width: min(448px, 100%);
}

.survey-avatar {
  align-self: center;
  width: 132px;
  height: 132px;
  margin-bottom: 8px;
  margin-top: 0;
}

.survey-avatar-preview {
  width: 132px;
  height: 132px;
  border-color: #696969;
  cursor: pointer;
  font-size: 2.4rem;
}

.survey-avatar-button {
  right: 0;
  bottom: 4px;
  z-index: 1;
}

.survey-avatar.dragging .survey-avatar-preview {
  outline: 3px solid rgba(255, 255, 255, 0.65);
  outline-offset: 3px;
}

.onboarding-progress {
  display: grid;
  gap: 10px;
  margin: 18px 0;
  padding: 14px;
  border: 1px solid rgba(68, 55, 220, 0.16);
  border-radius: 12px;
  background: var(--primary-soft);
}

.onboarding-progress > div:first-child,
.profile-progress > span {
  color: var(--primary);
  font-weight: 900;
}

.onboarding-progress > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.progress-track,
.profile-progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(68, 55, 220, 0.14);
}

.progress-track span,
.profile-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transition: width 180ms ease;
}

.onboarding-question-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
}

.onboarding-question-panel h3 {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.18;
}

.onboarding-options {
  display: grid;
  gap: 10px;
}

.onboarding-option {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.onboarding-option:hover,
.onboarding-option.selected {
  border-color: rgba(68, 55, 220, 0.42);
  background: var(--primary-soft);
  box-shadow: 0 10px 24px rgba(68, 55, 220, 0.1);
}

.option-marker {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--primary);
  font-weight: 900;
}

.onboarding-option.selected .option-marker {
  background: var(--primary);
  color: #ffffff;
}

.chip-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-option {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 13px;
  background: var(--surface);
  color: var(--text);
  font-weight: 850;
}

.chip-option.selected {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
}

.wizard-actions {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 10px;
  margin-top: 16px;
}

.wizard-actions .primary-action:last-child {
  grid-column: 2;
}

.form-note {
  color: var(--muted);
  line-height: 1.45;
}

.split-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.vibe-options {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
}

.vibe-options legend {
  margin-bottom: 8px;
  color: var(--muted);
  font-weight: 900;
}

.vibe-options label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--text);
}

.vibe-options input {
  width: 18px;
  min-height: 18px;
}

.full-width {
  width: 100%;
}

body.authenticated {
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 38%, #eef2f8 100%);
}

body.authenticated .brand-mark {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
}

body.authenticated .brand-copy {
  font-size: 0.86rem;
}

body.authenticated .app-shell {
  width: 100%;
  min-height: calc(100vh - 48px);
  margin: 48px 0 0;
  padding: 16px clamp(18px, 4vw, 58px) 48px;
}

.event-filters-panel {
  width: 100%;
  max-width: 1420px;
  margin: 0 auto 14px;
  overflow: hidden;
  padding: 0;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 14px 34px rgba(29, 38, 74, 0.08);
}

.event-filters-form {
  display: grid;
  grid-template-columns: minmax(260px, 1.45fr) minmax(220px, 0.92fr) minmax(250px, 1fr) minmax(
      220px,
      0.86fr
    ) 64px;
  gap: 10px;
  align-items: end;
  padding: 10px 14px 14px;
}

.filters-header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  margin: -10px -14px 0;
  padding: 0 14px;
  border-bottom: 1px solid rgba(221, 227, 240, 0.86);
  color: var(--text);
  font-weight: 900;
}

.filter-reset-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: #ffffff;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 900;
}

.filter-reset-button span {
  color: var(--muted);
  font-size: 1.18rem;
  line-height: 1;
}

.filter-search {
  position: relative;
}

.filter-search .filter-search-icon {
  position: absolute;
  z-index: 1;
  left: 15px;
  bottom: 12px;
  width: 16px;
  height: 16px;
  border: 3px solid var(--muted);
  border-radius: 50%;
  pointer-events: none;
}

.filter-search .filter-search-icon::after {
  position: absolute;
  right: -7px;
  bottom: -5px;
  width: 9px;
  height: 3px;
  border-radius: 999px;
  background: var(--muted);
  content: '';
  transform: rotate(45deg);
}

.filter-search input {
  padding-left: 52px !important;
}

.filter-format {
  margin: 0;
  border: 0;
  padding: 0;
}

.filter-format legend {
  margin: 0 0 5px;
  padding: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 850;
}

.filter-format-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
}

.filter-checkbox {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 38px;
  border-right: 1px solid var(--line);
  padding: 0 14px;
  background: #ffffff;
  color: var(--text);
  font-weight: 900;
}

.filter-checkbox:last-child {
  border-right: 0;
}

.filter-checkbox input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.filter-checkbox:has(input:checked) {
  background: var(--primary-soft);
  color: var(--primary);
}

.format-icon {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1;
}

.filter-checkbox:has(input:checked) .format-icon {
  color: var(--primary);
}

.filter-field {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 850;
}

.filter-field input:not([type='range']):not([type='checkbox']),
.filter-field select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
}

.filter-field input:not([type='range']):not([type='checkbox']):focus,
.filter-field select:focus {
  border-color: var(--primary);
  outline: 3px solid rgba(68, 55, 220, 0.14);
}

.filter-field select {
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%) calc(100% - 18px) 15px / 7px 7px
      no-repeat,
    linear-gradient(135deg, var(--muted) 50%, transparent 50%) calc(100% - 13px) 15px / 7px 7px
      no-repeat,
    #ffffff;
  padding-right: 36px;
}

.price-range-filter {
  min-width: 0;
}

.price-range-filter input[type='range'] {
  width: 100%;
  height: 12px;
  margin: 4px 0 0;
  accent-color: var(--primary);
}

.price-range-value {
  min-height: 1rem;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 900;
}

.filter-actions {
  display: flex;
  align-items: end;
  justify-content: center;
}

.filter-search-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 12px;
  background: var(--primary);
  box-shadow: 0 12px 26px rgba(68, 55, 220, 0.26);
}

.filter-search-button:hover {
  background: var(--primary-dark);
}

.filter-search-button span {
  position: relative;
  width: 18px;
  height: 18px;
  border: 3px solid #ffffff;
  border-radius: 50%;
}

.filter-search-button span::after {
  position: absolute;
  right: -8px;
  bottom: -5px;
  width: 10px;
  height: 3px;
  border-radius: 999px;
  background: #ffffff;
  content: '';
  transform: rotate(45deg);
}

.date-filter-row {
  grid-column: 1 / -1;
  display: block;
  margin: 0 -14px -14px;
  padding: 8px 14px 10px;
  border-top: 1px solid rgba(221, 227, 240, 0.86);
}

.date-scale-shell {
  position: relative;
  min-width: 0;
  padding: 0 30px;
}

.date-scale {
  display: grid;
  grid-auto-columns: 60px;
  grid-template-rows: 18px 34px 18px;
  column-gap: 8px;
  row-gap: 1px;
  align-items: center;
  min-width: 0;
  overflow-x: auto;
  padding: 2px 2px 4px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.date-scale::-webkit-scrollbar {
  display: none;
}

.date-scale-nav {
  position: absolute;
  z-index: 2;
  top: 50%;
  display: grid;
  place-items: center;
  width: 26px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: rgba(255, 255, 255, 0.88);
  color: rgba(68, 55, 220, 0.58);
  font-size: 1.65rem;
  font-weight: 900;
  line-height: 1;
  transform: translateY(-50%);
}

.date-scale-nav:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

.date-scale-nav:first-child {
  left: 0;
}

.date-scale-nav:last-child {
  right: 0;
}

.date-month-range {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.date-scale-button {
  display: grid;
  grid-row: 2 / span 2;
  width: 60px;
  min-height: 53px;
  place-items: center;
  gap: 5px;
  scroll-snap-align: start;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-weight: 900;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.date-scale-button:hover {
  transform: translateY(-1px);
  background: var(--primary-soft);
}

.date-scale-button.in-range {
  background: rgba(8, 20, 39, 0.12);
}

.date-scale-button.selected {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(68, 55, 220, 0.22);
}

.date-day {
  font-size: 1.24rem;
  line-height: 1;
}

.date-weekday {
  font-size: 0.67rem;
  line-height: 1;
  text-transform: uppercase;
}

.date-weekday {
  color: var(--muted);
}

.date-scale-button.weekend:not(.selected) .date-weekday {
  color: #d84848;
}

.date-scale-button.selected .date-weekday {
  color: rgba(255, 255, 255, 0.74);
}

.date-scale-button.selected.weekend .date-weekday {
  color: #ffe1e1;
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
  width: 100%;
  max-width: 1420px;
  margin: 0 auto;
}

.event-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 392px;
  overflow: hidden;
  background: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  box-shadow: 0 20px 48px rgba(8, 20, 39, 0.18);
  color: #ffffff;
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.event-card-actions {
  position: absolute;
  z-index: 3;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  pointer-events: none;
}

.event-card-action {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 50%;
  background: rgba(8, 20, 39, 0.58);
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 12px 24px rgba(8, 20, 39, 0.22);
  pointer-events: auto;
  backdrop-filter: blur(12px);
  transition:
    background 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.event-card-action:hover,
.event-card-action.selected {
  border-color: rgba(242, 213, 138, 0.72);
  background: var(--primary);
  transform: translateY(-1px);
}

.event-card:hover {
  transform: translateY(-4px);
  border-color: rgba(242, 213, 138, 0.36);
  box-shadow: 0 26px 60px rgba(8, 20, 39, 0.25);
}

.event-card:focus-visible {
  outline: 3px solid rgba(68, 55, 220, 0.4);
  outline-offset: 4px;
}

.event-card-photo {
  position: relative;
  flex: 0 0 150px;
  height: 150px;
  min-height: 0;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(68, 55, 220, 0.2), rgba(8, 20, 39, 0.62)), #17223a;
}

.event-card-photo::after {
  position: absolute;
  inset: auto 0 0;
  height: 58%;
  background: linear-gradient(180deg, rgba(8, 20, 39, 0), rgba(8, 20, 39, 0.72));
  content: '';
}

.event-card-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-card-summary {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  padding: 14px 16px 18px;
  background: linear-gradient(180deg, rgba(13, 27, 50, 0.98), var(--ink) 72%), var(--ink);
}

.event-card-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
  gap: 7px;
  margin: 0 0 9px;
}

.event-card-meta span {
  overflow: hidden;
  border-radius: 999px;
  padding: 4px 9px;
  background: rgba(242, 213, 138, 0.16);
  color: var(--gold);
  font-size: 0.84rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-badge {
  width: max-content;
  max-width: 100%;
  margin: 0 0 10px;
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(242, 213, 138, 0.16);
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 900;
}

.event-card-author {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: 100%;
  min-height: 28px;
  margin: 0 0 8px;
  border: 0;
  border-radius: 999px;
  padding: 4px 10px 4px 5px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 900;
}

.event-card-author img,
.event-card-author span {
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
  border-radius: 50%;
  background: var(--gold);
}

.event-card-author img {
  object-fit: cover;
}

.event-card-author strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-card-title-marquee {
  overflow: hidden;
  margin: 0 0 8px;
  min-height: 1.5rem;
}

.event-card-title-marquee h3 {
  display: block;
  width: max-content;
  max-width: none;
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.02rem, 1.2vw, 1.22rem);
  font-weight: 900;
  line-height: 1.18;
  white-space: nowrap;
  transform: translateX(0);
}

.event-card-title-marquee h3 span {
  display: inline-block;
}

.event-card-title-marquee h3.scrolling-title {
  animation: event-title-marquee 9s ease-in-out infinite alternate;
}

@keyframes event-title-marquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(calc(var(--marquee-distance, 0px) * -1));
  }
}

.event-card-description {
  overflow: hidden;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.9rem;
  line-height: 1.3;
}

.my-events-panel {
  display: grid;
  gap: 22px;
  width: 100%;
  max-width: 1420px;
  margin: 0 auto;
}

.my-events-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.my-events-hero h2,
.my-events-hero p {
  margin: 0;
}

.my-events-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.my-events-tab {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 13px;
  background: var(--surface);
  color: var(--text);
  font-weight: 900;
}

.my-events-tab.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
}

.ai-selection-panel {
  width: 100%;
  max-width: 1420px;
  margin: 0 auto;
}

.ai-selection-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.78fr) minmax(0, 1.22fr);
  gap: 24px;
  align-items: start;
}

.ai-chat-column {
  position: sticky;
  top: 144px;
  display: grid;
  grid-template-rows: auto minmax(190px, 1fr) auto;
  gap: 16px;
  min-width: 0;
  max-height: calc(100vh - 172px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.ai-chat-header h2,
.ai-chat-header p,
.ai-results-header h2 {
  margin: 0;
}

.ai-chat-header p:last-child {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.45;
}

.ai-chat-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 190px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}

.ai-message {
  width: fit-content;
  max-width: 88%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  background: var(--surface);
  color: var(--text);
  line-height: 1.45;
}

.ai-message.user {
  align-self: flex-end;
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
}

.ai-message.loading {
  border-color: rgba(68, 55, 220, 0.18);
  background: #ffffff;
}

.ai-message p {
  margin: 0;
}

.ai-chat-form {
  position: sticky;
  bottom: 0;
  display: grid;
  gap: 10px;
  padding-top: 2px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.92) 18px);
}

.ai-chat-form textarea {
  width: 100%;
  min-height: 82px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
}

.ai-chat-form textarea:focus {
  border-color: var(--primary);
  outline: 3px solid rgba(68, 55, 220, 0.14);
}

.ai-loading-bubble {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}

.ai-loading-dots {
  display: inline-flex;
  gap: 4px;
}

.ai-loading-dots span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--primary);
  animation: aiTypingDot 900ms ease-in-out infinite;
}

.ai-loading-dots span:nth-child(2) {
  animation-delay: 120ms;
}

.ai-loading-dots span:nth-child(3) {
  animation-delay: 240ms;
}

.ai-selection-grid.is-loading .event-card {
  animation: aiCardPulse 900ms ease-in-out infinite alternate;
}

@keyframes aiTypingDot {
  0%,
  70%,
  100% {
    opacity: 0.32;
    transform: translateY(0);
  }

  35% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

@keyframes aiCardPulse {
  from {
    filter: saturate(0.9);
    opacity: 0.72;
  }

  to {
    filter: saturate(1);
    opacity: 1;
  }
}

.ai-results-column {
  min-width: 0;
}

.ai-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 16px;
}

.ai-results-header span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 900;
}

.ai-selection-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: none;
  margin: 0;
}

.ai-selection-grid .event-card {
  height: 440px;
}

.profile-panel,
.profile-settings-panel {
  display: grid;
  gap: 18px;
  max-width: 1120px;
  margin: 0 auto;
}

.profile-panel {
  gap: 16px;
  max-width: 913px;
}

.settings-tabs {
  display: inline-flex;
  gap: 8px;
  width: max-content;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 24px rgba(29, 38, 74, 0.06);
}

.settings-tab {
  min-height: 38px;
  border: 0;
  border-radius: 9px;
  padding: 0 16px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.settings-tab.active {
  background: var(--primary);
  color: #ffffff;
}

.profile-showcase {
  position: relative;
  overflow: hidden;
  min-height: 320px;
  border: 0;
  border-radius: 16px;
  background: #696969;
  color: #ffffff;
  box-shadow: none;
}

.profile-cover {
  position: absolute;
  inset: 0;
  min-height: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.16)),
    linear-gradient(135deg, #848484, #585858);
  background-position: center;
  background-size: cover;
}

.profile-cover.has-cover {
  background-position: center;
  background-size: cover;
}

.profile-cover-button {
  position: absolute;
  top: 16px;
  right: 16px;
  min-height: 28px;
  border-radius: 9px;
  padding: 0 12px;
  background: rgba(245, 247, 252, 0.94);
  box-shadow: none;
  font-size: 0.86rem;
}

.profile-identity-card {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) 126px;
  gap: 18px;
  align-items: center;
  min-height: 120px;
  margin: 0;
  border-radius: 16px;
  padding: 0 16px 16px 44px;
  background: rgba(89, 86, 82, 0.74);
  backdrop-filter: blur(3px);
}

.profile-avatar-wrap {
  position: relative;
  align-self: start;
  width: 118px;
  height: 118px;
  margin-top: -60px;
}

.profile-showcase-avatar {
  display: grid;
  place-items: center;
  width: 118px;
  height: 118px;
  overflow: hidden;
  border: 5px solid rgba(89, 86, 82, 0.74);
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.28), transparent 44%),
    linear-gradient(135deg, var(--primary), #746bff);
  color: #ffffff;
  font-size: 2.3rem;
  font-weight: 900;
}

.profile-showcase-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar-add-button {
  position: absolute;
  right: -2px;
  bottom: 2px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 3px solid rgba(89, 86, 82, 0.9);
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
}

.profile-showcase-info {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.profile-name-block h2 {
  margin: 0;
  overflow-wrap: anywhere;
  color: #ffffff;
  font-size: 2rem;
  font-weight: 500;
  line-height: 1;
}

.profile-status-block p {
  max-width: 620px;
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 400;
  line-height: 1.35;
}

.profile-social-array {
  position: absolute;
  bottom: 20px;
  left: 66px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-social-array a,
.profile-empty-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  min-width: 22px;
  height: 22px;
  min-height: 22px;
  border-radius: 50%;
  padding: 0;
  background: rgba(255, 255, 255, 0.86);
  color: #696969;
  font-size: 0.58rem;
  font-weight: 800;
  text-decoration: none;
}

.profile-social-array a span {
  display: inline;
  min-width: 0;
  height: auto;
  border-radius: 0;
  background: transparent;
  font-size: inherit;
  line-height: 1;
}

.profile-social-array a:hover {
  background: #ffffff;
  color: var(--primary);
}

.profile-edit-button {
  align-self: center;
  min-height: 28px;
  border: 0;
  border-radius: 9px;
  padding: 0 12px;
  background: rgba(245, 247, 252, 0.94);
  color: #111111;
  box-shadow: none;
  font-size: 0.86rem;
  font-weight: 500;
}

.profile-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 600px) minmax(0, 296px);
  gap: 16px;
  align-items: start;
}

.profile-collections-card,
.profile-subscriptions-card,
.profile-personalization-card {
  overflow: hidden;
  border: 0;
  border-radius: 16px;
  padding: 16px;
  background: #696969;
  color: #ffffff;
  box-shadow: none;
}

.profile-collections-card {
  min-height: 320px;
}

.profile-side-column {
  display: grid;
  gap: 8px;
}

.profile-personalization-card {
  display: grid;
  align-content: start;
  min-height: 152px;
  padding-bottom: 12px;
}

.profile-personalization-card h3,
.profile-personalization-card strong,
.profile-personalization-card p {
  margin: 0;
}

.profile-personalization-card h3 {
  font-size: 1.65rem;
  font-weight: 500;
  line-height: 1;
}

.profile-personalization-card strong {
  margin-top: 4px;
  color: #8dff57;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}

.profile-personalization-card .profile-progress-track {
  height: 6px;
  margin: 4px 0 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
}

.profile-personalization-card .profile-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #8dff57;
}

.profile-personalization-card p {
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.78rem;
  line-height: 1.12;
}

.profile-personalization-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: #8fc1ff;
  font: inherit;
  text-decoration: underline;
}

.profile-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  margin: 0 0 8px;
  padding-bottom: 8px;
}

.profile-section-head::before,
.profile-section-head::after {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 5px;
  border-radius: 999px;
  content: '';
}

.profile-section-head::before {
  right: 0;
  background: rgba(255, 255, 255, 0.78);
}

.profile-section-head::after {
  width: 64px;
  background: rgba(24, 24, 24, 0.35);
}

.profile-section-head h3 {
  margin: 0;
  color: #ffffff;
  font-size: 1.65rem;
  font-weight: 500;
  line-height: 1;
}

.profile-year-tabs {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-year-tab {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  background: #ffffff;
  color: var(--text);
  font-weight: 900;
}

.profile-year-tab.active {
  border-color: rgba(68, 55, 220, 0.3);
  background: var(--primary-soft);
  color: var(--primary);
}

.profile-year-tab span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  font-size: 0.78rem;
}

.profile-visited-covers {
  display: flex;
  gap: 8px;
  overflow: hidden;
  min-height: 244px;
  border-radius: 8px;
  background: transparent;
}

.profile-event-cover {
  display: block;
  flex: 0 0 220px;
  width: 220px;
  height: 244px;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: rgba(255, 255, 255, 0.2);
}

.profile-event-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-subscriptions-card {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 160px;
}

.profile-subscriptions-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 0 2px;
}

.profile-subscription-item {
  display: grid;
  flex: 0 0 64px;
  gap: 6px;
  justify-items: center;
  border: 0;
  padding: 0;
  background: transparent;
  color: #ffffff;
  font-weight: 500;
  text-align: center;
}

.profile-subscription-item span {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  overflow: hidden;
  border: 0;
  border-radius: 50%;
  background: #d9d9d9;
  color: #696969;
  font-size: 1.2rem;
}

.profile-subscription-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-subscription-item strong {
  width: 100%;
  overflow: hidden;
  font-size: 0.78rem;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-subscriptions-edit {
  width: 100%;
}

.profile-empty-state {
  grid-column: 1 / -1;
  min-height: 244px;
  padding: 0;
  background: transparent;
  color: #ffffff;
}

.profile-empty-state.compact {
  display: none;
}

.profile-empty-state strong {
  display: none;
}

.public-profile-card,
.private-profile-card,
.public-profile-form,
.profile-settings-form,
.organizer-settings-summary,
.organizer-settings-form {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.public-profile-card,
.private-profile-card,
.profile-settings-form,
.organizer-settings-summary,
.organizer-settings-form {
  padding: 28px;
}

.public-profile-card,
.organizer-settings-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.42fr);
  gap: 24px;
  align-items: center;
}

.public-profile-header {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 20px;
  align-items: center;
  min-width: 0;
}

.profile-avatar {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  overflow: hidden;
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.32), transparent 42%),
    linear-gradient(135deg, var(--primary), #746bff);
  color: #ffffff;
  font-size: 2.2rem;
  font-weight: 900;
  box-shadow: 0 16px 32px rgba(68, 55, 220, 0.2);
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.public-profile-header h2 {
  margin: 0 0 8px;
  overflow-wrap: anywhere;
}

.public-profile-header p {
  margin: 0 0 12px;
  color: var(--muted);
  font-weight: 800;
}

.profile-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-social-links a,
.profile-social-links span {
  min-height: 32px;
  border-radius: 999px;
  padding: 6px 11px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 900;
  text-decoration: none;
}

.profile-social-links a:hover {
  color: var(--primary);
}

.public-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.public-stats-grid article {
  min-height: 116px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}

.public-stats-grid strong {
  display: block;
  margin-bottom: 8px;
  color: var(--primary);
  font-size: 2.15rem;
  line-height: 1;
}

.public-stats-grid span {
  color: var(--muted);
  font-weight: 900;
}

.public-profile-form {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(150px, 1fr)) auto;
  gap: 12px;
  align-items: end;
  padding: 18px;
}

.public-profile-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 850;
}

.profile-city-control {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 850;
}

.profile-city-control .city-combobox {
  margin-left: 0;
}

.profile-city-control .city-combobox-toggle {
  width: 100%;
  min-height: 44px;
  border-radius: 10px;
  justify-content: flex-start;
}

.profile-city-control .city-combobox-menu {
  left: 0;
  min-width: 100%;
  transform: none;
}

.public-profile-form input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  background: #ffffff;
  color: var(--text);
}

.public-profile-form input:focus {
  border-color: var(--primary);
  outline: 3px solid rgba(68, 55, 220, 0.14);
}

#authDialog .auth-field-row {
  display: grid;
  grid-template-columns: 37px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  width: min(292px, 100%);
  margin: 0 0 14px;
  color: #111111;
}

#authDialog.auth-register-mode .auth-field-row {
  margin-bottom: 10px;
}

#authDialog .auth-field-row span {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  border-radius: 5px;
  background: #d9d9d9;
  color: #696969;
  font-size: 1.25rem;
  font-weight: 800;
}

#authDialog .auth-field-row input {
  min-height: 37px;
  padding: 0 10px;
  border: 0;
  border-radius: 5px;
  background: #d9d9d9;
  color: #111111;
  font-size: 1rem;
}

#authDialog .auth-field-row input:focus {
  outline: 2px solid rgba(255, 255, 255, 0.85);
}

#authDialog .auth-continue-button {
  width: min(246px, 100%);
  min-height: 37px;
  margin: 12px 0 10px;
  border: 0;
  border-radius: 5px;
  background: #d9d9d9;
  color: #111111;
  font-size: 1rem;
}

#authDialog.auth-register-mode .auth-continue-button {
  margin: 10px 0 8px;
}

#authDialog .auth-terms {
  width: min(320px, 100%);
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 0.8rem;
  line-height: 1.16;
  text-align: center;
}

#authDialog.auth-register-mode .auth-terms {
  width: min(300px, 100%);
  margin-bottom: 8px;
  font-size: 0.76rem;
  line-height: 1.08;
}

#authDialog .auth-message {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 0.86rem;
  line-height: 1.2;
  text-align: center;
}

#authDialog .auth-message:empty {
  display: none;
}

#authDialog .auth-switch {
  margin: 0;
  color: #ffffff;
  font-size: 1.08rem;
  text-align: center;
}

#authDialog.auth-register-mode .auth-switch {
  font-size: 1rem;
}

#authDialog .auth-switch button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #7bbcff;
  font: inherit;
  text-decoration: underline;
}

#authDialog #surveyStep {
  gap: 0;
}

#authDialog #surveyStep .eyebrow {
  margin: 0;
  color: #ffffff;
}

#authDialog #surveyStep h2 {
  margin: 6px 0 12px;
  font-size: 1.72rem;
  font-weight: 500;
}

#authDialog #surveyStep .auth-subtitle {
  margin-bottom: 14px;
  font-size: 1.15rem;
}

#authDialog #surveyStep .form-note {
  color: #ffffff;
  text-align: center;
}

#authDialog .survey-field-row {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin: 0;
  color: #696969;
}

#authDialog #surveyStep .survey-field-row {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 10px;
  margin: 0;
}

#authDialog .survey-field-row span {
  display: grid;
  place-items: center;
  min-height: 40px;
  border-radius: 5px;
  padding: 0 14px;
  background: #d9d9d9;
  color: #696969;
  font-size: 1.28rem;
  font-weight: 500;
}

#authDialog .survey-field-row input {
  min-height: 40px;
  border: 0;
  border-radius: 5px;
  padding: 0 10px;
  background: #d9d9d9;
  color: #111111;
  font-size: 1.1rem;
}

#authDialog .survey-field-row input:focus {
  outline: 2px solid rgba(255, 255, 255, 0.85);
}

#authDialog #surveyStep .primary-action {
  width: min(300px, 100%);
  min-height: 40px;
  margin-top: 22px;
  border-radius: 5px;
  background: #d9d9d9;
  color: #111111;
  font-size: 1.05rem;
  font-weight: 500;
  box-shadow: none;
}

.profile-settings-form {
  display: block;
}

.profile-settings-body::after {
  display: block;
  clear: both;
  content: '';
}

.profile-photo-dropzone {
  float: right;
  display: grid;
  justify-items: center;
  gap: 12px;
  width: min(280px, 36%);
  min-width: 230px;
  margin: 0 0 18px 28px;
  border: 1px dashed rgba(104, 113, 132, 0.55);
  border-radius: 18px;
  padding: 16px;
  background: var(--surface-soft);
  color: var(--muted);
  text-align: center;
  outline: none;
}

.profile-photo-dropzone.dragging,
.profile-photo-dropzone:focus-visible {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.profile-settings-photo {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.32), transparent 42%),
    linear-gradient(135deg, var(--primary), #746bff);
  color: #ffffff;
  font-size: 3rem;
  font-weight: 900;
}

.profile-settings-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-photo-dropzone p {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 850;
}

.profile-settings-fields {
  min-width: 0;
}

.profile-settings-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 850;
}

.profile-settings-form input,
.profile-settings-form textarea,
.social-link-field input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 13px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
}

.profile-settings-form textarea {
  resize: vertical;
  line-height: 1.45;
}

.profile-settings-form input:focus,
.profile-settings-form textarea:focus,
.social-link-field input:focus {
  border-color: var(--primary);
  outline: 3px solid rgba(68, 55, 220, 0.14);
}

.field-counter {
  justify-self: end;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.social-settings-block {
  margin-top: 16px;
}

.social-link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.profile-settings-panel {
  gap: 16px;
  max-width: 913px;
}

.profile-settings-form {
  display: grid;
  gap: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.edit-profile-cover {
  position: relative;
  min-height: 320px;
  overflow: hidden;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.15)),
    linear-gradient(135deg, #888888, #626262);
  background-position: center;
  background-size: cover;
}

.edit-profile-cover.has-cover {
  background-position: center;
  background-size: cover;
}

.edit-cover-button {
  position: absolute;
  top: 14px;
  right: 14px;
  min-height: 28px;
  border: 0;
  border-radius: 9px;
  padding: 0 12px;
  background: rgba(245, 247, 252, 0.94);
  color: #111111;
  box-shadow: none;
  font-size: 0.82rem;
  font-weight: 500;
}

.edit-profile-grid {
  display: grid;
  grid-template-columns: 337px minmax(0, 1fr) 337px;
  gap: 8px 14px;
}

.edit-profile-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 220px;
  border-radius: 16px;
  padding: 16px;
  background: #696969;
  color: #ffffff;
}

.edit-profile-card h2 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1;
  text-align: center;
}

.edit-profile-card label {
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 400;
}

.edit-profile-card input,
.edit-profile-card textarea {
  width: 100%;
  min-height: 28px;
  border: 0;
  border-radius: 5px;
  padding: 4px 9px;
  background: #d9d9d9;
  color: #111111;
  font: inherit;
  text-align: center;
}

.edit-profile-card input:focus,
.edit-profile-card textarea:focus {
  outline: 2px solid rgba(255, 255, 255, 0.8);
}

.edit-profile-subscriptions {
  grid-column: 2 / 4;
}

.edit-profile-about label {
  grid-template-columns: 1fr;
}

.edit-profile-about textarea {
  min-height: 164px;
  resize: none;
  border-radius: 16px;
  padding: 12px;
  text-align: left;
}

.edit-profile-socials label {
  grid-template-columns: 106px minmax(0, 1fr);
}

.edit-subscriptions-list {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 12px 10px;
  overflow: hidden;
  padding-top: 2px;
}

.edit-subscription-item {
  position: relative;
  display: grid;
  gap: 4px;
  justify-items: center;
  min-width: 0;
  color: #ffffff;
  text-align: center;
}

.edit-subscription-item span {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border-radius: 50%;
  background: #d9d9d9;
  color: #696969;
  font-size: 0.9rem;
  font-weight: 800;
}

.edit-subscription-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.edit-subscription-item strong {
  width: 100%;
  overflow: hidden;
  font-size: 0.72rem;
  font-weight: 400;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.edit-subscription-remove {
  position: absolute;
  top: -8px;
  right: 7px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: #d60000;
  color: #111111;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
}

.edit-subscriptions-empty {
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.86);
  text-align: center;
}

.delete-account-button {
  justify-self: center;
  width: 220px;
  min-height: 28px;
  margin-top: 94px;
  border: 0;
  border-radius: 8px;
  background: #4e82bd;
  color: #111111;
  font-weight: 900;
}

/* Light Kairos theme for the recently added account surfaces. */
#authDialog {
  border-radius: 18px;
  box-shadow: var(--shadow);
}

#authDialog .auth-card,
#authDialog.auth-register-mode .auth-card,
#authDialog.auth-survey-mode .auth-card {
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 248, 253, 0.98)),
    var(--surface);
  color: var(--text);
}

.auth-back-button {
  color: var(--primary);
}

#authDialog .auth-step h2,
#authDialog .auth-subtitle,
#authDialog .auth-terms,
#authDialog .auth-message,
#authDialog .auth-switch,
#authDialog #surveyStep .eyebrow,
#authDialog #surveyStep .form-note {
  color: var(--text);
}

#authDialog .auth-subtitle,
#authDialog .auth-terms,
#authDialog #surveyStep .form-note {
  color: var(--muted);
}

.auth-logo {
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.95), transparent 34%),
    var(--primary-soft);
  box-shadow: 0 16px 34px rgba(68, 55, 220, 0.16);
}

#authDialog .auth-field-row span,
#authDialog .survey-field-row span {
  background: var(--primary-soft);
  color: var(--primary);
}

#authDialog .auth-field-row input,
#authDialog .survey-field-row input {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
}

#authDialog .auth-field-row input:focus,
#authDialog .survey-field-row input:focus {
  border-color: var(--primary);
  outline: 3px solid rgba(68, 55, 220, 0.14);
}

#authDialog .auth-continue-button,
#authDialog #surveyStep .primary-action {
  border-radius: 10px;
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(68, 55, 220, 0.22);
}

#authDialog .auth-switch button,
.profile-personalization-link {
  color: var(--primary);
}

.survey-avatar-preview {
  border-color: #ffffff;
  box-shadow: 0 16px 34px rgba(68, 55, 220, 0.18);
}

.profile-showcase,
.edit-profile-cover {
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(68, 55, 220, 0.16)),
    linear-gradient(135deg, #f8faff, #eaf0ff);
  color: var(--text);
  box-shadow: var(--shadow);
}

.profile-cover,
.edit-profile-cover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(68, 55, 220, 0.12)),
    linear-gradient(135deg, #f8faff, #dfe7ff);
}

.profile-identity-card {
  background: rgba(255, 255, 255, 0.88);
  border-top: 1px solid rgba(226, 231, 240, 0.86);
  backdrop-filter: blur(14px);
}

.profile-showcase-avatar {
  border-color: #ffffff;
  box-shadow: 0 18px 38px rgba(68, 55, 220, 0.22);
}

.profile-avatar-add-button,
.survey-avatar-button {
  border-color: #ffffff;
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(68, 55, 220, 0.22);
}

.profile-name-block h2,
.profile-status-block p {
  color: var(--text);
}

.profile-status-block p {
  color: var(--muted);
}

.profile-social-array a,
.profile-empty-chip {
  background: var(--primary-soft);
  color: var(--primary);
}

.profile-social-array a:hover {
  background: var(--primary);
  color: #ffffff;
}

.profile-edit-button,
.profile-cover-button,
.edit-cover-button {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
}

.profile-edit-button:hover,
.profile-cover-button:hover,
.edit-cover-button:hover {
  border-color: rgba(68, 55, 220, 0.34);
  color: var(--primary);
}

.profile-collections-card,
.profile-subscriptions-card,
.profile-personalization-card,
.edit-profile-card {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  box-shadow: var(--shadow);
}

.profile-section-head::before {
  background: var(--line);
}

.profile-section-head::after {
  background: var(--primary);
}

.profile-section-head h3,
.profile-personalization-card h3,
.edit-profile-card h2 {
  color: var(--text);
}

.profile-personalization-card strong {
  color: var(--primary);
}

.profile-personalization-card .profile-progress-track {
  background: var(--primary-soft);
}

.profile-personalization-card .profile-progress-track span {
  background: var(--primary);
}

.profile-personalization-card p,
.edit-profile-card label,
.edit-subscription-item,
.edit-subscriptions-empty {
  color: var(--muted);
}

.profile-subscription-item {
  color: var(--text);
}

.profile-subscription-item span,
.edit-subscription-item span {
  background: var(--primary-soft);
  color: var(--primary);
}

.edit-profile-card input,
.edit-profile-card textarea {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
}

.edit-profile-card input:focus,
.edit-profile-card textarea:focus {
  border-color: var(--primary);
  outline: 3px solid rgba(68, 55, 220, 0.14);
}

.edit-subscription-remove {
  background: #ffffff;
  border: 1px solid rgba(68, 55, 220, 0.22);
  color: var(--primary);
}

.edit-subscription-remove:hover {
  background: var(--primary-soft);
}

.delete-account-button {
  border: 1px solid rgba(68, 55, 220, 0.18);
  background: #ffffff;
  color: var(--primary);
}

.delete-account-button:hover {
  background: var(--primary-soft);
}

.social-link-field {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px !important;
}

.social-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 900;
}

.organizer-settings-panel {
  display: grid;
  gap: 18px;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.organizer-settings-form {
  display: grid;
  gap: 16px;
}

.organizer-settings-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 850;
}

.organizer-settings-form input,
.organizer-settings-form textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 13px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
}

.organizer-settings-form textarea {
  resize: vertical;
  line-height: 1.45;
}

.organizer-settings-form input:focus,
.organizer-settings-form textarea:focus {
  border-color: var(--primary);
  outline: 3px solid rgba(68, 55, 220, 0.14);
}

.profile-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.profile-hero h2 {
  margin: 0 0 10px;
}

.profile-hero p:last-child {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.profile-progress {
  display: grid;
  gap: 8px;
  width: min(230px, 100%);
  padding: 14px;
  border: 1px solid rgba(68, 55, 220, 0.16);
  border-radius: 14px;
  background: var(--primary-soft);
}

.profile-progress strong {
  color: var(--text);
  font-size: 1.65rem;
  line-height: 1;
}

dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  margin: 0;
}

dt {
  color: var(--muted);
  font-size: 0.9rem;
}

dd {
  margin: 6px 0 0;
  font-size: 1.12rem;
  font-weight: 900;
}

.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.profile-tags span {
  min-height: 34px;
  border-radius: 999px;
  padding: 7px 12px;
  background: var(--surface-soft);
  color: var(--text);
  font-weight: 850;
}

.profile-testing {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.test-module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.test-module-card {
  display: grid;
  gap: 16px;
  align-content: space-between;
  min-height: 210px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
}

.test-module-card.complete {
  border-color: rgba(20, 117, 69, 0.22);
  background: linear-gradient(180deg, #ffffff 0%, #f3fbf6 100%);
}

.test-module-card h4 {
  margin: 10px 0 8px;
  font-size: 1.2rem;
  line-height: 1.18;
}

.test-module-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.module-status {
  width: max-content;
  min-height: 26px;
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 900;
}

.module-status.complete {
  background: #e8f8ef;
  color: #147545;
}

.module-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.module-meta span {
  color: var(--muted);
  font-weight: 900;
}

.event-detail {
  max-width: none;
  margin: 0 auto;
  background: var(--bg);
}

.event-detail-page {
  min-height: calc(100vh - 58px);
  padding: 0 0 48px;
}

.event-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background-position: center;
  background-size: cover;
  color: #ffffff;
  box-shadow: var(--shadow);
}

.event-hero::before {
  content: none;
}

.event-hero-content {
  display: none;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.hero-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 900;
}

.event-detail-content-column > h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(2.2rem, 4vw, 4rem);
  font-weight: 900;
  line-height: 1;
}

.event-hero p {
  display: none;
}

.event-detail-layout {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.event-detail-media-column,
.event-detail-content-column {
  display: grid;
  gap: 16px;
}

.event-detail-content-column {
  align-content: start;
}

.detail-section,
.event-sidebar {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.detail-section {
  padding: 24px 28px;
}

.event-map-section {
  min-height: 320px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.event-map-frame {
  display: block;
  width: 100%;
  height: 360px;
  border: 0;
}

.detail-section h2 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 1.45rem;
}

.detail-section p,
.detail-section li {
  color: var(--text);
  line-height: 1.58;
}

.detail-section ul {
  margin: 0;
  padding-left: 20px;
}

.reason-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.reason-grid div {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: start;
}

.reason-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 900;
}

.program-list {
  display: grid;
  gap: 14px;
}

.program-list div {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 16px;
  align-items: start;
}

.program-list time {
  color: var(--text);
  font-weight: 900;
}

.event-sidebar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 22px;
}

.sidebar-info {
  display: grid;
  gap: 4px;
}

.sidebar-info span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 900;
}

.sidebar-info strong {
  color: var(--text);
  line-height: 1.35;
}

.sidebar-price {
  display: none;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--primary);
  font-size: 2rem;
  font-weight: 900;
  line-height: 1.05;
}

.ticket-button,
.contact-button,
.attend-event-button,
.event-list-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 10px;
  font-weight: 900;
  text-decoration: none;
}

.ticket-button {
  background: var(--primary);
  color: #ffffff;
}

.detail-ticket {
  width: 100%;
}

.contact-button {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
}

.attend-event-button {
  width: 100%;
}

.event-list-button {
  width: 100%;
}

.event-subscribe-button {
  width: 100%;
}

.event-organizer-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.event-list-button.selected {
  border-color: rgba(68, 55, 220, 0.26);
  background: var(--primary-soft);
  color: var(--primary);
}

.attend-event-button.attended {
  border-color: rgba(20, 117, 69, 0.22);
  background: #e8f8ef;
  color: #147545;
}

.event-author-card {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: center;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: var(--surface-soft);
  color: var(--text);
  text-align: left;
}

.event-author-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  font-weight: 900;
}

.event-author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-author-card small,
.event-author-card em {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 850;
}

.publics-panel,
.public-profile-panel {
  display: grid;
  gap: 22px;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.publics-hero,
.public-profile-hero,
.public-form,
.publics-list,
.public-events-section {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.publics-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
}

.publics-hero h2 {
  margin: 0;
}

.publics-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.publics-list {
  position: sticky;
  top: 150px;
  display: grid;
  gap: 10px;
  padding: 18px;
}

.public-row {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #ffffff;
  cursor: pointer;
}

.public-row.active,
.public-row:hover {
  border-color: rgba(68, 55, 220, 0.34);
  background: var(--primary-soft);
}

.public-row-avatar,
.public-profile-avatar {
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.32), transparent 42%),
    linear-gradient(135deg, var(--primary), #746bff);
  color: #ffffff;
  font-weight: 900;
}

.public-row-avatar {
  width: 52px;
  height: 52px;
  border-radius: 16px;
}

.public-row-avatar img,
.public-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.public-row strong,
.public-row p,
.public-row span {
  display: block;
  overflow-wrap: anywhere;
}

.public-row p {
  margin: 4px 0;
  color: var(--muted);
  line-height: 1.25;
}

.public-row span {
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 900;
}

.public-form {
  padding: clamp(20px, 3vw, 30px);
}

.public-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 850;
}

.public-form input,
.public-form textarea,
.public-author-select select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 13px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
}

.public-form textarea {
  resize: vertical;
  line-height: 1.45;
}

.public-profile-page {
  display: grid;
  gap: 22px;
}

.public-profile-hero {
  display: grid;
  grid-template-columns: 128px 1fr minmax(220px, 280px);
  gap: 22px;
  align-items: center;
  padding: clamp(24px, 4vw, 38px);
}

.public-profile-avatar {
  width: 128px;
  height: 128px;
  border-radius: 28px;
  font-size: 2.4rem;
}

.public-profile-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.02;
}

.public-profile-hero p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.public-subscribe-panel {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(68, 55, 220, 0.18);
  border-radius: 14px;
  background: var(--primary-soft);
}

.public-subscribe-panel strong {
  color: var(--primary);
  font-size: 2rem;
  line-height: 1;
}

.public-subscribe-panel > span {
  color: var(--muted);
  font-weight: 900;
}

.announcement-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
  font-weight: 900;
}

.announcement-toggle.disabled {
  color: var(--muted);
}

.announcement-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.public-profile-layout {
  display: grid;
  gap: 18px;
}

.public-creators {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.public-creators span {
  min-height: 32px;
  border-radius: 999px;
  padding: 6px 11px;
  background: var(--surface-soft);
  color: var(--text);
  font-weight: 900;
}

.public-events-section {
  padding: 24px;
}

.public-events-grid {
  max-width: none;
}

.organizer-hero-actions {
  display: grid;
  gap: 10px;
  width: min(380px, 100%);
}

.public-author-select {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 850;
}

.organizer-panel {
  display: grid;
  gap: 18px;
  width: min(1420px, 100%);
  margin: 0 auto;
}

.organizer-hero,
.status-flow article,
.organizer-list,
.organizer-form,
.json-import-panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.organizer-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(24px, 4vw, 38px);
}

.organizer-hero h2 {
  max-width: 760px;
  margin: 0 0 10px;
}

.organizer-hero p {
  max-width: 800px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.moderation-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(360px, 100%);
  min-height: 64px;
  padding: 14px 16px;
  border: 1px solid rgba(68, 55, 220, 0.18);
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 900;
}

.moderation-toggle input {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

.status-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.status-flow article {
  padding: 20px;
}

.status-flow span {
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 900;
}

.status-flow strong {
  display: block;
  margin: 8px 0 6px;
  font-size: 1.2rem;
}

.status-flow p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.organizer-workspace {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.organizer-list {
  position: sticky;
  top: 150px;
  padding: 18px;
}

.organizer-list-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.organizer-list-title h3,
.form-section-title h3 {
  margin: 0;
  font-size: 1.18rem;
}

.organizer-events-list {
  display: grid;
  gap: 10px;
}

.organizer-event-row {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  cursor: pointer;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.organizer-event-row:hover,
.organizer-event-row.active {
  border-color: rgba(68, 55, 220, 0.34);
  box-shadow: 0 12px 28px rgba(29, 38, 74, 0.1);
  transform: translateY(-1px);
}

.organizer-event-row strong {
  line-height: 1.25;
}

.organizer-event-row p,
.empty-state p,
.form-section-title p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.status-badge {
  width: max-content;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.status-badge.draft {
  background: #eef2f8;
  color: var(--muted);
}

.status-badge.review {
  background: #fff4d7;
  color: #8a5b00;
}

.status-badge.published {
  background: #e8f8ef;
  color: #147545;
}

.empty-state {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}

.events-empty-state {
  grid-column: 1 / -1;
  width: min(620px, 100%);
  margin: 0 auto;
  padding: 28px;
  text-align: center;
}

.events-empty-state strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.25rem;
}

.organizer-editor {
  display: grid;
  gap: 22px;
}

.organizer-form,
.json-import-panel {
  padding: clamp(20px, 3vw, 30px);
}

.form-section-title {
  margin-bottom: 16px;
}

.event-builder-grid {
  display: grid;
  grid-template-columns: minmax(230px, 0.88fr) minmax(0, 1.72fr);
  gap: clamp(18px, 3vw, 34px);
  align-items: start;
}

.event-image-dropzone {
  position: relative;
  display: grid;
  aspect-ratio: 1;
  min-height: 260px;
  overflow: hidden;
  border: 1px dashed rgba(104, 113, 132, 0.36);
  border-radius: 16px;
  background: var(--surface-soft);
  cursor: pointer;
}

.event-image-dropzone.dragging {
  border-color: rgba(68, 55, 220, 0.72);
  outline: 4px solid rgba(68, 55, 220, 0.12);
}

.organizer-form .event-image-dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.event-image-dropzone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-image-dropzone span {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  min-height: 38px;
  border-radius: 999px;
  padding: 10px 12px;
  background: rgba(8, 20, 39, 0.72);
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 900;
  text-align: center;
  backdrop-filter: blur(12px);
}

.event-main-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.organizer-form .format-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 13px;
  background: #ffffff;
  color: var(--text);
}

.organizer-form .format-switch input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.organizer-form small {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.event-advanced-settings {
  margin-top: 18px;
}

.event-advanced-settings summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 16px;
  background: var(--surface);
  color: var(--text);
  font-weight: 900;
  list-style: none;
  cursor: pointer;
}

.event-advanced-settings summary::-webkit-details-marker {
  display: none;
}

.event-advanced-settings[open] summary {
  border-color: rgba(68, 55, 220, 0.34);
  background: var(--primary-soft);
  color: var(--primary);
}

.event-advanced-settings .form-grid,
.event-advanced-settings .json-import-panel {
  margin-top: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.wide-field {
  grid-column: 1 / -1;
}

.organizer-form label,
.json-import-panel label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 850;
}

.organizer-form input,
.organizer-form select,
.organizer-form textarea,
.json-import-panel textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 13px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
}

.organizer-form textarea,
.json-import-panel textarea {
  resize: vertical;
  line-height: 1.45;
}

.organizer-form input:focus,
.organizer-form select:focus,
.organizer-form textarea:focus,
.json-import-panel textarea:focus {
  border-color: var(--primary);
  outline: 3px solid rgba(68, 55, 220, 0.14);
}

.form-actions,
.json-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 18px;
}

.json-actions input {
  flex: 1;
  min-width: 220px;
}

@media (max-width: 1100px) {
  .edit-profile-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .edit-profile-subscriptions,
  .edit-profile-socials {
    grid-column: auto;
  }

  .edit-profile-about {
    grid-column: 1 / -1;
  }

  .edit-subscriptions-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .event-filters-form {
    grid-template-columns: repeat(2, minmax(0, 1fr)) 64px;
  }

  .filters-header,
  .date-filter-row {
    grid-column: 1 / -1;
  }

  .filter-search,
  .filter-category,
  .price-range-filter,
  .filter-format {
    grid-column: span 2;
  }

  .filter-actions {
    grid-column: 3;
  }

  .public-profile-card,
  .organizer-settings-summary {
    grid-template-columns: 1fr;
  }

  .profile-identity-card {
    grid-template-columns: 150px minmax(0, 1fr);
  }

  .profile-avatar-wrap,
  .profile-showcase-avatar {
    width: 150px;
    height: 150px;
  }

  .profile-edit-button {
    grid-column: 2;
    width: 100%;
  }

  .profile-content-grid {
    grid-template-columns: 1fr;
  }

  .profile-photo-dropzone {
    width: min(250px, 42%);
  }

  .social-link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .public-profile-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .events-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ai-selection-layout {
    grid-template-columns: 1fr;
  }

  .ai-chat-column {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .organizer-workspace {
    grid-template-columns: 1fr;
  }

  .publics-layout,
  .public-profile-hero {
    grid-template-columns: 1fr;
  }

  .organizer-list,
  .publics-list {
    position: static;
  }
}

@media (max-width: 760px) {
  .edit-profile-cover {
    min-height: 220px;
  }

  .edit-profile-grid {
    grid-template-columns: 1fr;
  }

  .edit-profile-about {
    grid-column: auto;
  }

  .edit-profile-card label,
  .edit-profile-socials label {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .edit-subscriptions-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .delete-account-button {
    margin-top: 24px;
  }

  .site-header {
    min-height: 48px;
    padding: 0 12px;
    gap: 8px;
  }

  .header-leading {
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }

  .brand-copy {
    font-size: 0.86rem;
  }

  .primary-nav {
    max-width: calc(100vw - 168px);
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .primary-nav::-webkit-scrollbar {
    display: none;
  }

  .top-nav {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    gap: 8px;
  }

  .nav-link,
  .auth-button,
  .primary-action,
  .secondary-action {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 0 10px;
    font-size: 0.86rem;
    white-space: nowrap;
  }

  .profile-menu {
    flex: 0 0 auto;
  }

  .profile-menu-toggle {
    width: 34px;
    height: 34px;
  }

  .profile-dropdown {
    right: 0;
    min-width: 206px;
  }

  .profile-orb {
    width: 21px;
    height: 21px;
  }

  .profile-cover {
    min-height: 0;
  }

  .profile-cover-button {
    top: 12px;
    right: 12px;
  }

  .profile-identity-card {
    grid-template-columns: 1fr;
    gap: 8px;
    min-height: 150px;
    padding: 0 16px 16px;
  }

  .profile-avatar-wrap {
    width: 108px;
    height: 108px;
    margin-top: -58px;
  }

  .profile-showcase-avatar {
    width: 108px;
    height: 108px;
    font-size: 2rem;
  }

  .profile-avatar-add-button {
    right: 4px;
    bottom: 4px;
  }

  .profile-edit-button {
    grid-column: auto;
    justify-self: start;
  }

  .profile-section-head {
    align-items: center;
    flex-direction: row;
  }

  .profile-visited-covers {
    display: flex;
    overflow-x: auto;
  }

  .profile-social-array {
    position: static;
    margin-top: 8px;
  }

  .profile-content-grid {
    grid-template-columns: 1fr;
  }

  .settings-tabs {
    width: 100%;
  }

  .settings-tab {
    flex: 1;
  }

  .profile-photo-dropzone {
    float: none;
    width: 100%;
    min-width: 0;
    margin: 0 0 16px;
  }

  .hero {
    padding: 104px 18px 48px;
  }

  h1 {
    font-size: clamp(2.45rem, 12vw, 4.4rem);
  }

  .feature-grid,
  .quick-start-grid,
  .event-builder-grid,
  .event-main-fields,
  .public-profile-form,
  .social-link-grid,
  .events-grid,
  .status-flow,
  .test-module-grid,
  .form-grid,
  .basic-profile-grid {
    grid-template-columns: 1fr;
  }

  .wizard-actions {
    grid-template-columns: 1fr;
  }

  .wizard-actions .primary-action:last-child {
    grid-column: auto;
  }

  .profile-hero {
    flex-direction: column;
  }

  .ai-selection-grid {
    grid-template-columns: 1fr;
  }

  .ai-chat-messages {
    min-height: 260px;
    max-height: 420px;
  }

  .my-events-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .public-profile-card,
  .private-profile-card,
  .organizer-settings-summary,
  .organizer-settings-form {
    padding: 20px;
  }

  .public-profile-header {
    grid-template-columns: 82px 1fr;
  }

  .profile-avatar {
    width: 82px;
    height: 82px;
    border-radius: 20px;
    font-size: 1.6rem;
  }

  .organizer-hero,
  .publics-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .public-profile-avatar {
    width: 92px;
    height: 92px;
    border-radius: 22px;
    font-size: 1.8rem;
  }

  .wide-field {
    grid-column: auto;
  }

  .filter-search,
  .filter-category,
  .price-range-filter,
  .filter-format,
  .filter-actions {
    grid-column: auto;
  }

  .event-filters-form {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 14px;
  }

  .filters-header {
    margin: -14px -14px 0;
    padding: 0 14px;
  }

  .filter-actions {
    justify-content: stretch;
  }

  .filter-search-button {
    width: 100%;
    height: 50px;
  }

  .date-filter-row {
    grid-template-columns: 1fr;
    margin: 0 -14px -14px;
    padding: 10px 14px 12px;
  }

  .date-scale {
    grid-auto-columns: 54px;
    column-gap: 6px;
  }

  .date-scale-button {
    width: 54px;
  }

  body.authenticated .app-shell {
    min-height: calc(100vh - 48px);
    margin-top: 48px;
    padding: 12px 12px 44px;
  }

  .event-card {
    height: 390px;
  }

  .event-detail {
    margin: 0;
  }

  .event-detail-layout {
    grid-template-columns: 1fr;
    width: calc(100% - 28px);
    margin: 0 auto;
  }

  .event-hero {
    min-height: 0;
  }

  .event-hero-content {
    display: none;
  }

  .reason-grid {
    grid-template-columns: 1fr;
  }

  .event-sidebar {
    grid-template-columns: 1fr;
  }

  .split-actions {
    grid-template-columns: 1fr;
  }
}
