:root {
  color-scheme: dark;
  --bg: #030303;
  --surface: #0b0b0d;
  --surface-2: #141417;
  --glass: rgba(12, 12, 14, 0.76);
  --line: rgba(255, 255, 255, 0.13);
  --text: #f6f2e8;
  --muted: #aaa6a1;
  --quiet: #6f6b67;
  --accent: #c3f581;
  --green: #00ac64;
  --violet: #6c35ea;
  --lavender: #c397ff;
  --orange: #ff5003;
  --accent-ink: #030303;
  --shadow: 0 22px 55px rgba(0, 0, 0, 0.42);
  --font: "Arial Narrow", "Helvetica Neue Condensed", "Arial", system-ui, sans-serif;
}

/* Professional settings surface */
.settings-panel {
  --settings-bg: #0e0f10;
  --settings-line: rgba(255, 255, 255, 0.1);
  width: min(680px, 100%);
  padding: 0 34px 56px;
  background: var(--settings-bg);
  border-left: 1px solid var(--settings-line);
  color: #f4f2ed;
  font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.settings-panel .drawer-header {
  position: sticky;
  top: 0;
  z-index: 6;
  padding: 28px 0 22px;
  background: rgba(14, 15, 16, 0.94);
  border-bottom: 1px solid var(--settings-line);
  backdrop-filter: blur(20px);
}

.settings-eyebrow {
  margin: 0 0 7px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.settings-panel .drawer-header h2 {
  margin: 0;
  font-size: clamp(30px, 6vw, 42px);
  line-height: 1;
  font-weight: 720;
  letter-spacing: 0;
  text-transform: none;
}

.settings-intro {
  max-width: 420px;
  margin: 10px 0 0;
  color: #969698;
  font-size: 14px;
  line-height: 1.45;
}

.settings-panel .drawer-header .icon-button {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 1px solid var(--settings-line);
  border-radius: 50%;
  background: #191a1c;
}

.settings-nav {
  position: sticky;
  top: 132px;
  z-index: 5;
  display: flex;
  gap: 4px;
  margin: 0 -4px;
  padding: 12px 4px;
  background: rgba(14, 15, 16, 0.94);
  backdrop-filter: blur(20px);
}

.settings-nav-button {
  min-height: 38px;
  border: 0;
  border-radius: 7px;
  padding: 0 16px;
  background: transparent;
  color: #858588;
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
}

.settings-nav-button.active {
  background: #25272a;
  color: #f4f2ed;
}

.settings-panel .drawer-section {
  scroll-margin-top: 194px;
  margin: 0;
  padding: 38px 0 42px;
  border-bottom: 1px solid var(--settings-line);
}

.settings-panel .drawer-section:last-child {
  border-bottom: 0;
}

.settings-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 18px;
  margin-bottom: 22px;
}

.settings-section-number {
  display: block;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.settings-section-head h3 {
  margin: 0 0 7px;
  font-size: 23px;
  line-height: 1.1;
  font-weight: 680;
  letter-spacing: 0;
  text-transform: none;
}

.settings-section-head p {
  max-width: 400px;
  margin: 0;
  color: #8f9093;
  font-size: 13px;
  line-height: 1.45;
}

.settings-live-value {
  align-self: end;
  color: #d9d8d4;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.settings-panel .area-mode-switch {
  width: fit-content;
  display: inline-grid;
  grid-template-columns: auto auto;
  gap: 3px;
  margin: 0 0 14px;
  padding: 3px;
  border: 1px solid var(--settings-line);
  border-radius: 9px;
  background: #17181a;
}

.settings-panel .area-mode-button {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  padding: 0 15px;
  background: transparent;
  color: #898a8d;
  font-size: 12px;
  font-weight: 650;
  text-transform: none;
}

.settings-panel .area-mode-button.active {
  background: #303237;
  color: #f4f2ed;
}

.settings-panel .area-map {
  aspect-ratio: 16 / 10;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: #16191a;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
  cursor: default;
}

.settings-panel .map-tiles {
  filter: saturate(0.68) contrast(1.08) brightness(0.7);
}

.settings-panel .map-tiles::after {
  background: linear-gradient(180deg, rgba(8, 10, 10, 0.03), rgba(8, 10, 10, 0.24));
}

.settings-panel .map-radius {
  fill: rgba(195, 245, 129, 0.13);
  stroke: var(--accent);
  stroke-width: 2;
  stroke-dasharray: none;
}

.map-center-handle circle:first-child {
  fill: #101112;
  stroke: #f4f2ed;
  stroke-width: 2;
}

.map-center-handle circle:last-child {
  fill: var(--accent);
}

.map-radius-handle circle:first-child {
  fill: var(--accent);
  stroke: #101112;
  stroke-width: 2;
}

.map-radius-handle circle:last-child {
  fill: #101112;
}

.map-center-handle,
.map-radius-handle {
  cursor: grab;
}

.map-center-handle.hidden,
.map-radius-handle.hidden {
  display: none;
}

.settings-panel .map-area-polygon {
  fill: rgba(195, 245, 129, 0.16);
  stroke: var(--accent);
  stroke-width: 2;
}

.settings-panel .map-city-layer circle {
  fill: #f4f2ed;
  stroke: #111214;
}

.settings-panel .map-city-layer text {
  fill: rgba(244, 242, 237, 0.78);
  stroke: rgba(14, 15, 16, 0.95);
  font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0;
}

.settings-panel .map-event-dot {
  fill: var(--orange);
  stroke: #111214;
}

.map-instruction {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: rgba(16, 17, 18, 0.82);
  color: #dddcd7;
  font-size: 11px;
  font-weight: 600;
  pointer-events: none;
  backdrop-filter: blur(12px);
}

.map-actions {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 11px;
}

.map-text-action {
  border: 0;
  padding: 4px 0;
  background: transparent;
  color: #c7c7c4;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
}

.map-text-action:hover {
  color: #fff;
}

.map-text-action.danger {
  color: #8f9093;
}

.settings-panel .setting-block {
  border: 0;
}

.radius-setting,
.horizon-setting {
  padding: 25px 0 0;
}

.settings-panel .setting-block label {
  margin-bottom: 14px;
  color: #b7b7b4;
  font-size: 13px;
  font-weight: 600;
}

.settings-panel .setting-block strong {
  color: #f4f2ed;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

.range-scale {
  display: flex;
  justify-content: space-between;
  color: #696a6d;
  font-size: 10px;
}

.settings-impact {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 23px;
  padding-top: 18px;
  border-top: 1px solid var(--settings-line);
}

.settings-impact-icon {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--accent);
}

.settings-impact p {
  margin: 0;
  color: #96979a;
  font-size: 13px;
}

.settings-impact strong {
  color: #e7e5df;
}

.system-state {
  max-width: 190px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  align-self: end;
  color: #b9bab7;
  font-size: 11px;
  font-weight: 600;
  text-align: right;
}

.system-state i {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--accent);
}

.days-presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--settings-line);
  border-radius: 9px;
  background: #17181a;
}

.days-presets button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #858689;
  cursor: pointer;
  font-size: 11px;
  font-weight: 650;
}

.days-presets button.active {
  background: #303237;
  color: #f4f2ed;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

.settings-panel .search-summary-list {
  display: block;
  margin-top: 27px;
}

.search-run {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 18px 0;
  border-top: 1px solid var(--settings-line);
  border-bottom: 1px solid var(--settings-line);
}

.search-run-status,
.search-next {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-next {
  display: grid;
  align-content: center;
  padding-left: 24px;
  border-left: 1px solid var(--settings-line);
}

.search-run small,
.search-next small {
  display: block;
  margin-bottom: 4px;
  color: #77787b;
  font-size: 10px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.search-run strong,
.search-next strong {
  display: block;
  color: #e9e7e1;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

.search-pulse {
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
  border: 3px solid rgba(195, 245, 129, 0.22);
  border-radius: 50%;
  background: var(--accent);
}

.search-flow {
  display: grid;
  grid-template-columns: 1fr 20px 1fr 20px 1fr;
  align-items: center;
  gap: 10px;
  padding: 30px 0;
}

.search-flow-step strong {
  display: block;
  color: #f4f2ed;
  font-size: 34px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

.search-flow-step.selected strong {
  color: var(--accent);
}

.search-flow-step span {
  display: block;
  margin-top: 8px;
  color: #d2d1cc;
  font-size: 12px;
  font-weight: 600;
}

.search-flow-step small {
  display: block;
  margin-top: 5px;
  color: #747579;
  font-size: 10px;
  line-height: 1.35;
}

.search-flow-arrow {
  display: grid;
  place-items: center;
  color: #55565a;
  transform: rotate(45deg);
}

.source-balance {
  padding: 21px 0;
  border-top: 1px solid var(--settings-line);
}

.source-balance-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: #cecdc8;
  font-size: 12px;
  font-weight: 650;
}

.source-balance-head small {
  color: #707175;
  font-size: 10px;
}

.source-balance-bar {
  height: 5px;
  display: flex;
  gap: 2px;
  margin: 12px 0;
  overflow: hidden;
  border-radius: 2px;
  background: #282a2d;
}

.source-balance-bar span {
  width: var(--share);
  background: #e6e4dd;
}

.source-balance-bar span:nth-child(2) {
  background: var(--accent);
}

.source-balance-bar span:nth-child(3) {
  background: #7b7d82;
}

.source-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 16px;
  color: #858689;
  font-size: 10px;
}

.source-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.source-legend i {
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: #e6e4dd;
}

.source-legend i.dynamic {
  background: var(--accent);
}

.source-legend i.learned {
  background: #7b7d82;
}

.search-footnote {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 16px;
  padding-top: 4px;
  color: #6f7074;
  font-size: 10px;
}

.settings-panel .coverage-list {
  gap: 0;
  border-top: 1px solid var(--settings-line);
}

.settings-panel .drawer-row {
  border: 0;
  border-bottom: 1px solid var(--settings-line);
  border-radius: 0;
  padding: 13px 0;
  background: transparent;
}

.settings-panel .drawer-row span {
  color: #aaa9a6;
  font-size: 12px;
}

.reset-learning {
  margin-top: 16px;
}

@media (max-width: 720px) {
  .settings-panel {
    width: 100%;
    padding: 0 18px 44px;
    border-left: 0;
  }

  .settings-panel .drawer-header {
    padding-top: max(20px, env(safe-area-inset-top));
  }

  .settings-nav {
    top: 115px;
    margin: 0 -18px;
    padding: 10px 18px;
    overflow-x: auto;
  }

  .settings-panel .drawer-section {
    scroll-margin-top: 175px;
    padding: 32px 0 36px;
  }

  .settings-section-head {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .settings-live-value,
  .system-state {
    justify-self: start;
    align-self: start;
    max-width: none;
    text-align: left;
  }

  .settings-panel .area-map {
    aspect-ratio: 1.2;
  }

  .days-presets {
    grid-template-columns: 1fr 1fr;
  }

  .search-run {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .search-next {
    padding: 14px 0 0;
    border-top: 1px solid var(--settings-line);
    border-left: 0;
  }

  .search-flow {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 14px;
  }

  .search-flow-arrow {
    display: none;
  }

  .search-flow-step strong {
    font-size: 28px;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  width: 100%;
  max-width: 100%;
}

body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  min-height: 100dvh;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 12% 4%, rgba(0, 172, 100, 0.25), transparent 22rem),
    radial-gradient(circle at 88% 7%, rgba(108, 53, 234, 0.28), transparent 24rem),
    linear-gradient(180deg, #030303 0%, #09090b 100%);
  background-size: 58px 58px, 58px 58px, auto, auto, auto;
  color: var(--text);
  font-family: var(--font);
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.app {
  width: min(1120px, 100%);
  max-width: 100%;
  min-width: 0;
  margin: 0 auto;
  padding: 26px clamp(16px, 4vw, 34px) 64px;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 22px;
}

.app-kicker {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--text);
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.brand-symbol {
  width: 44px;
  height: 28px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 15px;
  font-weight: 1000;
  transform: skew(-8deg);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(54px, 11vw, 126px);
  line-height: 0.78;
  letter-spacing: -0.08em;
  font-weight: 1000;
  text-transform: uppercase;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 0.88;
  letter-spacing: -0.055em;
  font-weight: 1000;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-button,
.profile-button {
  width: 46px;
  height: 46px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: #101011;
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(16px);
  transition: transform 170ms ease, background 170ms ease;
}

.icon-button:active,
.profile-button:active,
.category-pill:active,
.details-link:active {
  transform: scale(0.97);
}

.profile-button {
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 1000;
}

.icon-button svg,
.icon {
  width: 19px;
  height: 19px;
}

.icon-button svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.category-scroller {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  touch-action: pan-x pan-y;
  padding: 8px 0 26px;
  margin-right: calc(clamp(16px, 4vw, 34px) * -1);
  scrollbar-width: none;
}

.category-scroller::-webkit-scrollbar,
.event-row::-webkit-scrollbar,
.event-grid::-webkit-scrollbar {
  display: none;
}

.category-pill {
  flex: 0 0 auto;
  min-height: 48px;
  border: 2px solid var(--line);
  border-radius: 15px;
  background: #111114;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 15px;
  cursor: pointer;
  white-space: nowrap;
  backdrop-filter: blur(16px);
}

.category-pill .icon {
  width: 17px;
  height: 17px;
}

.category-pill span {
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

.category-pill em {
  color: var(--quiet);
  font-style: normal;
  font-size: 12px;
}

.category-pill.active {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff6ee;
}

.category-pill.active em {
  color: rgba(255, 246, 238, 0.68);
}

.section {
  padding-top: 10px;
}

.section + .section {
  padding-top: 44px;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 20px;
  border-top: 2px solid var(--line);
  padding-top: 18px;
}

.small-status {
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  text-transform: uppercase;
}

.event-row {
  display: flex;
  gap: 14px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: scroll;
  overflow-y: visible;
  touch-action: pan-x pan-y;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  padding: 2px clamp(16px, 4vw, 34px) 14px 0;
  margin-right: calc(clamp(16px, 4vw, 34px) * -1);
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.event-row > .event-card {
  flex: 0 0 clamp(270px, 31vw, 344px);
}

.featured-row > .event-card {
  flex-basis: clamp(290px, 34vw, 380px);
}

.event-grid {
  display: flex;
  gap: 14px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: scroll;
  overflow-y: visible;
  touch-action: pan-x pan-y;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  padding: 2px clamp(16px, 4vw, 34px) 14px 0;
  margin-right: calc(clamp(16px, 4vw, 34px) * -1);
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.event-grid > .event-card {
  flex: 0 0 clamp(270px, 31vw, 344px);
}

.category-scroller,
.event-row,
.event-grid {
  cursor: grab;
}

.horizontal-dragging {
  cursor: grabbing;
  user-select: none;
  scroll-snap-type: none;
}

.event-card {
  position: relative;
  scroll-snap-align: start;
  scroll-snap-stop: normal;
  min-width: 0;
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: 26px;
  background: #0c0c0f;
  box-shadow: var(--shadow);
  min-height: 404px;
  isolation: isolate;
  display: flex;
  flex-direction: column;
}

.event-image {
  position: relative;
  z-index: 0;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1.28;
  flex: 0 0 auto;
  border: 0;
  padding: 0;
  color: inherit;
  cursor: pointer;
  text-align: left;
  overflow: hidden;
  background: var(--surface-2);
}

.featured-row .event-image {
  aspect-ratio: 1.32;
}

.event-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(3, 3, 3, 0.04) 0%, rgba(3, 3, 3, 0.08) 45%, rgba(3, 3, 3, 0.46) 100%),
    linear-gradient(180deg, rgba(3, 3, 3, 0.2) 0%, transparent 30%);
}

.event-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.95) contrast(1.02);
  transition: transform 220ms ease;
}

.event-card:hover .event-image img {
  transform: scale(1.025);
}

.event-image.is-missing-image {
  background:
    linear-gradient(145deg, rgba(195, 245, 129, 0.22), rgba(106, 53, 234, 0.18) 42%, rgba(255, 80, 3, 0.16)),
    repeating-linear-gradient(90deg, rgba(246, 242, 232, 0.08) 0 1px, transparent 1px 15px),
    #111114;
}

.missing-image-mark,
.missing-detail-image {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 22px;
  color: var(--text);
  text-transform: uppercase;
}

.missing-image-mark span,
.missing-detail-image span {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0;
}

.missing-image-mark strong,
.missing-detail-image strong {
  max-width: 82%;
  font-size: clamp(1.35rem, 8vw, 2.7rem);
  line-height: 0.88;
}

.date-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 1;
  width: 54px;
  min-height: 58px;
  border-radius: 16px;
  background: var(--accent);
  border: 2px solid #030303;
  color: #030303;
  display: grid;
  place-items: center;
  padding: 7px 0;
  backdrop-filter: blur(16px);
}

.date-badge strong {
  font-size: 25px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.date-badge span {
  color: #030303;
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.event-body {
  position: relative;
  z-index: 2;
  min-height: 0;
  min-width: 0;
  padding: 14px 15px 15px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1;
  justify-content: flex-start;
  background:
    linear-gradient(180deg, rgba(20, 20, 23, 0.98), rgba(8, 8, 10, 1)),
    #0c0c0f;
  border-top: 2px solid rgba(255, 255, 255, 0.08);
}

.event-body::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -34px;
  height: 34px;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(20, 20, 23, 0.98));
}

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

.event-type {
  color: var(--orange);
  font-size: 12px;
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.event-card h3 {
  margin-bottom: 0;
  font-size: 22px;
  line-height: 1;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  font-weight: 1000;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.event-name,
.detail-real-title {
  color: rgba(246, 242, 232, 0.56);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 900;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-card p {
  margin-bottom: 0;
  color: rgba(246, 242, 232, 0.8);
  font-size: 13px;
  line-height: 1.35;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.event-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  margin-top: 2px;
}

.meta-chip {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(246, 242, 232, 0.88);
  font-size: 11px;
  font-weight: 760;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meta-chip .icon {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  color: var(--lavender);
}

.event-body-head .meta-chip {
  flex: 0 0 auto;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 8px;
  background: rgba(255, 255, 255, 0.06);
}

.details-link,
.source-link {
  margin-top: 2px;
  border: 0;
  cursor: pointer;
  min-height: 36px;
  border-radius: 999px;
  background: var(--accent);
  color: #030303;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 1000;
  text-transform: uppercase;
}

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

.source-link {
  margin-top: 18px;
  min-height: 46px;
  width: 100%;
}

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

.feedback-button,
.drawer-action {
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #111114;
  color: var(--text);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 1000;
  text-transform: uppercase;
}

.feedback-button .icon {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

.feedback-button.negative .icon {
  color: var(--orange);
}

.feedback-button.saved .icon {
  color: var(--lavender);
}

.feedback-button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #030303;
}

.feedback-button.active .icon {
  color: #030303;
}

.category-sections {
  display: grid;
  gap: 30px;
  min-width: 0;
  max-width: 100%;
}

.category-block {
  scroll-margin-top: 16px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

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

.category-block-head h3 {
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 31px;
  letter-spacing: -0.055em;
  text-transform: uppercase;
  font-weight: 1000;
}

.category-block-head .icon {
  color: var(--orange);
}

.category-block-head span {
  color: var(--quiet);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.empty-state {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--glass);
  color: var(--muted);
}

.settings-drawer,
.event-drawer {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  visibility: hidden;
}

.settings-drawer.open,
.event-drawer.open {
  pointer-events: auto;
  visibility: visible;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(4, 6, 9, 0.5);
  opacity: 0;
  transition: opacity 180ms ease;
}

.settings-drawer.open .drawer-backdrop,
.event-drawer.open .drawer-backdrop {
  opacity: 1;
}

.drawer-panel,
.event-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1;
  width: min(430px, 100%);
  height: 100%;
  overflow-y: auto;
  background: #09090b;
  border-left: 2px solid var(--line);
  padding: 22px;
  transform: translateX(100%);
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.settings-drawer.open .drawer-panel,
.event-drawer.open .event-drawer-panel {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.drawer-header h2 {
  font-size: 30px;
}

.setting-block {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.setting-block label {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-weight: 650;
  margin-bottom: 12px;
}

.setting-block strong {
  color: var(--text);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.drawer-section {
  padding-top: 18px;
}

.drawer-section h3 {
  margin-bottom: 10px;
  font-size: 16px;
}

.settings-group {
  margin-top: 18px;
  padding: 18px;
  border: 2px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 253, 246, 0.045), rgba(255, 253, 246, 0.012)),
    #0f0f11;
}

.map-section,
.search-status-section {
  border-bottom: 0;
  padding-bottom: 18px;
}

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

.map-head h3 {
  margin-bottom: 4px;
}

.map-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.compact-setting {
  padding: 14px 0 0;
  border-bottom: 0;
}

.compact-setting label {
  margin-bottom: 10px;
}

.area-mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.area-mode-button {
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #121216;
  color: var(--muted);
  min-height: 38px;
  padding: 0 13px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 1000;
  text-transform: uppercase;
}

.area-mode-button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #030303;
}

.area-map {
  width: 100%;
  aspect-ratio: 320 / 220;
  position: relative;
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: 18px;
  background: #151719;
  touch-action: none;
  cursor: grab;
}

.area-map.drawing {
  cursor: crosshair;
}

.map-tiles {
  position: absolute;
  inset: 0;
  filter: saturate(0.82) contrast(1.04) brightness(0.62);
  transform: scale(1.02);
}

.map-tiles::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(3, 3, 4, 0.08), rgba(3, 3, 4, 0.42)),
    radial-gradient(circle at 20% 12%, rgba(195, 245, 129, 0.12), transparent 36%),
    radial-gradient(circle at 92% 24%, rgba(106, 53, 234, 0.18), transparent 34%);
  pointer-events: none;
}

.map-tiles img {
  position: absolute;
  object-fit: cover;
  image-rendering: auto;
}

.map-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.map-radius {
  fill: rgba(195, 245, 129, 0.08);
  stroke: rgba(195, 245, 129, 0.9);
  stroke-width: 2.4;
  stroke-dasharray: 7 5;
}

.map-radius.hidden {
  display: none;
}

.map-area-polygon {
  fill: rgba(195, 245, 129, 0.22);
  stroke: var(--accent);
  stroke-width: 2.8;
}

.map-area-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.map-city-layer circle {
  fill: var(--orange);
  stroke: #08080a;
  stroke-width: 2;
}

.map-city-layer text {
  fill: rgba(255, 253, 246, 0.92);
  paint-order: stroke;
  stroke: rgba(4, 4, 5, 0.85);
  stroke-width: 3px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.map-event-dot {
  fill: var(--lavender);
  stroke: rgba(3, 3, 3, 0.9);
  stroke-width: 1.2;
  opacity: 0.88;
}

.area-map.drawing {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(195, 245, 129, 0.12);
}

.drawer-action {
  width: 100%;
  margin-top: 10px;
  background: transparent;
}

.drawer-action.primary {
  width: auto;
  min-width: 132px;
  margin-top: 0;
  border-color: var(--accent);
  background: var(--accent);
  color: #050505;
}

.drawer-action:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

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

.scrape-head h3 {
  margin-bottom: 4px;
}

.scrape-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.search-summary-list,
.coverage-list {
  display: grid;
  gap: 8px;
}

.search-metric-grid {
  display: grid;
  gap: 10px;
}

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

.drawer-row,
.search-status-card,
.search-metric,
.search-explainer {
  border: 2px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 253, 246, 0.045), rgba(255, 253, 246, 0.012)),
    #101011;
}

.search-status-card,
.search-metric,
.search-explainer {
  padding: 14px;
}

.search-status-card {
  min-height: 118px;
  display: grid;
  align-content: end;
  background:
    radial-gradient(circle at 90% 10%, rgba(195, 245, 129, 0.2), transparent 36%),
    linear-gradient(135deg, rgba(195, 245, 129, 0.1), rgba(255, 80, 3, 0.08)),
    #121214;
}

.search-status-card span,
.search-metric span,
.search-explainer span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.search-status-card strong {
  margin-top: 7px;
  color: var(--text);
  font-size: 28px;
  line-height: 1;
}

.search-status-card p,
.search-explainer p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.search-metric strong {
  display: block;
  margin-top: 8px;
  color: var(--text);
  font-size: 28px;
  line-height: 1;
}

.search-metric small {
  display: block;
  margin-top: 7px;
  color: var(--quiet);
  font-size: 12px;
  line-height: 1.25;
}

.search-metric.active {
  border-color: rgba(195, 245, 129, 0.58);
}

.search-metric.warning {
  border-color: rgba(255, 80, 3, 0.6);
}

.search-metric.muted strong {
  color: var(--quiet);
}

.search-explainer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.search-explainer strong {
  color: var(--accent);
  font-size: 12px;
  white-space: nowrap;
}

.drawer-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
}

.drawer-row span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
}

.drawer-row strong {
  color: var(--accent);
  font-size: 12px;
  white-space: nowrap;
}

.compact-row {
  border-radius: 12px;
  padding: 11px 12px;
}

.event-drawer {
  z-index: 12;
}

.event-drawer-panel {
  width: min(520px, 100%);
  padding: 0;
  touch-action: pan-y;
  will-change: transform;
}

.is-swiping-detail .event-drawer-panel {
  transition: none;
}

.event-drawer-top {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 18px;
  background: rgba(9, 9, 11, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.event-drawer-top .icon-button,
.drawer-header .icon-button {
  position: relative;
  z-index: 5;
  pointer-events: auto;
}

.event-drawer-top .app-kicker {
  margin: 0;
}

.detail-hero {
  position: relative;
  aspect-ratio: 1.08;
  overflow: hidden;
  background: var(--surface-2);
  border-bottom: 2px solid var(--line);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 35%, rgba(3, 3, 3, 0.74) 100%);
}

.detail-gallery {
  width: 100%;
  height: 100%;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
}

.detail-gallery::-webkit-scrollbar {
  display: none;
}

.detail-gallery-slide {
  width: 100%;
  height: 100%;
  position: relative;
  scroll-snap-align: start;
}

.detail-gallery.is-missing-image {
  background:
    linear-gradient(145deg, rgba(195, 245, 129, 0.2), rgba(106, 53, 234, 0.18) 46%, rgba(255, 80, 3, 0.16)),
    repeating-linear-gradient(90deg, rgba(246, 242, 232, 0.08) 0 1px, transparent 1px 18px),
    #111114;
}

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

.detail-gallery-dots {
  position: absolute;
  right: 18px;
  bottom: 22px;
  z-index: 2;
  display: inline-flex;
  gap: 6px;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(3, 3, 3, 0.44);
  backdrop-filter: blur(14px);
}

.detail-gallery-dots span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(246, 242, 232, 0.38);
}

.detail-gallery-dots span.active {
  width: 18px;
  background: var(--accent);
}

.detail-date {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 2;
  border: 2px solid #030303;
  border-radius: 5px;
  background: var(--accent);
  color: #030303;
  padding: 9px 12px;
  font-size: 18px;
  font-weight: 1000;
  text-transform: uppercase;
}

.detail-content {
  padding: 20px;
}

.detail-content h2 {
  margin: 8px 0 12px;
  font-size: clamp(38px, 8vw, 58px);
}

.detail-real-title {
  margin: -4px 0 12px;
  color: var(--accent);
  font-size: 13px;
  white-space: normal;
}

.detail-content p {
  color: #c8c3bb;
  font-size: 17px;
  line-height: 1.42;
}

.detail-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 11px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.detail-meta .meta-chip {
  font-size: 15px;
}

.detail-meta .meta-chip .icon {
  width: 18px;
  height: 18px;
}

.detail-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.detail-reasons span {
  border: 2px solid var(--line);
  border-radius: 5px;
  background: #111114;
  color: var(--text);
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-note {
  margin-top: 18px;
  border-left: 4px solid var(--orange);
  background: #101011;
  color: var(--muted);
  padding: 12px;
  font-size: 13px;
  line-height: 1.4;
}

@media (max-width: 920px) {
  .event-row > .event-card,
  .event-grid > .event-card {
    flex-basis: min(58vw, 360px);
  }

  .featured-row > .event-card {
    flex-basis: min(76vw, 380px);
  }

}

@media (max-width: 620px) {
  .app {
    padding: 20px 16px 52px;
  }

  .app-header {
    align-items: start;
  }

  h1 {
    font-size: 38px;
  }

  .category-scroller,
  .event-row,
  .event-grid {
    margin-right: -16px;
  }

  .event-row,
  .event-grid {
    padding-right: 16px;
  }

  .event-row > .event-card,
  .event-grid > .event-card {
    flex-basis: min(82vw, 340px);
  }

  .featured-row > .event-card {
    flex-basis: min(84vw, 350px);
  }

  .event-card,
  .event-body {
    min-height: 0;
  }

  .event-card {
    min-height: 390px;
  }

  .event-body {
    padding: 13px 14px 14px;
  }

  .event-card h3 {
    font-size: 21px;
  }

  .event-card p {
    font-size: 12px;
    -webkit-line-clamp: 2;
  }

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

  .event-image,
  .featured-row .event-image {
    aspect-ratio: 1.24;
  }

  .feedback-actions {
    grid-template-columns: 1fr;
  }
}

.drawer-panel.settings-panel {
  width: min(680px, 100%);
  padding: 0 34px 56px;
  background: #0e0f10;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 720px) {
  .drawer-panel.settings-panel {
    width: 100%;
    padding: 0 18px 44px;
    border-left: 0;
  }

}
