:root {
  --bg: #070A08;
  --surface: #0D1310;
  --surface-2: #131C16;
  --surface-3: #19241C;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.15);
  --text: #F3F8EF;
  --muted: #93A491;
  --muted-2: #65745F;
  --accent: #C8FF3D;
  --accent-ink: #0A1405;
  --cyan: #6EF3C5;
  --danger: #FF6B7D;
  --warn: #FFC857;
  --radius: 22px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --sheet-h: 38vh;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

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

[hidden] {
  display: none !important;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior: none;
}

body.detail-open,
body.cabinet-open {
  overflow: hidden;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

a {
  color: inherit;
}

img,
svg {
  display: block;
}

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

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

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

/* ---------- layout ---------- */

#app {
  position: fixed;
  inset: 0;
  display: flex;
  overflow: hidden;
}

#mapWrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  background: #0A0F0B;
}

#map {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #0A0F0B;
}

/* ---------- map ---------- */

.leaflet-container {
  background: #0A0F0B;
  font-family: var(--font);
  outline: none;
}

.leaflet-container a {
  color: var(--muted);
}

.leaflet-control-attribution {
  background: rgba(7, 10, 8, 0.72) !important;
  color: var(--muted-2) !important;
  font-size: 9px !important;
  line-height: 1.5 !important;
  padding: 2px 6px !important;
  border-radius: 6px 6px 0 0;
  backdrop-filter: blur(6px);
}

.leaflet-control-attribution a {
  color: var(--muted) !important;
}

.leaflet-bottom.leaflet-left {
  bottom: calc(var(--sheet-h) + 8px);
  transition: bottom 0.3s ease;
}

.leaflet-control-zoom {
  border: 0 !important;
  box-shadow: var(--shadow) !important;
}

.leaflet-control-zoom a {
  width: 36px !important;
  height: 36px !important;
  line-height: 34px !important;
  background: rgba(13, 19, 16, 0.92) !important;
  color: var(--text) !important;
  border: 1px solid var(--line) !important;
  backdrop-filter: blur(10px);
  font-weight: 600;
}

.leaflet-control-zoom a:first-child {
  border-radius: 11px 11px 0 0 !important;
}

.leaflet-control-zoom a:last-child {
  border-radius: 0 0 11px 11px !important;
  border-top: 0 !important;
}

.leaflet-control-zoom a:hover {
  background: var(--surface-3) !important;
  color: var(--accent) !important;
}

/* ---------- topbar ---------- */

.topbar {
  position: absolute;
  top: calc(var(--safe-t) + 12px);
  left: 12px;
  right: 12px;
  z-index: 500;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
}

.topbar > * {
  pointer-events: auto;
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 12px 7px 7px;
  border-radius: 999px;
  background: rgba(10, 15, 12, 0.8);
  border: 1px solid var(--line-strong);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.brand-pill__mark {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
}

.brand-pill__text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  gap: 3px;
}

.brand-pill__title {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.brand-pill__sub {
  font-size: 9.5px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.locate {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 30px rgba(200, 255, 61, 0.25), 0 4px 12px rgba(0, 0, 0, 0.4);
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.locate:active {
  transform: scale(0.96);
}

.locate.is-locating {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--line-strong);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.locate.is-locating svg {
  animation: spin 1s linear infinite;
}

.locate.is-active {
  background: var(--cyan);
  color: #04130D;
  box-shadow: 0 10px 30px rgba(110, 243, 197, 0.22), 0 4px 12px rgba(0, 0, 0, 0.4);
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.cabinet-btn {
  position: relative;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(10, 15, 12, 0.82);
  border: 1px solid var(--line-strong);
  color: var(--text);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.12s ease;
}

.cabinet-btn:hover {
  background: var(--surface-3);
  border-color: rgba(200, 255, 61, 0.42);
  color: var(--accent);
}

.cabinet-btn:active {
  transform: scale(0.95);
}

.cabinet-btn__badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--accent-ink);
  border: 2px solid #070A08;
  font-size: 9.5px;
  font-weight: 900;
  line-height: 1;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- toast ---------- */

.toast {
  position: fixed;
  top: calc(var(--safe-t) + 76px);
  left: 50%;
  z-index: 1300;
  max-width: min(440px, calc(100vw - 32px));
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(19, 28, 22, 0.96);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--accent);
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.45;
  font-weight: 600;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  transform: translate(-50%, -10px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.is-error {
  border-left-color: var(--danger);
}

.toast.is-success {
  border-left-color: var(--cyan);
}

body.cabinet-open .toast {
  top: auto;
  bottom: calc(18px + var(--safe-b));
  transform: translate(-50%, 10px);
}

body.cabinet-open .toast.is-visible {
  transform: translate(-50%, 0);
}

/* ---------- bottom sheet ---------- */

.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 900;
  height: var(--sheet-h);
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #0D1310 0%, #0A0F0B 100%);
  border-top: 1px solid var(--line-strong);
  border-radius: 26px 26px 0 0;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.55);
  transition: height 0.32s cubic-bezier(0.22, 0.8, 0.24, 1);
  will-change: height;
}

.sheet::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(120% 60% at 50% 0%, rgba(200, 255, 61, 0.06), transparent 60%);
}

.sheet[data-snap="peek"] {
  --sheet-h: 38vh;
}

.sheet[data-snap="half"] {
  --sheet-h: 64vh;
}

.sheet[data-snap="full"] {
  --sheet-h: 92vh;
}

.sheet.is-dragging {
  transition: none;
}

.sheet__handle {
  flex: 0 0 auto;
  padding: 9px 0 5px;
  display: flex;
  justify-content: center;
  cursor: grab;
  touch-action: none;
}

.sheet__handle:active {
  cursor: grabbing;
}

.sheet__handle span {
  width: 42px;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.24);
}

.panel-head {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 16px 10px;
}

.brand--panel {
  display: none;
  align-items: center;
  gap: 12px;
}

.brand__mark {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 14px;
  background: var(--accent);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(200, 255, 61, 0.16);
}

.brand__title {
  display: block;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.brand__sub {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  color: var(--muted);
}

/* search */

.search {
  position: relative;
}

.search > svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.search input {
  width: 100%;
  height: 46px;
  padding: 0 42px;
  border-radius: 15px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 15px;
  appearance: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.search input::-webkit-search-cancel-button {
  display: none;
}

.search input::placeholder {
  color: var(--muted-2);
}

.search input:focus {
  outline: none;
  border-color: rgba(200, 255, 61, 0.45);
  background: var(--surface-3);
}

.search__clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.07);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.search__clear:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.search.has-value .search__clear {
  opacity: 1;
  pointer-events: auto;
}

/* chips */

.chips {
  display: flex;
  gap: 8px;
  margin: 0 -16px;
  padding: 0 16px 1px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.chips::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: 0 0 auto;
  height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.chip:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.chip.is-active {
  background: var(--text);
  border-color: var(--text);
  color: #0A0F0B;
}

.chip__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--g, var(--muted));
  flex: 0 0 auto;
}

.chip--genre.is-active {
  background: var(--g, var(--text));
  border-color: var(--g, var(--text));
  color: #081006;
}

.chip--genre.is-active .chip__dot {
  background: #081006;
}

/* list meta */

.list-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 30px;
}

.list-meta__count {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-meta__right {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
}

.sort-btn,
.install-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.sort-btn:hover,
.install-btn:hover {
  border-color: var(--line-strong);
  background: var(--surface-3);
}

.sort-btn svg {
  color: var(--accent);
}

.install-btn {
  color: var(--accent);
  border-color: rgba(200, 255, 61, 0.32);
  background: rgba(200, 255, 61, 0.07);
}

.offline-badge {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(255, 200, 87, 0.1);
  border: 1px solid rgba(255, 200, 87, 0.35);
  color: var(--warn);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* list */

.sheet__scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px 12px calc(20px + var(--safe-b));
  scrollbar-width: thin;
  scrollbar-color: var(--surface-3) transparent;
}

.sheet__scroll::-webkit-scrollbar {
  width: 6px;
}

.sheet__scroll::-webkit-scrollbar-thumb {
  background: var(--surface-3);
  border-radius: 99px;
}

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

.card {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 12px 12px 12px 13px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  text-align: left;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.12s ease;
}

.card::after {
  content: "";
  position: absolute;
  left: 0;
  top: 13px;
  bottom: 13px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--g, var(--accent));
  opacity: 0.9;
}

.card:hover {
  background: var(--surface-2);
  border-color: var(--line-strong);
}

.card:active {
  transform: scale(0.985);
}

.card.is-active {
  border-color: rgba(200, 255, 61, 0.42);
  background: linear-gradient(180deg, rgba(200, 255, 61, 0.07), var(--surface-2));
}

.card--image {
  grid-template-columns: 56px 62px minmax(0, 1fr) auto;
}

.card__media {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

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

.card__time {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-left: 5px;
  min-width: 0;
}

.card__date {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.card__price {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.card__body {
  min-width: 0;
}

.card__tags {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 3px;
  flex-wrap: wrap;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--g, var(--accent));
  white-space: nowrap;
}

.tag::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--g, var(--accent));
  box-shadow: 0 0 8px var(--g, var(--accent));
}

.card__day {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted-2);
  white-space: nowrap;
}

.card__bonus {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(200, 255, 61, 0.12);
  border: 1px solid rgba(200, 255, 61, 0.32);
  color: var(--accent);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.card__rank {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
}

.card__rank[data-rank="1"] {
  background: rgba(255, 208, 74, 0.14);
  border-color: rgba(255, 208, 74, 0.45);
  color: #FFD04A;
}

.card__rank[data-rank="2"] {
  background: rgba(214, 224, 235, 0.12);
  border-color: rgba(214, 224, 235, 0.4);
  color: #D6E0EB;
}

.card__rank[data-rank="3"] {
  background: rgba(209, 139, 88, 0.13);
  border-color: rgba(209, 139, 88, 0.42);
  color: #D18B58;
}

.card__title {
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card__venue {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card__dist {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--cyan);
}

.card__side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  min-width: 16px;
  justify-self: end;
}

.card__side .card__arrow {
  justify-self: auto;
}

.card__arrow {
  color: var(--muted-2);
  justify-self: end;
}

.empty {
  margin-top: 6px;
  padding: 36px 20px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  color: var(--muted);
}

.empty strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 15px;
}

.empty p {
  margin: 0 0 14px;
  font-size: 12.5px;
  line-height: 1.5;
}

.empty button {
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(200, 255, 61, 0.35);
  background: rgba(200, 255, 61, 0.08);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

/* ---------- map pins ---------- */

.pin-wrap {
  background: none;
  border: 0;
}

.pin {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 76px;
  transform: translate(-50%, -4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.55));
  transition: transform 0.18s ease;
}

.pin--titled {
  width: 148px;
}

.pin__avatar {
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  margin-bottom: -3px;
  border-radius: 50%;
  overflow: hidden;
  background: #0B110D;
  border: 3px solid var(--g, var(--accent));
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.55);
  clip-path: circle(50%);
}

.pin__thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.leaflet-container .leaflet-marker-pane .pin__thumb {
  width: 100%;
  height: 100%;
}

.pin__body {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  max-width: 100%;
  padding: 6px 10px;
  border-radius: 999px;
  background: #0B110D;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.pin__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pin__body::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--g, var(--accent));
  box-shadow: 0 0 10px var(--g, var(--accent));
}

.pin__tail {
  width: 2px;
  height: 9px;
  margin-top: 1px;
  background: linear-gradient(var(--g, var(--accent)), transparent);
}

.pin-wrap.is-active {
  z-index: 1000 !important;
}

.pin-wrap.is-active .pin {
  transform: translate(-50%, -4px) scale(1.12);
}

.pin-wrap.is-active .pin__body {
  background: var(--g, var(--accent));
  border-color: var(--g, var(--accent));
  color: #07130A;
}

.pin-wrap.is-active .pin__body::before {
  background: #07130A;
  box-shadow: none;
}

.pin-wrap.is-filtered {
  display: none;
}

/* clusters */

.cluster-wrap {
  background: none;
  border: 0;
}

.cluster {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(200, 255, 61, 0.14);
  border: 1px solid rgba(200, 255, 61, 0.6);
  box-shadow: 0 0 0 7px rgba(200, 255, 61, 0.06), 0 10px 24px rgba(0, 0, 0, 0.45);
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* user location */

.user-pin-wrap {
  background: none;
  border: 0;
}

.user-pin {
  position: relative;
  width: 0;
  height: 0;
}

.user-pin__pulse,
.user-pin__dot {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}

.user-pin__pulse {
  width: 46px;
  height: 46px;
  background: rgba(93, 169, 255, 0.22);
  animation: userPulse 2.4s ease-out infinite;
}

.user-pin__dot {
  width: 16px;
  height: 16px;
  background: #5DA9FF;
  border: 3px solid #F3F8EF;
  box-shadow: 0 0 0 2px rgba(7, 10, 8, 0.5), 0 4px 12px rgba(0, 0, 0, 0.5);
}

@keyframes userPulse {
  0% {
    transform: translate(-50%, -50%) scale(0.55);
    opacity: 0.9;
  }
  70% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

.route-end-wrap {
  background: none;
  border: 0;
}

.route-end {
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--accent);
  border: 4px solid #07130A;
  box-shadow: 0 0 0 4px rgba(200, 255, 61, 0.22), 0 0 26px rgba(200, 255, 61, 0.5);
}

.route-tip {
  background: rgba(7, 10, 8, 0.92) !important;
  border: 1px solid rgba(200, 255, 61, 0.45) !important;
  border-radius: 999px !important;
  color: var(--text) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  padding: 6px 11px !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45) !important;
}

.route-tip::before {
  display: none !important;
}

/* ---------- detail ---------- */

.detail {
  --g: #C8FF3D;
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  transform: translateY(102%);
  visibility: hidden;
  transition: transform 0.34s cubic-bezier(0.22, 0.8, 0.24, 1), visibility 0.34s;
  overflow: hidden;
}

.detail.is-open {
  transform: none;
  visibility: visible;
}

.detail__scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: var(--surface-3) transparent;
}

.detail__hero {
  position: relative;
  flex: 0 0 auto;
  padding: calc(var(--safe-t) + 22px) 20px 22px;
  background:
    radial-gradient(130% 110% at 15% 0%, color-mix(in srgb, var(--g) 26%, transparent), transparent 58%),
    linear-gradient(180deg, #111A13, #0A0F0B);
  border-bottom: 1px solid var(--line);
}

.detail__poster {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 58vh;
  margin: 0 auto 16px;
  border-radius: 18px;
  object-fit: contain;
  background: transparent;
  border: 1px solid var(--line-strong);
}

.detail__poster[hidden] {
  display: none;
}

.detail__close {
  position: absolute;
  top: calc(var(--safe-t) + 14px);
  right: 14px;
  z-index: 2;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line-strong);
  color: var(--text);
  backdrop-filter: blur(10px);
  transition: background 0.16s ease;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.13);
}

.detail__genre {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--g);
  margin-bottom: 10px;
}

.detail__genre::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--g);
  box-shadow: 0 0 10px var(--g);
}

.detail__title {
  font-size: clamp(25px, 7vw, 34px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  padding-right: 36px;
}

.detail__venue {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

.detail__venue svg {
  flex: 0 0 auto;
  color: var(--g);
}

.detail__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.detail__chips .mini {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
}

.detail__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 16px 20px 4px;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 11px 13px;
  min-width: 0;
}

.stat span {
  display: block;
  margin-bottom: 4px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.stat strong {
  display: block;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 700;
}

.stat--wide {
  grid-column: 1 / -1;
}

.stat--dist {
  border-color: rgba(110, 243, 197, 0.24);
  background: linear-gradient(180deg, rgba(110, 243, 197, 0.07), var(--surface));
}

.stat--dist strong {
  color: var(--cyan);
}

.detail__bonus {
  margin: 12px 20px 0;
  padding: 15px;
  border-radius: 18px;
  background:
    radial-gradient(130% 140% at 0% 0%, rgba(200, 255, 61, 0.13), transparent 62%),
    var(--surface);
  border: 1px solid rgba(200, 255, 61, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.detail__bonus-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.detail__bonus-kicker {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.detail__bonus-badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 10.5px;
  font-weight: 900;
  white-space: nowrap;
}

.detail__bonus-text {
  display: block;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 800;
}

.detail__bonus-hint {
  margin-top: 5px;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--muted);
}

.btn--bonus {
  width: 100%;
  height: 42px;
  margin-top: 12px;
  border-radius: 12px;
  background: rgba(200, 255, 61, 0.14);
  border: 1px solid rgba(200, 255, 61, 0.45);
  color: var(--accent);
  font-size: 12.5px;
}

.btn--bonus:hover {
  background: rgba(200, 255, 61, 0.22);
}

.detail__section {
  padding: 18px 20px 0;
}

.detail__section h3 {
  margin-bottom: 9px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.lineup {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.lineup span {
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
}

.detail__desc,
.detail__address {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--muted);
}

.detail__hint {
  margin: 20px 20px 0;
  padding: 11px 13px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed var(--line-strong);
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--muted-2);
}

.detail__hint code {
  color: var(--muted);
  font-size: 10px;
}

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

.share-btn {
  min-height: 66px;
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.12s ease;
}

.share-btn svg {
  width: 22px;
  height: 22px;
}

.share-btn:hover {
  background: var(--surface-3);
}

.share-btn:active {
  transform: scale(0.97);
}

.share-btn--instagram {
  color: #FF9AC9;
  border-color: rgba(255, 122, 182, 0.34);
  background: linear-gradient(135deg, rgba(255, 122, 182, 0.1), rgba(255, 180, 70, 0.05));
}

.share-btn--instagram:hover {
  border-color: rgba(255, 122, 182, 0.5);
  background: linear-gradient(135deg, rgba(255, 122, 182, 0.17), rgba(255, 180, 70, 0.09));
}

.share-btn--telegram {
  color: #7DD3FC;
  border-color: rgba(125, 211, 252, 0.34);
  background: rgba(125, 211, 252, 0.07);
}

.share-btn--telegram:hover {
  border-color: rgba(125, 211, 252, 0.5);
  background: rgba(125, 211, 252, 0.13);
}

.share-btn--friends {
  color: var(--accent);
  border-color: rgba(200, 255, 61, 0.34);
  background: rgba(200, 255, 61, 0.07);
}

.share-btn--friends:hover {
  border-color: rgba(200, 255, 61, 0.5);
  background: rgba(200, 255, 61, 0.13);
}

.detail__actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 9px;
  margin-top: 22px;
  padding: 18px 20px calc(16px + var(--safe-b));
  background: linear-gradient(180deg, rgba(7, 10, 8, 0), var(--bg) 38%);
}

.btn {
  height: 50px;
  padding: 0 18px;
  border-radius: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 800;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.12s ease, filter 0.16s ease, background 0.16s ease;
  white-space: nowrap;
}

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

.btn--accent {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 10px 26px rgba(200, 255, 61, 0.18);
}

.btn--accent:hover {
  filter: brightness(1.06);
}

.btn--ghost {
  background: var(--surface-2);
  border-color: var(--line-strong);
  color: var(--text);
}

.btn--ghost:hover {
  background: var(--surface-3);
}

/* ---------- cabinet ---------- */

.cabinet {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 7, 5, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.cabinet.is-open {
  opacity: 1;
  visibility: visible;
}

.cabinet__panel {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  overflow: hidden;
  transform: translateY(16px);
  transition: transform 0.26s cubic-bezier(0.22, 0.8, 0.24, 1);
}

.cabinet.is-open .cabinet__panel {
  transform: none;
}

.cabinet__head {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: calc(var(--safe-t) + 18px) 18px 12px;
  border-bottom: 1px solid var(--line);
}

.cabinet__eyebrow {
  display: block;
  margin-bottom: 3px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.cabinet__title {
  font-size: 23px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.cabinet__tabs {
  flex: 0 0 auto;
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.cabinet__tab {
  flex: 1 1 0;
  height: 42px;
  border-radius: 12px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.cabinet__tabs--roles .cabinet__tab {
  font-size: 11.5px;
  gap: 5px;
}

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

.cabinet__tab.is-active {
  background: var(--surface-2);
  border-color: var(--line-strong);
  color: var(--text);
}

.cabinet__count {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.cabinet__tab.is-active .cabinet__count {
  background: var(--accent);
  color: var(--accent-ink);
}

.cabinet__scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px 14px calc(24px + var(--safe-b));
  scrollbar-width: thin;
  scrollbar-color: var(--surface-3) transparent;
}

.cabinet__scroll::-webkit-scrollbar {
  width: 6px;
}

.cabinet__scroll::-webkit-scrollbar-thumb {
  background: var(--surface-3);
  border-radius: 99px;
}

.cabinet-profile {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 12px;
  padding: 13px;
  border-radius: 17px;
  background: linear-gradient(135deg, rgba(200, 255, 61, 0.09), var(--surface));
  border: 1px solid rgba(200, 255, 61, 0.22);
}

.cabinet-profile__ava {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 15px;
  font-weight: 900;
}

.cabinet-profile__body {
  min-width: 0;
}

.cabinet-profile__name {
  display: block;
  font-size: 14px;
  font-weight: 800;
}

.cabinet-profile__meta {
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
  color: var(--muted);
}

.cabinet-role-head {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 12px;
  padding: 13px;
  border-radius: 17px;
  background: linear-gradient(135deg, rgba(200, 255, 61, 0.1), var(--surface));
  border: 1px solid rgba(200, 255, 61, 0.22);
}

.cabinet-role-head__ava {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 14px;
  font-weight: 900;
}

.cabinet-role-head strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
}

.cabinet-role-head span:not(.cabinet-role-head__ava) {
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
  line-height: 1.35;
  color: var(--muted);
}

.cabinet-role-note {
  margin-bottom: 12px;
  padding: 11px 13px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted);
}

.cabinet-select {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding: 9px 11px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.cabinet-select span {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cabinet-select select {
  min-width: 0;
  max-width: 62%;
  height: 32px;
  padding: 0 9px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--text);
  font-size: 12px;
}

.cabinet-empty {
  padding: 40px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  text-align: center;
  color: var(--muted);
}

.cabinet-empty strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 15px;
}

.cabinet-empty p {
  margin: 0 auto 14px;
  max-width: 300px;
  font-size: 12px;
  line-height: 1.5;
}

.cabinet-empty button {
  height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(200, 255, 61, 0.1);
  border: 1px solid rgba(200, 255, 61, 0.38);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.pass-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pass {
  position: relative;
  padding: 14px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
}

.pass::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--g, var(--accent));
}

.pass__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
  padding-left: 6px;
}

.pass__genre {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--g, var(--accent));
}

.pass__genre::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--g, var(--accent));
}

.pass__code {
  padding: 4px 8px;
  border-radius: 7px;
  background: rgba(200, 255, 61, 0.08);
  border: 1px solid rgba(200, 255, 61, 0.26);
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.pass h3 {
  padding-left: 6px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
}

.pass__meta {
  margin-top: 3px;
  padding-left: 6px;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--muted);
}

.pass__bonus {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 9px 0 0 6px;
  border-top: 1px dashed var(--line);
}

.pass__bonus span {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
}

.pass__bonus strong {
  font-size: 11.5px;
  line-height: 1.35;
  font-weight: 700;
}

.pass__foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  padding-left: 6px;
  font-size: 10px;
  color: var(--muted-2);
}

.org-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.org-stat {
  padding: 12px 13px;
  border-radius: 15px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.org-stat strong {
  display: block;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.1;
  color: var(--accent);
}

.org-stat span {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
}

.org-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.org-card {
  padding: 13px;
  border-radius: 17px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.org-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.org-card__head > div:not(.org-card__thumb) {
  flex: 1 1 auto;
  min-width: 0;
}

.org-card__thumb {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 13px;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

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

.org-poster-preview {
  grid-column: 1 / -1;
  overflow: hidden;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.org-poster-preview img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
}

.org-card__title {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
}

.org-card__meta {
  margin-top: 3px;
  font-size: 10.5px;
  line-height: 1.4;
  color: var(--muted);
}

.org-bonus {
  flex: 0 1 auto;
  display: inline-flex;
  align-items: center;
  max-width: 52%;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(200, 255, 61, 0.1);
  border: 1px solid rgba(200, 255, 61, 0.32);
  color: var(--accent);
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}

.org-bonus--none {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
  color: var(--muted-2);
}

.org-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 11px;
}

.org-btn {
  height: 32px;
  padding: 0 11px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  font-size: 10.5px;
  font-weight: 700;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.org-btn:hover {
  background: var(--surface-3);
  border-color: var(--line-strong);
}

.org-btn--accent {
  background: rgba(200, 255, 61, 0.08);
  border-color: rgba(200, 255, 61, 0.3);
  color: var(--accent);
}

.org-btn--danger {
  background: rgba(255, 95, 95, 0.07);
  border-color: rgba(255, 95, 95, 0.28);
  color: #ff8d8d;
}

.admin-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.admin-form {
  margin-bottom: 12px;
  padding: 13px;
  border-radius: 17px;
  background: var(--surface);
  border: 1px solid rgba(200, 255, 61, 0.24);
}

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

.admin-form__head strong {
  font-size: 13px;
  font-weight: 800;
}

.admin-form__head .org-cancel {
  flex: 0 0 auto;
  height: 30px;
  padding: 0 10px;
}

.admin-form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.org-field--wide {
  grid-column: 1 / -1;
}

.org-editor {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 11px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
}

.org-editor__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.org-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.org-field > span {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.org-field input,
.org-field select,
.org-field textarea {
  width: 100%;
  height: 40px;
  padding: 0 10px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 12.5px;
  appearance: none;
}

.org-field input[type="file"] {
  height: auto;
  min-height: 40px;
  padding: 7px 10px;
  font-size: 11.5px;
}

.org-field select {
  padding-right: 28px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 15px) 17px, calc(100% - 10px) 17px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.org-field textarea {
  height: auto;
  min-height: 82px;
  padding: 9px 10px;
  line-height: 1.4;
  resize: vertical;
}

.org-field input:focus,
.org-field select:focus,
.org-field textarea:focus {
  outline: none;
  border-color: rgba(200, 255, 61, 0.45);
  background-color: var(--surface-3);
}

.org-editor__actions {
  display: flex;
  gap: 8px;
}

.org-save,
.org-cancel {
  flex: 1 1 0;
  height: 38px;
  border-radius: 10px;
  font-size: 11.5px;
  font-weight: 800;
}

.org-save {
  background: var(--accent);
  color: var(--accent-ink);
}

.org-cancel {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
}

.org-guests {
  margin-top: 11px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
}

.org-guests__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.guest-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 8px;
}

.guest {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.guest.is-user {
  border-color: rgba(200, 255, 61, 0.3);
  background: linear-gradient(90deg, rgba(200, 255, 61, 0.06), var(--surface-2));
}

.guest__ava {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-3);
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.guest.is-user .guest__ava {
  background: var(--accent);
  color: var(--accent-ink);
}

.guest__body {
  flex: 1 1 auto;
  min-width: 0;
}

.guest__name {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.guest__meta {
  display: block;
  margin-top: 1px;
  font-size: 9.5px;
  color: var(--muted);
}

.guest__tag {
  flex: 0 0 auto;
  padding: 3px 6px;
  border-radius: 5px;
  background: rgba(200, 255, 61, 0.1);
  color: var(--accent);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.org-empty {
  margin-top: 8px;
  padding: 14px;
  border-radius: 12px;
  border: 1px dashed var(--line);
  text-align: center;
  font-size: 10.5px;
  line-height: 1.4;
  color: var(--muted-2);
}

/* ---------- claim ---------- */

.claim {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(4, 7, 5, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.claim.is-open {
  opacity: 1;
  visibility: visible;
}

.claim__panel {
  position: relative;
  width: min(460px, 100%);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 22px;
  border-radius: 24px;
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(200, 255, 61, 0.08), transparent 55%),
    linear-gradient(180deg, #101811, #0A0F0B);
  border: 1px solid var(--line-strong);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
  transform: translateY(14px) scale(0.985);
  transition: transform 0.24s cubic-bezier(0.22, 0.8, 0.24, 1);
  scrollbar-width: thin;
  scrollbar-color: var(--surface-3) transparent;
}

.claim.is-open .claim__panel {
  transform: none;
}

.claim__close {
  position: absolute;
  top: 14px;
  right: 14px;
}

.claim__eyebrow {
  display: block;
  margin-bottom: 4px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.claim__title {
  padding-right: 40px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.claim__event {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 12px;
  padding: 11px 12px;
  border-radius: 13px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.claim__event strong {
  font-size: 13px;
  line-height: 1.3;
}

.claim__event span {
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
}

.claim__bonus {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 13px;
  background: rgba(200, 255, 61, 0.08);
  border: 1px solid rgba(200, 255, 61, 0.28);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.claim__lead {
  margin-top: 13px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}

.claim__form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field > span {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.field input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border-radius: 11px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.field input::placeholder {
  color: var(--muted-2);
}

.field input:focus {
  outline: none;
  border-color: rgba(200, 255, 61, 0.45);
  background: var(--surface-3);
}

.claim__error {
  margin: 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 107, 125, 0.1);
  border: 1px solid rgba(255, 107, 125, 0.3);
  color: var(--danger);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.4;
}

.claim__submit {
  width: 100%;
  height: 48px;
  margin-top: 2px;
}

.claim__note {
  margin-top: 10px;
  font-size: 10.5px;
  line-height: 1.4;
  color: var(--muted-2);
}

.pass-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 14px;
  padding: 16px;
  border-radius: 18px;
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(200, 255, 61, 0.1), transparent 55%),
    var(--surface);
  border: 1px solid rgba(200, 255, 61, 0.35);
  overflow: hidden;
}

.pass-card__label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.pass-card__code {
  margin: 1px 0 4px;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 27px;
  font-weight: 900;
  letter-spacing: 0.1em;
  line-height: 1.2;
}

.pass-card__name {
  font-size: 14px;
  font-weight: 800;
}

.pass-card__event {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.pass-card__meta {
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
}

.pass-card__bonus {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.claim__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}

.claim__actions .btn {
  height: 44px;
  font-size: 12px;
}

/* ---------- desktop ---------- */

@media (min-width: 1024px) {
  #app {
    flex-direction: row;
  }

  .sheet {
    position: relative;
    order: -1;
    left: auto;
    right: auto;
    bottom: auto;
    width: 420px;
    height: 100%;
    border-top: 0;
    border-right: 1px solid var(--line-strong);
    border-radius: 0;
    box-shadow: none;
    transition: none;
  }

  .sheet::before {
    background: radial-gradient(120% 40% at 50% 0%, rgba(200, 255, 61, 0.05), transparent 60%);
  }

  .sheet__handle {
    display: none;
  }

  .panel-head {
    padding: 24px 20px 12px;
    gap: 12px;
  }

  .brand--panel {
    display: flex;
    margin-bottom: 4px;
  }

  .brand-pill {
    display: none;
  }

  .chips {
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    overflow: visible;
  }

  .sheet__scroll {
    padding: 6px 14px 24px;
  }

  .card {
    grid-template-columns: 66px minmax(0, 1fr) auto;
    padding: 13px 13px 13px 14px;
  }

  .card--image {
    grid-template-columns: 60px 66px minmax(0, 1fr) auto;
  }

  .card__date {
    font-size: 19px;
  }

  .topbar {
    top: 16px;
    right: 16px;
    left: auto;
  }

  .leaflet-bottom.leaflet-left {
    bottom: 10px;
  }

  .detail {
    left: 0;
    right: auto;
    top: 0;
    bottom: 0;
    width: 420px;
    transform: translateX(-103%);
    border-right: 1px solid var(--line-strong);
    box-shadow: 26px 0 70px rgba(0, 0, 0, 0.55);
  }

  .detail.is-open {
    transform: none;
  }

  .detail__hero {
    padding-top: 24px;
  }

  .detail__close {
    top: 18px;
  }

  .detail__title {
    font-size: 32px;
  }

  .cabinet {
    padding: 24px;
  }

  .cabinet__panel {
    width: min(780px, 100%);
    height: min(88vh, 920px);
    border: 1px solid var(--line-strong);
    border-radius: 28px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
  }

  .cabinet__head {
    padding: 22px 24px 14px;
  }

  .cabinet__tabs {
    padding: 10px 18px;
  }

  .cabinet__scroll {
    padding: 16px 18px 24px;
  }

  .toast {
    top: 20px;
    left: calc(420px + (100vw - 420px) / 2);
  }
}

@media (min-width: 1440px) {
  .sheet {
    width: 460px;
  }

  .detail {
    width: 460px;
  }

  .toast {
    left: calc(460px + (100vw - 460px) / 2);
  }
}

/* ---------- small phones ---------- */

@media (max-width: 430px) {
  .install-btn {
    width: 30px;
    padding: 0;
    justify-content: center;
  }

  .install-btn span {
    display: none;
  }
}

@media (max-width: 380px) {
  .brand-pill__sub {
    display: none;
  }

  .locate {
    height: 42px;
    padding: 0 13px;
    font-size: 12.5px;
  }

  .cabinet-btn {
    width: 42px;
    height: 42px;
  }

  .card {
    grid-template-columns: 56px minmax(0, 1fr) auto;
    gap: 9px;
    padding: 11px;
  }

  .card--image {
    grid-template-columns: 46px 56px minmax(0, 1fr) auto;
  }

  .card__media {
    width: 46px;
    height: 46px;
    border-radius: 12px;
  }

  .card__date {
    font-size: 16px;
  }

  .list-meta__right {
    gap: 5px;
  }

  .sort-btn,
  .install-btn {
    padding: 0 9px;
  }
}

@media (max-width: 360px) {
  .locate {
    width: 42px;
    padding: 0;
    justify-content: center;
  }

  .locate span {
    display: none;
  }

  .topbar__actions {
    gap: 6px;
  }

  .claim__panel {
    padding: 18px;
  }
}

/* ---------- reduced motion ---------- */

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

/* ---------- guest likes, tickets, auth and support ---------- */
.card__like {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-width: 22px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted-2);
  font: inherit;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.card__like:hover,
.card__like.is-liked {
  color: #FF6B8A;
}

.card__like-count {
  font-size: 9px;
  font-weight: 800;
  color: var(--muted);
}

.btn--ticket {
  background: linear-gradient(135deg, #FF6B8A, #FF3D6A);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 26px rgba(255, 61, 106, 0.2);
}

.btn--ticket:hover {
  filter: brightness(1.08);
}

.btn--like.is-liked {
  border-color: rgba(255, 107, 138, 0.45);
  color: #FF6B8A;
  background: rgba(255, 107, 138, 0.1);
}

.like-icon {
  font-size: 17px;
  line-height: 1;
}

.like-count {
  margin-left: 5px;
  font-size: 10px;
  color: var(--muted);
}

.cabinet-account {
  margin-bottom: 12px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.cabinet-account p {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.cabinet-account__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.cabinet-quick {
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.cabinet-quick:hover {
  background: var(--surface-3);
}

.cabinet-quick--accent {
  border-color: rgba(200, 255, 61, 0.4);
  background: rgba(200, 255, 61, 0.1);
  color: var(--accent);
}

.guest-dialog {
  width: min(520px, calc(100vw - 24px));
  max-width: none;
  max-height: 90vh;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.55);
}

.guest-dialog--support {
  width: min(640px, calc(100vw - 24px));
}

.guest-dialog::backdrop {
  background: rgba(3, 5, 4, 0.72);
  backdrop-filter: blur(7px);
}

.guest-dialog__panel {
  position: relative;
  max-height: 90vh;
  overflow: auto;
  padding: 26px;
  scrollbar-width: thin;
}

.guest-dialog__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.guest-dialog__eyebrow {
  display: block;
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.guest-dialog h2 {
  margin: 0 0 8px;
  font-size: 26px;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.guest-dialog__lead {
  margin: 0 0 18px;
  max-width: 420px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.guest-dialog__note {
  margin: -8px 0 14px;
  padding: 9px 11px;
  border-radius: 12px;
  background: rgba(200, 255, 61, 0.08);
  border: 1px solid rgba(200, 255, 61, 0.22);
  color: var(--accent);
  font-size: 11px;
}

.guest-dialog__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.guest-dialog .field {
  margin-bottom: 12px;
}

.guest-dialog__submit {
  width: 100%;
  margin-top: 4px;
}

.guest-dialog__error {
  margin: 0 0 10px;
  color: #FF8E9F;
  font-size: 11px;
}

.guest-dialog__switch {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 11.5px;
}

.guest-dialog__switch button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.support-loading,
.support-empty {
  margin-bottom: 14px;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 15px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.support-threads {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.support-thread {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-soft, var(--surface-2));
}

.support-thread__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.support-thread__head strong,
.support-thread__head span {
  display: block;
}

.support-thread__head strong {
  font-size: 12.5px;
}

.support-thread__head div span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9.5px;
}

.support-status {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.support-status--answered {
  border-color: rgba(200, 255, 61, 0.35);
  background: rgba(200, 255, 61, 0.09);
  color: var(--accent);
}

.support-thread__messages {
  display: grid;
  gap: 7px;
}

.support-message {
  padding: 9px 10px;
  border-radius: 12px;
  background: var(--surface);
}

.support-message--admin {
  border: 1px solid rgba(200, 255, 61, 0.18);
  background: rgba(200, 255, 61, 0.06);
}

.support-message__head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
}

.support-message__head strong {
  color: var(--text);
  font-size: 10px;
}

.support-message__head span {
  color: var(--muted-2);
  font-size: 9px;
}

.support-message p {
  margin: 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.support-reply {
  display: grid;
  gap: 7px;
  margin-top: 9px;
}

.support-reply textarea,
.support-form textarea,
.guest-dialog textarea {
  width: 100%;
  resize: vertical;
  min-height: 54px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 12px;
}

.support-reply button {
  justify-self: end;
  height: 31px;
  padding: 0 12px;
  font-size: 10px;
}

.support-form {
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.support-form .field:last-of-type {
  margin-bottom: 12px;
}

@media (max-width: 560px) {
  .guest-dialog__panel {
    padding: 22px 18px;
  }

  .guest-dialog__row {
    grid-template-columns: 1fr;
    gap: 0;
  }

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