﻿:root {
  color-scheme: dark light;
  --bg: #080810;
  --panel: rgba(18, 18, 31, .88);
  --panel-2: rgba(255, 255, 255, .065);
  --text: #f7f3ff;
  --muted: #a59db9;
  --border: rgba(255, 255, 255, .12);
  --pink: #ff3d8b;
  --violet: #8b5cf6;
  --cyan: #00d4ff;
  --green: #18e58a;
  --shadow: 0 22px 70px rgba(0,0,0,.42);
  --radius: 16px;
  font-family: 'Plus Jakarta Sans', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; background: var(--bg); color: var(--text); }
body { overflow-x: hidden; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.skip-link {
  position: fixed;
  z-index: 200;
  top: 8px;
  left: 8px;
  transform: translateY(-160%);
  padding: 10px 14px;
  border-radius: 10px;
  color: #080810;
  background: #fff;
  font-weight: 900;
}
.skip-link:focus { transform: translateY(0); }

.hidden { display: none !important; }
.screen { min-height: 100vh; }
.noscript { padding: 24px; }

.splash {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 22px;
  padding: max(22px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 26% 12%, rgba(255,61,139,.24), transparent 28%),
    radial-gradient(circle at 82% 78%, rgba(0,212,255,.14), transparent 31%),
    linear-gradient(180deg, #0b0b16, #07070d);
  text-align: center;
}
.splash-media {
  width: 88px; height: 88px; border-radius: 24px; overflow: hidden;
  box-shadow: 0 20px 52px rgba(255,61,139,.38);
}
.splash-media img, .avatar-btn img, .profile-hero img, .comment img { width: 100%; height: 100%; object-fit: cover; }
.splash-media { animation: floatLogo 4.8s ease-in-out infinite; }
.eyebrow { margin: 0 0 7px; color: var(--cyan); text-transform: uppercase; letter-spacing: .12em; font-weight: 900; font-size: 11px; }
.splash h1 { max-width: calc(100vw - 36px); margin: 0 auto; font-family: 'Syne', 'Plus Jakarta Sans', sans-serif; font-size: clamp(42px, 13vw, 82px); line-height: .92; font-weight: 800; letter-spacing: 0; background: linear-gradient(135deg, #ff3d8b, #8b5cf6 58%, #00d4ff); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 16px 34px rgba(255,61,139,.18)); }
.splash-copy p:not(.eyebrow) { max-width: 520px; margin: 14px auto 0; color: var(--muted); line-height: 1.65; }
.auth-actions { display: grid; gap: 11px; width: min(430px, 100%); }
.auth-legal, .account-auth-legal {
  margin: 2px auto 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
  text-align: center;
}
.auth-legal a, .account-auth-legal a { color: #75e9ff; font-weight: 900; }
.terms-consent {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--muted);
  background: rgba(255,255,255,.035);
  text-align: left;
  font-size: 13px;
  line-height: 1.45;
}
.terms-consent input { width: 20px; height: 20px; margin: 0; accent-color: var(--pink); }
.terms-consent a, .helper-link { color: #75e9ff; font-weight: 900; }
.fineprint, .helper, .muted { color: var(--muted); font-size: 13px; line-height: 1.55; }

.btn, .chip-btn, .mini-btn, .icon-btn, .avatar-btn {
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  background: var(--panel-2);
}
.btn { min-height: 52px; padding: 0 18px; font-weight: 900; display: inline-flex; align-items: center; justify-content: center; gap: 9px; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.btn.primary { border: 0; background: linear-gradient(135deg, var(--pink), var(--violet)); box-shadow: 0 12px 34px rgba(255,61,139,.28); }
.btn.ghost { background: rgba(255,255,255,.045); }
.btn.danger { border-color: rgba(255,51,95,.44); color: #ffdce4; background: rgba(255,51,95,.12); }
.btn:hover, .chip-btn:hover, .mini-btn:hover, .icon-btn:hover { transform: translateY(-1px); border-color: rgba(255,255,255,.24); }
.btn:active, .chip-btn:active, .mini-btn:active, .icon-btn:active { transform: translateY(0) scale(.98); }

.main { min-height: 100vh; padding: 78px 18px 28px; }
.topbar {
  position: fixed; inset: 0 0 auto; z-index: 20;
  height: 66px; display: flex; align-items: center; justify-content: space-between;
  padding: max(10px, env(safe-area-inset-top)) 18px 10px;
  background: rgba(8,8,16,.82); backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0; background: transparent; border: 0; color: var(--text); font-family: 'Syne', 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 20px; }
.brand img { width: 36px; height: 36px; border-radius: 10px; box-shadow: 0 0 0 1px rgba(255,255,255,.08); }
.brand span { line-height: 1; transform: translateY(-1px); }
.top-actions { display: flex; align-items: center; gap: 9px; }
.icon-btn, .avatar-btn { width: 42px; height: 42px; display: grid; place-items: center; position: relative; }
.avatar-btn { overflow: hidden; padding: 0; }
.dot { position: absolute; right: 8px; top: 8px; width: 9px; height: 9px; background: #ff335f; border-radius: 999px; box-shadow: 0 0 0 3px rgba(255,51,95,.18); }
.mobile-nav { display: none; }
.create-close { display: none; }

.map-panel { position: relative; height: min(58vh, 620px); min-height: 390px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); animation: fadeUp .42s ease both; }
.map { position: absolute; inset: 0; }
.map-tools { position: absolute; z-index: 2; top: 14px; left: 14px; right: 132px; display: flex; gap: 10px; align-items: stretch; }
.mobile-city-trigger { display: none; }
.form input, .form select, .form textarea {
  width: 100%; min-height: 43px; border: 1px solid var(--border); border-radius: 13px;
  background: rgba(13,13,25,.92); color: var(--text); padding: 0 12px; outline: none;
}
.city-picker {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(9,9,19,.84);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 34px rgba(0,0,0,.24);
  scroll-behavior: smooth;
}
.city-option {
  min-width: 0;
  min-height: 50px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 8px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 7px 9px;
  color: var(--text);
  background: transparent;
  text-align: left;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.city-option i { grid-row: 1 / span 2; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 10px; color: var(--cyan); background: rgba(0,212,255,.1); }
.city-option span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 950; }
.city-option small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 10px; font-weight: 800; }
.city-option:hover { transform: translateY(-1px); border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.055); }
.city-option.active {
  border-color: rgba(255,61,139,.48);
  background: linear-gradient(135deg, rgba(255,61,139,.22), rgba(139,92,246,.2));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), 0 10px 28px rgba(255,61,139,.13);
}
.city-option.active i { color: white; background: linear-gradient(135deg, var(--pink), var(--violet)); }
.chip-btn { min-height: 43px; padding: 0 12px; font-weight: 900; white-space: nowrap; }
.empty-map { position: absolute; z-index: 2; left: 18px; bottom: 18px; display: grid; gap: 4px; max-width: 280px; padding: 14px; background: rgba(8,8,16,.82); border: 1px solid var(--border); border-radius: 14px; color: var(--muted); }
.empty-map strong { color: var(--text); }
.near-status {
  position: absolute;
  z-index: 3;
  left: 18px;
  right: 18px;
  bottom: 18px;
  max-width: 560px;
  padding: 12px 13px;
  border: 1px solid rgba(0,212,255,.28);
  border-radius: 14px;
  background: rgba(8,8,16,.88);
  color: #b9f4ff;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.45;
  box-shadow: 0 18px 44px rgba(0,0,0,.34);
}
.near-status[data-tone="success"] { border-color: rgba(24,229,138,.34); color: #bfffe1; }
.near-status[data-tone="error"] { border-color: rgba(255,51,95,.42); color: #ffd5de; }

.activity-marker-root {
  width: 58px;
  height: 66px;
  pointer-events: none;
  display: grid;
  place-items: start center;
}
.map-marker {
  width: 52px; height: 52px; border: 2px solid color-mix(in srgb, var(--marker-color, var(--pink)) 76%, white);
  border-radius: 18px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--marker-color, var(--pink)) 80%, #111827), #090910);
  color: white; display: grid; place-items: center; box-shadow: 0 14px 34px rgba(0,0,0,.42), 0 0 0 5px rgba(255,255,255,.06);
  position: relative;
  overflow: visible;
  pointer-events: auto;
  padding: 0;
  cursor: pointer;
  appearance: none;
}
.map-marker::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 15px;
  height: 15px;
  transform: translateX(-50%) rotate(45deg);
  border-right: 2px solid color-mix(in srgb, var(--marker-color, var(--pink)) 76%, white);
  border-bottom: 2px solid color-mix(in srgb, var(--marker-color, var(--pink)) 76%, white);
  border-radius: 0 0 5px 0;
  background: inherit;
  z-index: -1;
}
.map-marker i, .map-marker span, .map-marker b, .map-marker img { grid-area: 1 / 1; }
.map-marker i { font-size: 24px; }
.map-marker img { width: 100%; height: 100%; object-fit: cover; border-radius: 15px; }
.map-marker span {
  position: absolute;
  right: 3px;
  top: 3px;
  min-width: 18px;
  height: 18px;
  margin: 0;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255,255,255,.92);
  border-radius: 999px;
  background: #080810;
  color: white;
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(0,0,0,.34);
}
.map-marker b { position: absolute; inset: -9px; border: 2px solid var(--green); border-radius: 22px; animation: pulse 1.8s infinite; }
.map-marker.has-photo { background: #090910; }
@keyframes pulse { from { transform: scale(.75); opacity: .8; } to { transform: scale(1.18); opacity: 0; } }
.user-location-marker-root { width: 52px; height: 52px; display: grid; place-items: center; pointer-events: none; }
.user-location-marker { width: 22px; height: 22px; border-radius: 999px; background: var(--green); border: 3px solid #fff; box-shadow: 0 0 0 8px rgba(24,229,138,.2), 0 10px 28px rgba(0,0,0,.4); position: relative; }
.user-location-marker::before { content: ''; position: absolute; inset: -13px; border-radius: 999px; border: 2px solid rgba(24,229,138,.55); animation: userPulse 1.7s infinite; }
.user-location-marker span { position: absolute; left: 50%; top: 26px; transform: translateX(-50%); border-radius: 999px; padding: 4px 8px; background: rgba(8,8,16,.9); color: #c8ffdf; font-size: 10px; font-weight: 950; white-space: nowrap; }
.draft-location-marker {
  width: 46px;
  height: 58px;
  display: grid;
  place-items: start center;
  color: white;
  filter: drop-shadow(0 16px 28px rgba(0,0,0,.45));
}
.draft-location-marker i {
  color: var(--green);
  font-size: 44px;
  text-shadow: 0 0 18px rgba(24,229,138,.45);
}
.draft-location-marker span {
  position: absolute;
  top: 43px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  border: 1px solid rgba(24,229,138,.32);
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(8,8,16,.9);
  color: #c8ffdf;
  font-size: 10px;
  font-weight: 950;
}
.mapboxgl-canvas.pin-picking { cursor: crosshair; }

.content-grid { display: grid; grid-template-columns: minmax(300px, 420px) minmax(0, 1fr); gap: 18px; margin-top: 18px; align-items: start; }
.panel { background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.028)), var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); animation: fadeUp .46s ease both; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 16px; }
.panel-head h2, .panel-head h3 { margin: 0; line-height: 1.05; }
.panel-head.flat { margin-top: 10px; }
.badge { display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(0,212,255,.24); background: rgba(0,212,255,.09); color: #9eefff; border-radius: 999px; padding: 6px 9px; font-size: 11px; font-weight: 950; }
.badge.verified { color: #a7f3d0; border-color: rgba(24,229,138,.28); background: rgba(24,229,138,.1); }
.badge.muted { color: var(--muted); border-color: var(--border); background: rgba(255,255,255,.04); }
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 850; }
.form textarea { padding-top: 12px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.place-results { display: grid; gap: 7px; max-height: 250px; overflow: auto; padding-right: 2px; }
.place-results button { text-align: left; border: 1px solid var(--border); color: var(--text); background: rgba(255,255,255,.055); border-radius: 12px; padding: 10px 11px; font-weight: 850; }
.place-results span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.place-results .typed-place-option { border-color: rgba(0, 212, 255, .35); background: rgba(0, 212, 255, .08); }
.pin-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}
.pin-tools span {
  flex: 1 1 100%;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.pin-tools span[data-tone="success"] { color: #bfffe1; }
.pin-tools span[data-tone="warn"] { color: #ffeaa0; }
.pin-tools span[data-tone="error"] { color: #ffd5de; }

.suggest-place-card {
  max-width: 620px;
}
.account-auth-card {
  width: min(460px, 100%);
  display: grid;
  gap: 15px;
  padding: 24px;
}
.account-auth-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: white;
  background: linear-gradient(135deg, var(--pink), var(--violet));
  box-shadow: 0 16px 34px rgba(255,61,139,.24);
  font-size: 26px;
}
.account-auth-copy h2 { margin: 0; font-size: 28px; }
.account-auth-copy > p:last-child { margin: 8px 0 0; color: var(--muted); line-height: 1.55; }
.password-input {
  position: relative;
  display: block;
}
.password-input input { padding-right: 52px; }
.password-input button {
  position: absolute;
  top: 50%;
  right: 5px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
}
.password-input button:hover { color: white; background: rgba(255,255,255,.07); }
.account-mode-switch {
  min-height: 42px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
}
.account-mode-switch strong { color: #ff7ab8; }
.suggest-place-card .panel-head {
  margin-bottom: 10px;
}
.suggest-pin-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,.045);
}
.suggest-pin-row span {
  flex: 1 1 220px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.45;
}
.suggest-pin-row span[data-tone="success"] { color: #bfffe1; }
.suggest-pin-row span[data-tone="warn"] { color: #ffeaa0; }
.suggest-pin-row span[data-tone="error"] { color: #ffd5de; }
.activity-photo-picker {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 11px !important;
  border: 1px dashed color-mix(in srgb, var(--pink) 42%, var(--border));
  border-radius: 15px;
  padding: 11px;
  background: rgba(255,61,139,.055);
  cursor: pointer;
}
.activity-photo-picker strong { display: block; color: var(--text); font-size: 13px; }
.activity-photo-picker small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.consent-check {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid rgba(0,212,255,.22);
  border-radius: 12px;
  color: var(--muted);
  background: rgba(0,212,255,.055);
  font-size: 12px;
  line-height: 1.5;
}
.consent-check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--pink); }
.account-access-notice {
  display: grid;
  gap: 6px;
  margin: 12px 0;
  padding: 13px 14px;
  border: 1px solid rgba(0,212,255,.24);
  border-radius: 12px;
  color: var(--muted);
  background: rgba(0,212,255,.06);
}
.account-access-notice strong { color: var(--text); }
.account-access-notice span { font-size: 12px; line-height: 1.5; }
.account-access-notice.warning { border-color: rgba(255,212,59,.3); background: rgba(255,212,59,.07); }
.account-access-notice.danger { border-color: rgba(255,83,112,.34); background: rgba(255,83,112,.08); }
.account-access-notice .mini-btn { justify-self: start; margin-top: 4px; }
.activity-photo-face {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--pink), var(--violet));
  color: white;
  box-shadow: 0 16px 34px rgba(255,61,139,.22);
  overflow: hidden;
}
.activity-photo-face i { font-size: 24px; }
.activity-photo-face img { width: 100%; height: 100%; object-fit: cover; }
.form-status {
  margin: 0;
  padding: 10px 11px;
  border: 1px solid rgba(0,212,255,.24);
  border-radius: 12px;
  background: rgba(0,212,255,.075);
  color: #b9f4ff;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.45;
}
.form-status[data-tone="success"] { border-color: rgba(24,229,138,.32); background: rgba(24,229,138,.08); color: #bfffe1; }
.form-status[data-tone="warn"] { border-color: rgba(255,212,59,.34); background: rgba(255,212,59,.08); color: #ffeaa0; }
.form-status[data-tone="error"] { border-color: rgba(255,51,95,.42); background: rgba(255,51,95,.08); color: #ffd5de; }

.activity-list { display: grid; gap: 12px; }
.activity-card {
  position: relative;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--border));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 13%, transparent), rgba(255,255,255,.032) 44%),
    rgba(255,255,255,.04);
  border-radius: 16px;
  padding: 13px;
  content-visibility: auto;
  contain-intrinsic-size: 112px;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
  animation: fadeUp .32s ease both;
}
.activity-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 4px;
  border-radius: 0 999px 999px 0;
  background: var(--accent);
  box-shadow: 0 0 24px color-mix(in srgb, var(--accent) 52%, transparent);
}
.activity-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 48%, var(--border)); background: rgba(255,255,255,.065); }
.activity-card.joined-card { border-color: color-mix(in srgb, var(--green) 28%, var(--border)); }
.activity-card.host-card::before { width: 6px; }
.card-main { position: relative; display: flex; gap: 12px; align-items: flex-start; width: 100%; color: inherit; border: 0; background: transparent; text-align: left; padding: 0; }
.activity-icon { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent); flex: 0 0 auto; }
.activity-thumb { display: block; width: 56px; height: 56px; max-width: 56px; border-radius: 15px; object-fit: cover; flex: 0 0 auto; border: 1px solid rgba(255,255,255,.14); overflow: hidden; background: #10101d; }
.activity-thumb.placeholder {
  display: grid;
  place-items: center;
  object-fit: initial;
  background:
    radial-gradient(circle at 30% 24%, rgba(255,255,255,.22), transparent 34%),
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 38%, #10101d), rgba(8,8,16,.92));
  color: white;
  font-size: 23px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
.activity-icon.large { width: 56px; height: 56px; font-size: 24px; }
.activity-copy { min-width: 0; flex: 1; }
.activity-title-row { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.activity-title-row h3 { margin: 0; font-size: 15px; line-height: 1.25; }
.activity-title-row span { color: var(--accent); font-size: 11px; font-weight: 950; white-space: nowrap; }
.activity-card p { margin: 5px 0 8px; color: var(--muted); line-height: 1.45; }
.activity-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.activity-meta span { border: 1px solid var(--border); background: rgba(255,255,255,.04); color: var(--muted); border-radius: 999px; padding: 4px 7px; font-size: 10px; font-weight: 900; }
.card-actions { position: relative; display: flex; gap: 8px; margin-top: 11px; }
.mini-btn { min-height: 34px; padding: 0 11px; font-size: 12px; font-weight: 950; }
.mini-btn.active { color: white; background: linear-gradient(135deg, var(--pink), var(--violet)); border: 0; }
.mini-btn.arrived { color: #00190d; background: var(--green); border: 0; }
.mini-btn.saved { color: #ffeaa0; border-color: rgba(255,212,59,.35); background: rgba(255,212,59,.1); }
.mini-btn.danger { color: #ffd5de; border-color: rgba(255,51,95,.34); background: rgba(255,51,95,.08); }
.person-actions { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.account-settings {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.account-settings h3, .account-settings h4 { margin: 0; }
.account-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.blocked-list { display: grid; gap: 9px; }
.blocked-person {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255,255,255,.035);
}
.blocked-person img { width: 40px; height: 40px; border-radius: 11px; object-fit: cover; }

.sheet { position: fixed; inset: 0; z-index: 40; display: none; align-items: flex-end; background: rgba(0,0,0,.58); padding: 14px; }
.sheet.show { display: flex; animation: fadeIn .16s ease both; }
.sheet-card {
  width: min(760px, 100%);
  max-height: min(84vh, 780px);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  margin: 0 auto;
  background: #10101d;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 18px 24px 18px 18px;
  box-shadow: var(--shadow);
  position: relative;
  animation: sheetUp .24s ease both;
}
.sheet-card::-webkit-scrollbar { width: 0; height: 0; display: none; }
.sheet-card::-webkit-scrollbar-button,
.sheet-card::-webkit-scrollbar-track,
.sheet-card::-webkit-scrollbar-thumb { display: none; }
.sheet-card .close {
  position: absolute;
  right: 18px;
  top: 18px;
  z-index: 30;
  background: rgba(8,8,16,.86);
  border-color: rgba(255,255,255,.2);
  color: white;
  backdrop-filter: blur(14px);
  box-shadow: 0 14px 34px rgba(0,0,0,.34);
}
.sheet-card .close:hover { background: rgba(255,61,139,.2); border-color: rgba(255,61,139,.38); }
.detail-hero, .profile-hero { display: flex; gap: 14px; align-items: center; padding-right: 42px; }
.detail-hero h2, .profile-hero h2 { margin: 0 0 4px; font-size: 24px; }
.detail-hero p, .profile-hero p { margin: 0; color: var(--muted); }
.profile-media { position: relative; margin: 4px 0 22px; }
.profile-cover-frame { position: relative; width: 100%; height: 150px; border: 1px solid var(--border); border-radius: 18px; overflow: hidden; background: linear-gradient(135deg, rgba(255,61,139,.2), rgba(0,212,255,.12)), #0d0d19; padding: 0; text-align: left; }
.profile-cover-frame > img, .profile-cover-empty { width: 100%; height: 100%; object-fit: cover; }
.profile-cover-frame > span {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(8,8,16,.78);
  color: white;
  font-size: 12px;
  font-weight: 900;
}
.profile-cover-empty { display: grid; place-items: center; }
.profile-cover-empty img { width: 72px; height: 72px; border-radius: 20px; opacity: .82; box-shadow: 0 18px 42px rgba(0,0,0,.32); }
.profile-avatar-preview { position: absolute; left: 18px; bottom: -24px; width: 86px; height: 86px; border-radius: 26px; border: 4px solid #10101d; box-shadow: 0 18px 42px rgba(0,0,0,.42); background: #10101d; padding: 0; overflow: hidden; }
.profile-avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar-preview span { position: absolute; right: 4px; bottom: 4px; width: 25px; height: 25px; display: grid; place-items: center; border-radius: 999px; background: linear-gradient(135deg, var(--pink), var(--violet)); color: white; font-size: 14px; }
.media-picker { cursor: pointer; }
.profile-media + .profile-hero { padding-left: 118px; min-height: 74px; }
.profile-media.readonly .profile-cover-frame { pointer-events: none; }
.profile-title-row { display: flex; align-items: center; gap: 9px; min-width: 0; }
.profile-title-row h2 { min-width: 0; overflow-wrap: anywhere; }
.profile-settings-btn { width: 36px; height: 36px; border-radius: 12px; flex: 0 0 auto; }
.profile-editor-panel { margin: 14px 0 6px; border: 1px solid var(--border); border-radius: 16px; padding: 14px; background: rgba(255,255,255,.045); }
.profile-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin: 16px 0; }
.profile-stat { border: 1px solid var(--border); border-radius: 14px; padding: 11px; background: rgba(255,255,255,.045); min-width: 0; color: var(--text); text-align: left; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.profile-stat:hover { border-color: rgba(0,212,255,.34); background: rgba(0,212,255,.06); transform: translateY(-1px); }
.profile-stat strong { display: block; color: var(--text); font-size: 18px; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-stat span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; font-weight: 900; }
.profile-section { display: grid; gap: 9px; margin-top: 16px; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 9px; margin: 14px 0; }
.tag-row { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0 4px; }
.profile-activity-list, .profile-connection-list { display: grid; gap: 8px; }
.profile-preview-list { position: relative; }
.profile-full-list {
  margin-top: 3px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.profile-full-list[hidden] { display: none !important; }
.profile-preview-tools { display: flex; justify-content: flex-start; margin-top: 2px; }
.profile-preview-tools .mini-btn { min-height: 32px; color: #c7f6ff; border-color: rgba(0,212,255,.28); background: rgba(0,212,255,.07); }
.profile-activity-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 62px;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--border));
  border-radius: 14px;
  padding: 8px;
  background: rgba(255,255,255,.04);
  color: var(--text);
  text-align: left;
}
.profile-activity-card img, .profile-activity-card .activity-thumb {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  object-fit: cover;
  overflow: hidden;
}
.profile-activity-card strong, .profile-activity-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-activity-card small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.person-card.compact { grid-template-columns: minmax(0, 1fr) auto; }
.student-card-picker {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 11px !important;
  border: 1px dashed rgba(0,212,255,.3);
  border-radius: 15px;
  padding: 12px;
  background: rgba(0,212,255,.055);
  cursor: pointer;
}
.student-card-picker > i { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; color: var(--cyan); background: rgba(0,212,255,.11); font-size: 23px; flex: 0 0 auto; }
.student-card-picker strong { display: block; color: var(--text); font-size: 13px; }
.student-card-picker small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.detail-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.detail-stats span { border: 1px solid var(--border); border-radius: 999px; padding: 7px 10px; color: var(--muted); font-size: 12px; font-weight: 900; }
.detail-vibe { color: var(--text); line-height: 1.65; }
.detail-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; margin: 12px 0; }
.photo-preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); gap: 9px; margin: 12px 0; }
.photo-view-btn { width: 100%; border: 0; padding: 0; border-radius: 14px; background: transparent; overflow: hidden; }
.detail-photo-grid img, .photo-preview-tile img { display: block; width: 100%; max-width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; border: 1px solid var(--border); overflow: hidden; background: #10101d; }
.detail-photo-grid img { image-rendering: auto; }
.photo-view-btn img { transition: transform .18s ease, border-color .18s ease; }
.photo-view-btn:hover img { border-color: rgba(255,61,139,.46); transform: scale(1.018); }
.photo-preview-tile { display: grid; gap: 5px; min-width: 0; }
.photo-preview-tile span { color: var(--muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-empty { display: flex; align-items: center; gap: 9px; border: 1px dashed var(--border); border-radius: 14px; padding: 12px; color: var(--muted); margin: 12px 0; }
.detail-photo-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin: 10px 0 6px; }
.people-going { margin-top: 18px; }
.people-going h3, .inbox-section h3 { margin: 0 0 10px; font-size: 15px; }
.people-list { display: grid; gap: 9px; }
.person-card, .inbox-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  background: rgba(255,255,255,.045);
  color: var(--text);
  text-align: left;
}
.person-card { grid-template-columns: minmax(0, 1fr) auto; }
.person-profile-btn {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}
.person-card img, .inbox-row img { width: 42px; height: 42px; border-radius: 13px; object-fit: cover; }
.person-card strong, .inbox-row strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-card span, .person-card small, .inbox-row span { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-row { width: 100%; border-color: var(--border); cursor: pointer; }
.chat-row.unread { border-color: rgba(255,61,139,.38); background: rgba(255,61,139,.075); }
.inbox-profile-btn, .inbox-chat-main {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}
.inbox-profile-btn { width: 42px; height: 42px; border-radius: 13px; overflow: hidden; }
.inbox-profile-btn img { display: block; width: 100%; height: 100%; }
.inbox-chat-main { min-width: 0; display: grid; gap: 2px; }
.row-dot { width: 9px; height: 9px; border-radius: 999px; background: #ff335f; box-shadow: 0 0 0 4px rgba(255,51,95,.13); }
.chat-profile {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 10px;
  margin-bottom: 10px;
  background: rgba(255,255,255,.045);
  color: var(--text);
  text-align: left;
}
.chat-profile img { width: 48px; height: 48px; border-radius: 15px; object-fit: cover; }
.chat-profile strong, .chat-profile small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-profile small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.chat-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.search-box { display: grid; gap: 6px; margin-bottom: 12px; }
.search-box input {
  min-height: 43px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: rgba(255,255,255,.055);
  color: var(--text);
  padding: 0 12px;
}
.inbox-section { display: grid; gap: 9px; }
.message-list { display: grid; align-content: start; gap: 8px; min-height: 280px; max-height: 50vh; overflow: auto; padding: 6px 0; }
.message { display: flex; justify-content: flex-start; }
.message.me { justify-content: flex-end; }
.message span { max-width: min(78%, 430px); border: 1px solid var(--border); border-radius: 16px 16px 16px 5px; padding: 10px 12px; color: var(--text); background: rgba(255,255,255,.055); line-height: 1.45; overflow-wrap: anywhere; }
.message.me span { border: 0; border-radius: 16px 16px 5px 16px; background: linear-gradient(135deg, var(--pink), var(--violet)); color: white; }
.location-card { max-width: 520px; }
.location-hero { display: flex; gap: 14px; align-items: center; padding-right: 42px; }
.location-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  color: #03130b;
  box-shadow: 0 18px 42px rgba(24,229,138,.22);
}
.location-icon i { font-size: 28px; }
.location-hero h2 { margin: 0 0 6px; font-size: 24px; }
.location-hero p:not(.eyebrow) { margin: 0; color: var(--muted); line-height: 1.55; }
.location-actions { display: grid; gap: 10px; margin: 18px 0 10px; }
.comments { margin-top: 18px; }
.comments h3 { margin: 0 0 10px; }
.comments-list { display: grid; gap: 10px; max-height: 240px; overflow: auto; }
.comment { display: flex; gap: 10px; align-items: flex-start; }
.comment-copy { flex: 1; min-width: 0; }
.comment-avatar { width: 34px; height: 34px; border: 0; border-radius: 12px; padding: 0; background: transparent; flex: 0 0 auto; overflow: hidden; }
.comment img { width: 34px; height: 34px; border-radius: 12px; flex: 0 0 auto; object-fit: cover; }
.comment strong { font-size: 12px; }
.comment p { margin: 3px 0 0; color: var(--muted); line-height: 1.45; }
.comment-report-btn {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--muted);
  background: rgba(255,255,255,.04);
  cursor: pointer;
  flex: 0 0 auto;
}
.comment-report-btn:hover { color: var(--danger); border-color: rgba(255,83,112,.4); }
.comment-form { display: flex; gap: 8px; margin-top: 12px; }
.comment-form input { flex: 1; min-width: 0; border: 1px solid var(--border); background: rgba(255,255,255,.055); color: var(--text); border-radius: 13px; padding: 0 12px; }
.comment-form button { border: 0; border-radius: 13px; padding: 0 14px; font-weight: 900; color: white; background: var(--pink); }
.divider { height: 1px; background: var(--border); margin: 18px 0; }
.alert-row, .empty-card { border: 1px solid var(--border); background: rgba(255,255,255,.045); border-radius: 15px; padding: 14px; display: grid; gap: 5px; }
.alert-row span, .empty-card span { color: var(--muted); line-height: 1.45; }
.toast { position: fixed; z-index: 60; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(12px); opacity: 0; pointer-events: none; background: rgba(15,15,28,.94); border: 1px solid var(--border); color: var(--text); border-radius: 999px; padding: 11px 15px; font-size: 13px; font-weight: 850; transition: .18s ease; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.spinning i, .loading i { animation: spin .8s linear infinite; }
.toast[data-tone="error"] { border-color: rgba(255,51,95,.45); color: #ffd5de; }
.photo-viewer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0,0,0,.78);
  animation: fadeIn .16s ease both;
}
.photo-viewer-card {
  position: relative;
  width: min(920px, 100%);
  display: grid;
  gap: 12px;
}
.photo-viewer-card > .close {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 2;
  color: white;
  background: rgba(8,8,16,.82);
  backdrop-filter: blur(12px);
}
.photo-viewer-card > img {
  display: block;
  width: 100%;
  max-height: min(74vh, 720px);
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #05050a;
  box-shadow: var(--shadow);
}
.photo-viewer-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.boot-error { position: fixed; z-index: 100; left: 16px; right: 16px; bottom: 16px; border: 1px solid rgba(255,51,95,.45); border-radius: 14px; padding: 12px 14px; color: #ffd5de; background: rgba(28,10,18,.96); font-weight: 800; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.boot-error button { border: 0; border-radius: 999px; padding: 8px 12px; color: white; background: var(--pink); font-weight: 900; }
.legal-page { width: min(760px, calc(100% - 32px)); margin: 0 auto; padding: 52px 0 80px; }
.legal-page h1 { font-size: clamp(34px, 7vw, 58px); margin-bottom: 18px; }
.legal-page p { color: var(--muted); line-height: 1.7; }
.legal-page a { color: var(--cyan); font-weight: 900; }
.skeleton { height: 76px; border-radius: 15px; background: linear-gradient(90deg, rgba(255,255,255,.05), rgba(255,255,255,.12), rgba(255,255,255,.05)); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
.skeleton.short { height: 48px; }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes sheetUp { from { opacity: .7; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pinDrop { from { opacity: 0; transform: translateY(-12px) scale(.86); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes userPulse { from { transform: scale(.6); opacity: .75; } to { transform: scale(1.55); opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes floatLogo { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

@media (max-width: 860px) {
  .main { padding: 72px 12px 22px; }
  .map-panel { height: 50vh; min-height: 330px; border-radius: 16px; }
  .content-grid { grid-template-columns: 1fr; }
  .create-panel { order: 2; }
  .feed-panel { order: 1; }
  .form-row { grid-template-columns: 1fr; }
  .profile-cover-frame { height: 128px; }
  .profile-avatar-preview { width: 74px; height: 74px; border-radius: 22px; }
  .profile-media + .profile-hero { padding-left: 98px; min-height: 68px; }
  .profile-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pin-tools {
    display: grid;
    grid-template-columns: 1fr;
  }
  .map-tools { flex-direction: column; gap: 8px; }
  .city-picker { display: flex; overflow-x: auto; scrollbar-width: none; }
  .city-picker::-webkit-scrollbar { display: none; }
  .city-option { flex: 0 0 156px; min-height: 46px; }
  .sheet { padding: 0; }
  .sheet-card { border-radius: 22px 22px 0 0; max-height: 88vh; }
}

@media (max-width: 430px) {
  .splash h1 { font-size: clamp(38px, 12.8vw, 56px); }
}

/* UI-only polish pass */
:root {
  --panel: rgba(18, 18, 29, .92);
  --panel-2: rgba(255, 255, 255, .055);
  --shadow: 0 18px 48px rgba(0,0,0,.34);
  --radius: 14px;
}

.splash {
  gap: 18px;
  padding-inline: 22px;
  background:
    radial-gradient(circle at 50% 12%, rgba(255,61,139,.22), transparent 28%),
    linear-gradient(180deg, #080811 0%, #06060b 100%);
}
.splash-media {
  width: 92px;
  height: 92px;
  border-radius: 24px;
  overflow: visible;
  padding: 2px;
  background: #0d0d18;
  box-shadow: 0 18px 42px rgba(255,61,139,.25), 0 0 0 1px rgba(255,255,255,.12);
}
.splash-media img { display: block; border-radius: 22px; }
.splash-copy { display: grid; gap: 8px; }
.splash h1 {
  width: 100%;
  max-width: calc(100vw - 44px);
  white-space: nowrap;
  overflow: visible;
  padding: 0 2px 5px;
  font-size: clamp(42px, 9vw, 64px);
  line-height: 1.08;
  filter: drop-shadow(0 14px 28px rgba(255,61,139,.14));
}
.splash-copy p:not(.eyebrow) {
  max-width: 320px;
  margin: 0 auto;
  color: #d8d2e5;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.45;
}
.auth-actions {
  width: min(360px, 100%);
  gap: 10px;
}
.auth-actions .btn {
  min-height: 54px;
  border-radius: 16px;
  font-size: 14px;
  box-shadow: none;
}
.auth-actions .btn.primary {
  box-shadow: 0 14px 34px rgba(255,61,139,.22);
}
.auth-actions .btn.ghost {
  border-color: rgba(255,255,255,.13);
  background: rgba(255,255,255,.035);
}
.fineprint { margin: 0; font-size: 12px; }

.btn, .chip-btn, .mini-btn, .icon-btn, .avatar-btn { border-radius: 12px; }
.panel {
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.025)), rgba(18,18,29,.92);
}
.panel-head h2 { font-size: clamp(22px, 2.6vw, 30px); }
.form { gap: 14px; }
.form-section {
  display: grid;
  gap: 11px;
  padding: 13px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 16px;
  background: rgba(255,255,255,.027);
}
.section-label {
  margin: 0;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.form input, .form select, .form textarea, .search-box input {
  min-height: 46px;
  border-radius: 12px;
  background: rgba(8,8,16,.88);
}
.form input:focus, .form select:focus, .form textarea:focus, .search-box input:focus {
  border-color: rgba(0,212,255,.42);
  box-shadow: 0 0 0 3px rgba(0,212,255,.08);
}

.map-panel {
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(0,0,0,.32);
}
.city-picker, .empty-map, .near-status {
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0,0,0,.24);
}
#near-btn {
  position: absolute;
  z-index: 3;
  top: 14px;
  right: 14px;
  min-height: 50px;
  border-radius: 16px;
  background: rgba(8,8,16,.82);
  backdrop-filter: blur(16px);
}

.activity-list { gap: 12px; }
.activity-card {
  border-radius: 14px;
  padding: 12px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 9%, transparent), transparent 34%),
    rgba(255,255,255,.04);
  box-shadow: none;
}
.activity-card::before {
  top: 14px;
  bottom: 14px;
  width: 3px;
  box-shadow: none;
}
.activity-card:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,.058);
}
.card-main { gap: 11px; align-items: center; }
.activity-thumb {
  width: 54px;
  height: 54px;
  max-width: 54px;
  border-radius: 14px;
}
.activity-title-row h3 {
  font-size: 16px;
  line-height: 1.22;
}
.activity-title-row span {
  padding-top: 1px;
  font-size: 11px;
}
.activity-card p {
  margin: 4px 0 7px;
  font-size: 14px;
}
.activity-meta span {
  padding: 4px 8px;
  font-size: 10px;
  background: rgba(255,255,255,.035);
}
.card-actions {
  flex-wrap: wrap;
  gap: 8px;
}
.mini-btn {
  min-height: 38px;
  padding: 0 13px;
  border-radius: 12px;
}

.sheet-card {
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.045), transparent 90px),
    #10101d;
}
.detail-hero, .profile-hero, .location-hero { align-items: flex-start; }
.detail-hero h2, .profile-hero h2, .location-hero h2 {
  line-height: 1.12;
}
.detail-stats {
  margin: 14px 0;
}
.detail-stats span {
  background: rgba(255,255,255,.035);
}
.detail-actions {
  position: sticky;
  bottom: -18px;
  z-index: 8;
  margin: 16px -10px -10px;
  padding: 12px 10px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(16,16,29,.75), rgba(16,16,29,.98) 42%);
  backdrop-filter: blur(18px);
}
.detail-photo-grid {
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
}
.people-going, .comments {
  padding-top: 2px;
}
.person-card, .inbox-row, .chat-profile {
  border-radius: 14px;
  background: rgba(255,255,255,.035);
}
.message-list {
  gap: 9px;
  padding-bottom: 8px;
}
#message-form {
  position: sticky;
  bottom: -18px;
  z-index: 8;
  margin-inline: -10px;
  padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(16,16,29,.72), rgba(16,16,29,.98) 44%);
  backdrop-filter: blur(18px);
}

.post-fab {
  display: none;
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 18;
  min-height: 50px;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  color: white;
  background: linear-gradient(135deg, var(--pink), var(--violet));
  font-weight: 950;
  box-shadow: 0 18px 38px rgba(255,61,139,.28);
}

.map-category-rail {
  position: absolute;
  z-index: 3;
  top: 86px;
  left: 18px;
  right: 18px;
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 2px;
  scrollbar-width: none;
}
.map-category-rail::-webkit-scrollbar { display: none; }
.map-category-rail button {
  flex: 0 0 auto;
  min-height: 34px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  padding: 0 13px;
  color: #d9d3e8;
  background: rgba(8,8,16,.82);
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(14px);
}
.map-category-rail button.active {
  border-color: rgba(255,61,139,.68);
  color: white;
  background: linear-gradient(135deg, rgba(255,61,139,.9), rgba(139,92,246,.84));
  box-shadow: 0 10px 24px rgba(255,61,139,.22);
}
.map-live-tray, .explore-view { display: none; }

@media (max-width: 860px) {
  .main {
    padding: 72px 10px calc(92px + env(safe-area-inset-bottom));
  }
  .topbar {
    height: 64px;
    padding-inline: 12px;
  }
  .brand {
    gap: 8px;
    font-size: 18px;
  }
  .brand img {
    width: 38px;
    height: 38px;
    border-radius: 11px;
  }
  .top-actions { gap: 6px; }
  #install-btn, #inbox-btn, #profile-btn { display: none; }
  .icon-btn, .avatar-btn {
    width: 40px;
    height: 40px;
  }
  .map-panel {
    height: calc(100svh - 148px);
    min-height: 520px;
    max-height: 820px;
    border-radius: 18px;
  }
  .map-tools {
    top: 10px;
    left: 10px;
    right: 10px;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    pointer-events: none;
  }
  .city-picker {
    display: flex;
    gap: 6px;
    width: 100%;
    min-width: 0;
    padding: 5px;
    border-radius: 999px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-padding-inline: 12px;
    scrollbar-width: none;
    pointer-events: auto;
  }
  .city-picker::-webkit-scrollbar { display: none; }
  .city-option {
    flex: 0 0 auto;
    grid-template-columns: auto;
    min-height: 42px;
    min-width: clamp(92px, 29vw, 132px);
    border-radius: 999px;
    padding: 0 13px;
    text-align: center;
  }
  .city-option i, .city-option small { display: none; }
  .city-option span {
    font-size: 13px;
  }
  #near-btn {
    flex: 0 0 auto;
    align-self: flex-end;
    min-height: 46px;
    border-radius: 999px;
    padding: 0 14px;
    pointer-events: auto;
  }
  .map-category-rail {
    top: 111px;
    left: 10px;
    right: 10px;
    gap: 6px;
    padding: 2px 0 5px;
  }
  .map-category-rail button {
    min-height: 36px;
    padding-inline: 14px;
    font-size: 12px;
  }
  .map-live-tray {
    position: absolute;
    z-index: 4;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    gap: 10px;
    min-height: 176px;
    padding: 14px 14px 12px;
    border-top: 1px solid rgba(255,255,255,.12);
    border-radius: 20px 20px 0 0;
    background: rgba(11,11,23,.94);
    box-shadow: 0 -18px 42px rgba(0,0,0,.34);
    backdrop-filter: blur(20px);
  }
  .map-tray-handle {
    width: 100%;
    height: 18px;
    display: grid;
    place-items: center;
    border: 0;
    padding: 0;
    color: inherit;
    background: transparent;
    touch-action: none;
  }
  .map-tray-handle span {
    width: 44px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255,255,255,.25);
    transition: width .18s ease, background .18s ease;
  }
  .map-tray-handle:hover span {
    width: 54px;
    background: rgba(255,255,255,.4);
  }
  .map-tray-head {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 20px;
    color: #8e879f;
    text-transform: uppercase;
    font-size: 10px;
    font-weight: 950;
    letter-spacing: .1em;
  }
  .map-tray-head span:last-child { margin-left: auto; letter-spacing: 0; }
  .live-pulse {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: var(--green);
    box-shadow: 0 0 0 5px rgba(24,229,138,.1), 0 0 18px rgba(24,229,138,.7);
  }
  .map-tray-list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }
  .map-tray-list::-webkit-scrollbar { display: none; }
  .map-tray-card {
    flex: 0 0 154px;
    display: grid;
    grid-template-rows: 78px minmax(0, 1fr);
    min-height: 138px;
    overflow: hidden;
    scroll-snap-align: start;
    border: 1px solid color-mix(in srgb, var(--accent) 28%, rgba(255,255,255,.12));
    border-radius: 14px;
    padding: 0;
    color: var(--text);
    background: #17172a;
    text-align: left;
  }
  .map-tray-card > img, .map-tray-placeholder {
    width: 100%;
    height: 78px;
    object-fit: cover;
    background: color-mix(in srgb, var(--accent) 18%, #10101c);
  }
  .map-tray-placeholder { display: grid; place-items: center; color: var(--accent); font-size: 28px; }
  .map-tray-copy { display: grid; gap: 3px; padding: 8px 9px 9px; min-width: 0; }
  .map-tray-copy strong, .map-tray-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .map-tray-copy strong { font-size: 12px; }
  .map-tray-copy small { color: var(--muted); font-size: 9px; }
  .map-tray-copy b { color: var(--pink); font-size: 10px; }
  .map-tray-empty {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    min-height: 116px;
    padding: 12px;
    border: 1px dashed rgba(255,255,255,.15);
    border-radius: 15px;
    background: rgba(255,255,255,.025);
  }
  .map-tray-empty strong, .map-tray-empty small { display: block; }
  .map-tray-empty small { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.4; }
  .map-tray-skeleton {
    height: 112px;
    border-radius: 14px;
    background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.11), rgba(255,255,255,.04));
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
  }
  .map-panel .empty-map, .map-panel .near-status { bottom: 190px; }
  .map-panel .mapboxgl-ctrl-bottom-right { bottom: 180px; }
  .content-grid {
    gap: 12px;
    margin-top: 12px;
  }
  #main[data-mobile-view="map"] .content-grid { display: none; }
  #main[data-mobile-view="map"] .explore-view { display: none; }
  #main[data-mobile-view="explore"] .map-panel,
  #main[data-mobile-view="explore"] .content-grid { display: none; }
  #main[data-mobile-view="explore"] .explore-view {
    display: block;
    min-height: calc(100svh - 150px);
  }
  .explore-view {
    padding: 8px 2px 18px;
    animation: fadeUp .22s ease both;
  }
  .explore-head { display: grid; gap: 12px; margin: 4px 2px 22px; }
  .explore-head .eyebrow { margin: 0; }
  .explore-head h1 {
    margin: 0;
    font-family: 'Syne', 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(35px, 10vw, 52px);
    line-height: 1;
  }
  .explore-head h1 span {
    background: linear-gradient(135deg, var(--pink), var(--violet), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
  .explore-search {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-height: 52px;
    padding: 0 14px;
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 15px;
    color: #777086;
    background: #17172a;
  }
  .explore-search i { font-size: 20px; }
  .explore-search input {
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
    font-size: 16px;
  }
  .explore-section { display: grid; gap: 12px; margin-bottom: 24px; }
  .explore-section h2 {
    margin: 0;
    color: #777080;
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 950;
    letter-spacing: .1em;
  }
  .explore-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .explore-section-head .chip-btn { min-height: 32px; }
  .explore-vibe-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .explore-vibe {
    position: relative;
    min-height: 94px;
    overflow: hidden;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: end;
    border: 1px solid color-mix(in srgb, var(--vibe) 42%, rgba(255,255,255,.1));
    border-radius: 17px;
    padding: 14px;
    color: white;
    background: linear-gradient(135deg, color-mix(in srgb, var(--vibe) 88%, #ff3d8b), color-mix(in srgb, var(--vibe) 82%, #315bff));
    text-align: left;
    box-shadow: 0 12px 30px color-mix(in srgb, var(--vibe) 14%, transparent);
  }
  .explore-vibe::after {
    content: '';
    position: absolute;
    right: -24px;
    top: -30px;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: rgba(255,255,255,.12);
  }
  .explore-vibe.active { box-shadow: 0 0 0 3px rgba(255,255,255,.78), 0 16px 34px color-mix(in srgb, var(--vibe) 24%, transparent); }
  .explore-vibe i { font-size: 24px; }
  .explore-vibe strong, .explore-vibe small { display: block; }
  .explore-vibe strong { font-size: 14px; }
  .explore-vibe small { margin-top: 2px; color: rgba(255,255,255,.82); font-size: 10px; }
  .explore-results { display: grid; gap: 10px; }
  .explore-activity {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    gap: 11px;
    align-items: center;
    min-height: 80px;
    border: 1px solid color-mix(in srgb, var(--accent) 22%, rgba(255,255,255,.1));
    border-radius: 15px;
    padding: 10px;
    color: var(--text);
    background: #17172a;
    text-align: left;
  }
  .explore-activity img, .explore-activity-placeholder {
    width: 58px;
    height: 58px;
    border-radius: 13px;
    object-fit: cover;
  }
  .explore-activity-placeholder { display: grid; place-items: center; color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, #0d0d18); font-size: 24px; }
  .explore-activity-copy { min-width: 0; }
  .explore-activity-copy strong, .explore-activity-copy small, .explore-activity-copy em { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .explore-activity-copy strong { font-size: 14px; }
  .explore-activity-copy small { margin-top: 3px; color: var(--muted); font-size: 11px; }
  .explore-activity-copy em { margin-top: 4px; color: #777080; font-size: 10px; font-style: normal; }
  .explore-activity > b { align-self: start; border-radius: 999px; padding: 5px 8px; color: var(--pink); background: rgba(255,61,139,.1); font-size: 10px; white-space: nowrap; }
  .explore-empty { padding-block: 28px; text-align: center; }
  .explore-empty i { color: var(--violet); font-size: 32px; }
  .panel {
    border-radius: 18px;
    padding: 16px;
  }
  .create-panel {
    position: fixed;
    z-index: 45;
    inset: 0;
    display: block;
    width: 100%;
    height: 100dvh;
    padding: max(62px, calc(18px + env(safe-area-inset-top))) 16px calc(96px + env(safe-area-inset-bottom));
    border: 0;
    border-radius: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #0b0b14;
    transform: translateY(105%);
    visibility: hidden;
    transition: transform .24s ease, visibility 0s linear .24s;
  }
  .create-panel.mobile-open {
    transform: translateY(0);
    visibility: visible;
    transition-delay: 0s;
  }
  .create-close {
    display: grid;
    position: fixed;
    z-index: 2;
    top: max(12px, env(safe-area-inset-top));
    right: 14px;
  }
  body.create-open { overflow: hidden; }
  .feed-panel .panel-head {
    margin-bottom: 12px;
  }
  .mobile-nav {
    position: fixed;
    z-index: 50;
    left: 10px;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    min-height: 64px;
    padding: 6px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 18px;
    background: rgba(12,12,22,.95);
    box-shadow: 0 18px 48px rgba(0,0,0,.48);
    backdrop-filter: blur(20px);
  }
  .mobile-nav[hidden] { display: none; }
  .mobile-nav button {
    position: relative;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 3px;
    min-width: 0;
    min-height: 50px;
    border: 0;
    border-radius: 12px;
    color: #777080;
    background: transparent;
    transition: color .18s ease, background .18s ease, transform .18s ease;
  }
  .mobile-nav button i { font-size: 21px; }
  .mobile-nav button span { font-size: 11px; font-weight: 850; }
  .mobile-nav button.active:not(.mobile-post) {
    color: #ff63ad;
    background: linear-gradient(180deg, rgba(255,61,139,.13), rgba(139,92,246,.08));
  }
  .mobile-nav button.active:not(.mobile-post)::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 3px;
    width: 18px;
    height: 3px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: linear-gradient(90deg, var(--pink), var(--violet));
    box-shadow: 0 0 13px rgba(255,61,139,.64);
    animation: navSelect .2s ease both;
  }
  .mobile-nav button.active:not(.mobile-post) i {
    color: #ff57a5;
    filter: drop-shadow(0 0 10px rgba(255,61,139,.46));
    transform: translateY(-1px);
  }
  .mobile-nav .mobile-post {
    color: white;
    background: linear-gradient(135deg, var(--pink), var(--violet));
    box-shadow: 0 12px 26px rgba(255,61,139,.22);
  }
  .mobile-nav .mobile-post.active {
    transform: translateY(-4px);
    box-shadow: 0 16px 34px rgba(255,61,139,.42);
  }
  .nav-dot {
    position: absolute;
    top: 7px;
    right: calc(50% - 16px);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff335f;
    box-shadow: 0 0 0 3px rgba(255,51,95,.17);
  }
  .activity-card {
    padding: 12px;
    contain-intrinsic-size: 118px;
  }
  .activity-title-row {
    align-items: baseline;
  }
  .activity-title-row h3 {
    font-size: 15px;
  }
  .activity-card p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .card-actions .mini-btn {
    min-height: 40px;
  }
  .create-panel .btn[type="submit"] {
    position: static;
    width: 100%;
    margin-top: 4px;
    box-shadow: 0 16px 34px rgba(255,61,139,.28);
  }
  .sheet {
    z-index: 45;
    padding: 0 0 calc(82px + env(safe-area-inset-bottom));
    align-items: flex-end;
  }
  .sheet-card {
    width: 100%;
    max-height: calc(100svh - 86px - env(safe-area-inset-bottom));
    border-radius: 20px 20px 0 0;
    padding: 18px 16px 18px;
  }
  .sheet-card .close {
    right: 14px;
    top: 14px;
  }
  .detail-hero, .profile-hero, .location-hero {
    padding-right: 48px;
  }
  .detail-hero h2, .profile-hero h2, .location-hero h2 {
    font-size: 23px;
  }
  .detail-photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .comment-form input, .comment-form button {
    min-height: 44px;
  }
  .form label, .activity-meta span, .activity-title-row span, .badge, .helper, .muted {
    font-size: max(13px, 0.8125rem);
  }
  .form input, .form select, .form textarea, .search-box input {
    font-size: 16px;
  }
  .activity-card p, .inbox-row span, .person-card span, .person-card small {
    font-size: 14px;
  }
}

@keyframes navSelect {
  from { opacity: 0; transform: translateX(-50%) scaleX(.3); }
  to { opacity: 1; transform: translateX(-50%) scaleX(1); }
}

@media (max-width: 430px) {
  .splash {
    gap: 16px;
    padding-inline: 18px;
  }
  .splash-media {
    width: 84px;
    height: 84px;
    border-radius: 22px;
  }
  .splash h1 {
    font-size: clamp(38px, 12.2vw, 50px);
  }
  .auth-actions {
    width: 100%;
    max-width: 330px;
  }
  .city-option {
    min-width: 104px;
    padding-inline: 12px;
  }
  .activity-thumb {
    width: 50px;
    height: 50px;
    max-width: 50px;
  }
  .mini-btn {
    padding-inline: 12px;
  }
  .suggest-pin-row {
    display: grid;
    grid-template-columns: 1fr;
  }
}

/* Mobile map and profile refinement */
@media (max-width: 860px) {
  .map-tools {
    top: 12px;
    left: auto;
    right: 12px;
    z-index: 6;
    width: auto;
    display: block;
    pointer-events: none;
  }
  .mobile-city-trigger {
    min-width: 126px;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 14px;
    padding: 0 11px;
    color: white;
    background: rgba(14,14,24,.52);
    box-shadow: 0 10px 26px rgba(0,0,0,.18);
    backdrop-filter: blur(16px);
    pointer-events: auto;
    font-size: 13px;
    font-weight: 900;
  }
  .mobile-city-trigger i:first-child { color: var(--pink); }
  .mobile-city-trigger i:last-child { color: var(--muted); font-size: 14px; }
  .city-picker {
    position: absolute;
    top: 49px;
    right: 0;
    width: min(292px, calc(100vw - 34px));
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    padding: 8px;
    border-radius: 16px;
    overflow: visible;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-7px) scale(.98);
    transform-origin: top right;
    background: rgba(12,12,22,.9);
    box-shadow: 0 20px 48px rgba(0,0,0,.42);
    backdrop-filter: blur(22px);
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
  }
  .map-tools:has(.city-picker.mobile-open) + .map-category-rail {
    opacity: .35;
    pointer-events: none;
  }
  .city-picker.mobile-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    transition-delay: 0s;
  }
  .city-option {
    min-width: 0;
    min-height: 60px;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    padding: 8px;
    border-radius: 12px;
    text-align: left;
  }
  .city-option i { display: grid; }
  .city-option small { display: block; font-size: 9px; }
  .city-option span { font-size: 12px; }
  #near-btn {
    position: absolute;
    top: 98px;
    right: 0;
    width: 46px;
    min-height: 46px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 14px;
    padding: 0;
    background: rgba(14,14,24,.58);
    box-shadow: 0 12px 28px rgba(0,0,0,.24);
    backdrop-filter: blur(16px);
    pointer-events: auto;
    font-size: 20px;
  }
  #near-btn span { display: none; }
  .map-category-rail {
    top: 64px;
    left: 12px;
    right: 64px;
    z-index: 3;
    gap: 6px;
    padding: 2px 1px 5px;
    scroll-padding-inline: 2px;
  }
  .map-category-rail button {
    --category: #ff3d8b;
    min-height: 32px;
    border-color: color-mix(in srgb, var(--category) 58%, rgba(255,255,255,.14));
    padding-inline: 11px;
    color: color-mix(in srgb, var(--category) 70%, white);
    background: color-mix(in srgb, var(--category) 9%, rgba(7,7,14,.36));
    box-shadow: none;
    backdrop-filter: blur(10px);
    font-size: 10px;
  }
  .map-category-rail button[data-map-category="food"] { --category: #ff8a3d; }
  .map-category-rail button[data-map-category="music"] { --category: #b05cff; }
  .map-category-rail button[data-map-category="sports"] { --category: #19e58b; }
  .map-category-rail button[data-map-category="gaming"] { --category: #4d91ff; }
  .map-category-rail button[data-map-category="chill"] { --category: #ffd43b; }
  .map-category-rail button[data-map-category="study"] { --category: #00d4ff; }
  .map-category-rail button[data-map-category="hang"] { --category: #ff4f9f; }
  .map-category-rail button.active {
    border-color: color-mix(in srgb, var(--category) 86%, white);
    color: white;
    background: color-mix(in srgb, var(--category) 27%, rgba(8,8,16,.52));
    box-shadow: 0 8px 22px color-mix(in srgb, var(--category) 19%, transparent);
  }
  .map-live-tray {
    --tray-height: 196px;
    height: var(--tray-height);
    min-height: 0;
    grid-template-rows: 18px auto minmax(0, 1fr);
    gap: 7px;
    padding: 7px 13px 12px;
    overflow: hidden;
    border-top-color: rgba(255,255,255,.11);
    background: rgba(12,12,24,.78);
    box-shadow: 0 -14px 38px rgba(0,0,0,.28);
    backdrop-filter: blur(18px) saturate(1.2);
    transition: height .26s cubic-bezier(.22,.8,.25,1), background .24s ease;
  }
  .map-live-tray.dragging { transition: none; }
  .map-live-tray.collapsed {
    --tray-height: 38px;
    padding-bottom: 0;
    background: rgba(12,12,24,.68);
  }
  .map-live-tray.expanded {
    --tray-height: min(520px, 62%);
    background: rgba(10,10,22,.94);
    box-shadow: 0 -22px 54px rgba(0,0,0,.42);
  }
  .map-live-tray.collapsed .map-tray-head,
  .map-live-tray.collapsed .map-tray-list,
  .map-live-tray.collapsed .map-tray-empty,
  .map-live-tray.collapsed .map-tray-skeleton {
    opacity: 0;
    pointer-events: none;
  }
  .map-live-tray.collapsed .map-tray-handle span {
    width: 58px;
    background: rgba(255,255,255,.38);
  }
  .map-tray-card {
    flex-basis: 176px;
    grid-template-rows: 78px minmax(0, 1fr);
    min-height: 136px;
    border-radius: 13px;
    background: rgba(25,25,43,.78);
  }
  .map-tray-card > img, .map-tray-placeholder { height: 78px; }
  .map-tray-copy strong {
    display: -webkit-box;
    min-height: 32px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    white-space: normal;
    font-size: 13px;
    line-height: 1.25;
  }
  .map-tray-copy small { font-size: 10px; }
  .map-live-tray.expanded .map-tray-list {
    display: grid;
    grid-auto-rows: 108px;
    align-content: start;
    gap: 10px;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 1px 2px 8px;
    scroll-snap-type: y proximity;
    overscroll-behavior: contain;
  }
  .map-live-tray.expanded .map-tray-card {
    width: 100%;
    min-height: 98px;
    display: grid;
    grid-template-columns: 98px minmax(0, 1fr);
    grid-template-rows: 1fr;
    scroll-snap-align: start;
  }
  .map-live-tray.expanded .map-tray-card > img,
  .map-live-tray.expanded .map-tray-placeholder {
    width: 98px;
    height: 100%;
    min-height: 96px;
  }
  .map-live-tray.expanded .map-tray-copy {
    align-content: center;
    gap: 5px;
    padding: 12px;
  }
  .map-live-tray.expanded .map-tray-copy strong {
    min-height: 0;
    font-size: 15px;
  }
  .map-live-tray.expanded .map-tray-copy small {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    white-space: normal;
    font-size: 11px;
    line-height: 1.35;
  }
  .map-live-tray.expanded .map-tray-copy b { font-size: 11px; }
  .map-tray-empty {
    min-height: 108px;
    background: rgba(255,255,255,.028);
  }
  .map-panel .empty-map,
  .map-panel .near-status {
    left: 13px;
    right: 13px;
    bottom: 198px;
    max-width: none;
    padding: 10px 12px;
    border-radius: 13px;
    background: rgba(8,8,16,.72);
    backdrop-filter: blur(14px);
  }
  .map-panel .empty-map { display: none !important; }
  .map-panel.tray-collapsed .empty-map,
  .map-panel.tray-collapsed .near-status { bottom: 49px; }
  .map-panel.tray-expanded .empty-map,
  .map-panel.tray-expanded .near-status { bottom: min(535px, 64%); }
  .map-panel .mapboxgl-ctrl-bottom-right { bottom: 187px; }
  .map-panel.tray-collapsed .mapboxgl-ctrl-bottom-right { bottom: 37px; }
  .map-panel.tray-expanded .mapboxgl-ctrl-bottom-right { bottom: min(525px, 63%); }
  body.create-open #main .content-grid {
    display: block !important;
    margin: 0;
  }
  body.create-open #main .feed-panel { display: none !important; }
  body.create-open #main .create-panel.mobile-open { display: block !important; }
  .account-auth-card {
    max-height: calc(100svh - 28px);
    padding: 22px 18px calc(20px + env(safe-area-inset-bottom));
    border-radius: 24px 24px 0 0;
  }
  .account-auth-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    font-size: 23px;
  }
  .account-auth-copy h2 { font-size: 25px; }
  #profile-sheet .sheet-card {
    padding: 10px 14px calc(24px + env(safe-area-inset-bottom));
    background:
      linear-gradient(180deg, rgba(255,61,139,.055), transparent 230px),
      #0f0f1c;
  }
  #profile-sheet .sheet-card .close {
    top: 18px;
    right: 18px;
    background: rgba(8,8,16,.7);
  }
  .profile-media {
    margin: 0 0 38px;
  }
  .profile-cover-frame {
    height: 162px;
    border-radius: 19px;
    border-color: rgba(255,255,255,.15);
    box-shadow: 0 18px 40px rgba(0,0,0,.25);
  }
  .profile-cover-frame > span {
    right: 11px;
    bottom: 11px;
    background: rgba(8,8,16,.7);
    backdrop-filter: blur(12px);
  }
  .profile-avatar-preview {
    left: 18px;
    bottom: -35px;
    width: 88px;
    height: 88px;
    border-radius: 25px;
    border-width: 4px;
    box-shadow: 0 16px 34px rgba(0,0,0,.4), 0 0 0 1px rgba(255,61,139,.28);
  }
  .profile-media + .profile-hero {
    min-height: 70px;
    padding: 0 48px 0 118px;
  }
  .profile-title-row {
    align-items: center;
  }
  .profile-title-row h2 {
    font-size: 23px;
    line-height: 1.08;
  }
  .profile-settings-btn {
    width: 40px;
    height: 40px;
    border-color: rgba(255,255,255,.14);
    background: rgba(255,255,255,.055);
  }
  .profile-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 20px 0 8px;
  }
  .profile-stat {
    min-height: 84px;
    display: grid;
    align-content: center;
    border-radius: 16px;
    padding: 14px;
    background: linear-gradient(135deg, rgba(255,61,139,.11), rgba(255,255,255,.025));
  }
  .profile-stat:nth-child(2) { background: linear-gradient(135deg, rgba(24,229,138,.11), rgba(255,255,255,.025)); }
  .profile-stat:nth-child(3) { background: linear-gradient(135deg, rgba(0,212,255,.11), rgba(255,255,255,.025)); }
  .profile-stat:nth-child(4) { background: linear-gradient(135deg, rgba(255,212,59,.11), rgba(255,255,255,.025)); }
  .profile-stat strong { font-size: 22px; }
  .profile-section {
    gap: 10px;
    margin-top: 22px;
  }
  .profile-section .panel-head {
    margin-bottom: 2px;
  }
  .profile-section .empty-card.compact {
    border-style: dashed;
    background: rgba(255,255,255,.025);
  }
}

/* Full-screen social map composition on mobile */
@media (max-width: 860px) {
  #main[data-mobile-view="map"] {
    position: relative;
    width: 100%;
    height: 100svh;
    min-height: 100svh;
    padding: 0;
    overflow: hidden;
    background: #111;
  }
  #main[data-mobile-view="map"] .topbar {
    height: calc(68px + env(safe-area-inset-top));
    padding: max(12px, env(safe-area-inset-top)) 12px 8px;
    border-bottom: 0;
    background: linear-gradient(180deg, rgba(6,6,13,.62), rgba(6,6,13,0));
    box-shadow: none;
    backdrop-filter: none;
    pointer-events: none;
  }
  #main[data-mobile-view="map"] .topbar > * {
    pointer-events: auto;
  }
  #main[data-mobile-view="map"] .brand {
    gap: 8px;
    max-width: 188px;
    font-size: 20px;
    filter: drop-shadow(0 8px 18px rgba(0,0,0,.42));
  }
  #main[data-mobile-view="map"] .brand img {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    box-shadow: 0 0 0 1px rgba(255,255,255,.2), 0 10px 28px rgba(255,61,139,.25);
  }
  #main[data-mobile-view="map"] .brand span {
    display: block;
    max-width: 140px;
    overflow: hidden;
    white-space: nowrap;
    background: linear-gradient(90deg, #ff3d8b, #9b5cff 58%, #00d4ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
  #main[data-mobile-view="map"] .top-actions {
    margin-left: auto;
  }
  #main[data-mobile-view="map"] #notify-btn {
    display: grid;
    border-color: rgba(255,255,255,.14);
    color: #ffe659;
    background: rgba(10,10,20,.38);
    box-shadow: 0 10px 28px rgba(0,0,0,.22);
    backdrop-filter: blur(12px);
  }
  #main[data-mobile-view="map"] .map-panel {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100svh;
    min-height: 0;
    max-height: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    animation: none;
  }
  #main[data-mobile-view="map"] .map-tools {
    top: max(13px, env(safe-area-inset-top));
    right: 58px;
    z-index: 22;
  }
  #main[data-mobile-view="map"] .mobile-city-trigger {
    width: 112px;
    min-width: 112px;
    min-height: 40px;
    border-color: rgba(255,255,255,.16);
    border-radius: 14px;
    padding-inline: 10px;
    background: rgba(15,15,24,.3);
    box-shadow: 0 10px 26px rgba(0,0,0,.18);
    backdrop-filter: blur(10px);
  }
  #main[data-mobile-view="map"] .city-picker {
    top: 47px;
    background: rgba(12,12,22,.88);
  }
  #main[data-mobile-view="map"] .map-category-rail {
    top: calc(70px + env(safe-area-inset-top));
    left: 0;
    right: 0;
    z-index: 8;
    display: flex;
    width: 100%;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 12px 9px;
    box-sizing: border-box;
    scroll-padding-inline: 12px;
    scroll-snap-type: x proximity;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    mask-image: linear-gradient(90deg, transparent 0, black 10px, black calc(100% - 10px), transparent 100%);
  }
  #main[data-mobile-view="map"] .map-category-rail::after {
    content: "";
    flex: 0 0 2px;
  }
  #main[data-mobile-view="map"] .map-category-rail button {
    flex: 0 0 auto;
    width: auto;
    min-width: 76px;
    min-height: 34px;
    border-width: 1px;
    border-color: color-mix(in srgb, var(--category) 62%, rgba(255,255,255,.12));
    padding-inline: 15px;
    color: color-mix(in srgb, var(--category) 78%, white);
    background: color-mix(in srgb, var(--category) 4%, rgba(8,8,16,.12));
    box-shadow: none;
    backdrop-filter: blur(5px);
    scroll-snap-align: start;
    font-size: 11px;
    white-space: nowrap;
    text-shadow: 0 2px 8px rgba(0,0,0,.72);
  }
  #main[data-mobile-view="map"] .map-category-rail button.active {
    border-color: color-mix(in srgb, var(--category) 92%, white);
    color: white;
    background: color-mix(in srgb, var(--category) 14%, rgba(8,8,16,.16));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--category) 16%, transparent),
      0 8px 22px rgba(0,0,0,.16);
  }
  #main[data-mobile-view="map"] #near-btn {
    position: absolute;
    top: calc(116px + env(safe-area-inset-top));
    right: 12px;
    z-index: 9;
    width: 46px;
    min-height: 46px;
    display: grid;
    place-items: center;
    padding: 0;
    border-radius: 14px;
    border-color: rgba(255,255,255,.14);
    background: rgba(10,10,22,.34);
    box-shadow: 0 10px 28px rgba(0,0,0,.2);
    backdrop-filter: blur(9px);
  }
  #main[data-mobile-view="map"] #near-btn span { display: none; }
  #main[data-mobile-view="map"] .map-live-tray {
    left: 8px;
    right: 8px;
    bottom: calc(82px + env(safe-area-inset-bottom));
    --tray-height: 196px;
    height: var(--tray-height);
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 22px;
    background: rgba(11,11,24,.8);
    box-shadow: 0 -10px 34px rgba(0,0,0,.25);
    backdrop-filter: blur(18px) saturate(1.16);
  }
  #main[data-mobile-view="map"] .map-live-tray.collapsed {
    --tray-height: 38px;
    background: rgba(11,11,24,.6);
  }
  #main[data-mobile-view="map"] .map-live-tray.expanded {
    --tray-height: min(520px, 62%);
    background: rgba(10,10,22,.95);
  }
  #main[data-mobile-view="map"] .map-tray-card {
    background: rgba(24,24,42,.72);
  }
  #main[data-mobile-view="map"] .near-status {
    bottom: calc(274px + env(safe-area-inset-bottom));
    background: rgba(8,8,16,.6);
    backdrop-filter: blur(10px);
  }
  #main[data-mobile-view="map"] .tray-collapsed .near-status {
    bottom: calc(132px + env(safe-area-inset-bottom));
  }
  #main[data-mobile-view="map"] .tray-expanded .near-status {
    bottom: calc(min(520px, 62%) + 94px + env(safe-area-inset-bottom));
  }
  #main[data-mobile-view="map"] .mapboxgl-ctrl-bottom-right {
    bottom: calc(276px + env(safe-area-inset-bottom));
  }
  #main[data-mobile-view="map"] .map-panel.tray-collapsed .mapboxgl-ctrl-bottom-right {
    bottom: calc(130px + env(safe-area-inset-bottom));
  }
  #main[data-mobile-view="map"] .map-panel.tray-expanded .mapboxgl-ctrl-bottom-right {
    bottom: calc(min(520px, 62%) + 92px + env(safe-area-inset-bottom));
  }
  #main[data-mobile-view="map"] + .mobile-nav,
  body:has(#main[data-mobile-view="map"]) .mobile-nav {
    border-color: rgba(255,255,255,.13);
    background: rgba(10,10,20,.72);
    box-shadow: 0 14px 42px rgba(0,0,0,.38);
    backdrop-filter: blur(18px);
  }
}

@media (max-width: 380px) {
  #main[data-mobile-view="map"] .brand {
    max-width: 174px;
    font-size: 18px;
  }
  #main[data-mobile-view="map"] .brand img {
    width: 40px;
    height: 40px;
  }
  #main[data-mobile-view="map"] .brand span { max-width: 126px; }
  #main[data-mobile-view="map"] .mobile-city-trigger {
    width: 104px;
    min-width: 104px;
    padding-inline: 8px;
    font-size: 12px;
  }
}

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

@media (prefers-color-scheme: light) {
  :root { --bg: #f5f7fb; --panel: rgba(255,255,255,.9); --panel-2: rgba(17,24,39,.055); --text: #111827; --muted: #667085; --border: rgba(17,24,39,.12); --shadow: 0 20px 50px rgba(17,24,39,.12); }
  .topbar { background: rgba(255,255,255,.82); }
  .sheet-card { background: #fff; }
  .form input, .form select, .form textarea { background: rgba(255,255,255,.92); }
  .city-picker { background: rgba(255,255,255,.88); }
}

