:root {
  --bg: #0b0d12;
  --panel: #12151c;
  --line: #2a3140;
  --text: #e8edf5;
  --muted: #8b95a8;
  --accent: #7ee0c2;
  --accent-dim: #1b3a32;
  --danger: #ff4d6d;
  --you: #7ee0c2;
  --them: #6ea8ff;
  --vrouw: #ff7eb3;
  --x: #c4a0ff;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --kb: 0px;
  --vvh: 100dvh;
  --topbar-h: 56px;
  --peek: 56px;
  font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  height: 100%;
  height: 100dvh;
  margin: 0;
  overflow: hidden;
}

html {
  color-scheme: dark;
  touch-action: pan-x pan-y;
}

body {
  color: var(--text);
  background: var(--bg);
  touch-action: pan-x pan-y;
  overscroll-behavior: none;
}

#map {
  position: absolute;
  inset: 0;
  touch-action: none;
}

.leaflet-container {
  touch-action: none;
}

.leaflet-tile-pane {
  filter: invert(1) hue-rotate(180deg) brightness(0.85) contrast(0.95);
}

.leaflet-container {
  background: #0b0d12;
  font: inherit;
}

.leaflet-div-icon.user-dot {
  background: none;
  border: none;
  overflow: visible;
}

.leaflet-control-attribution {
  max-width: 46vw;
  font-size: 10px !important;
  background: rgba(11, 13, 18, 0.65) !important;
}

.leaflet-control-zoom a {
  width: 40px !important;
  height: 40px !important;
  line-height: 40px !important;
  font-size: 18px !important;
}

.scrim {
  position: absolute;
  inset: 0;
  z-index: 610;
  border: 0;
  background: rgba(0, 0, 0, 0.45);
}

.topbar {
  position: absolute;
  z-index: 600;
  top: max(10px, var(--sat));
  left: max(10px, var(--sal));
  right: max(10px, var(--sar));
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand {
  display: none;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.people-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.people-btn,
.move-btn,
.panel-toggle,
.geo-btn {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 16px;
  min-height: 44px;
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}

.people-btn {
  font-weight: 650;
}

.people-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.people-btn.open,
.move-btn.active {
  border-color: var(--accent);
  color: var(--accent);
}

.move-btn {
  margin-left: auto;
}

.badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--bg);
  pointer-events: none;
}

.badge.pulse {
  animation: pulse 0.45s ease;
}

@keyframes pulse {
  0% {
    transform: scale(0.6);
  }
  70% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
  }
}

.move-hint {
  position: absolute;
  z-index: 605;
  left: 50%;
  top: calc(max(10px, var(--sat)) + 54px);
  transform: translateX(-50%);
  margin: 0;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: #06241c;
  font-size: 0.85rem;
  font-weight: 650;
  white-space: nowrap;
}

.sheet-handle {
  display: block;
  width: 44px;
  height: 5px;
  margin: 10px auto 4px;
  border-radius: 999px;
  background: #5a6478;
  flex-shrink: 0;
}

.sheet-grab {
  flex-shrink: 0;
  touch-action: none;
}

.people-drawer,
.panel,
.card {
  background: color-mix(in srgb, var(--panel) 96%, transparent);
  backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.people-drawer {
  position: absolute;
  z-index: 640;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-height: min(80dvh, var(--vvh));
  display: flex;
  flex-direction: column;
  border-radius: 18px 18px 0 0;
  overflow: hidden;
  padding-bottom: var(--sab);
  transition: transform 0.22s ease;
  touch-action: pan-y;
}

.people-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px 8px;
  touch-action: none;
}

.people-sub {
  margin: 0;
  padding: 0 16px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}

.you-card {
  padding: 10px 14px 12px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.you-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}

.you-meta {
  min-width: 0;
  flex: 1;
}

.you-line {
  margin: 0 0 6px;
  font-weight: 650;
}

.you-bio {
  width: 100%;
  resize: none;
  border: 1px solid var(--line);
  background: #0e1118;
  color: var(--text);
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  font-size: 0.86rem;
  line-height: 1.3;
}

.you-profile-open {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.86rem;
  text-align: left;
  padding: 0;
  cursor: pointer;
}

.you-profile-open span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.profile-page {
  position: absolute;
  z-index: 660;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-height: min(88dvh, var(--vvh));
  display: flex;
  flex-direction: column;
  border-radius: 18px 18px 0 0;
  overflow: hidden;
  background: color-mix(in srgb, var(--panel) 96%, transparent);
  backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding-bottom: var(--sab);
}

.profile-page.hidden {
  display: none;
}

.profile-head {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
}

.profile-head h2 {
  margin: 0;
  font-size: 1.05rem;
  text-align: center;
}

.profile-temp {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.profile-body {
  overflow: auto;
  padding: 8px 18px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.profile-photo {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #1c2230;
  color: var(--muted);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-photo.has-face span {
  display: none;
}

.profile-nick {
  margin: 4px 0 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.profile-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.profile-label {
  align-self: stretch;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.profile-bio {
  align-self: stretch;
}

.profile-bio-view {
  align-self: stretch;
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.4;
  color: var(--text);
}

.profile-bio-view.empty {
  color: var(--muted);
}

.profile-saved {
  margin: 0;
  color: var(--accent);
  font-size: 0.82rem;
}

.profile-actions {
  display: flex;
  gap: 8px;
  width: 100%;
  margin-top: 6px;
}

.profile-actions button {
  flex: 1;
  border: 1px solid var(--line);
  background: #1c2230;
  color: var(--text);
  border-radius: 12px;
  padding: 12px;
  min-height: 48px;
  font: inherit;
  cursor: pointer;
}

#profileSave,
#profileChat {
  background: var(--accent);
  color: #06241c;
  font-weight: 700;
  border: 0;
}

.profile-note {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

.face-sheet {
  display: flex;
  gap: 8px;
  margin: 0 0 10px;
}

.face-sheet.hidden {
  display: none;
}

.face-sheet button,
.face-pick {
  flex: 1;
  border: 1px solid var(--line);
  background: #1c2230;
  color: var(--text);
  border-radius: 10px;
  padding: 8px 12px;
  min-height: 44px;
  font: inherit;
  cursor: pointer;
  position: relative;
  z-index: 3;
  display: grid;
  place-items: center;
  text-align: center;
}

.face-pick {
  display: none;
}

html.ios .face-sheet button {
  display: none;
}

html.ios .face-pick {
  display: grid;
}

.apple-pick-hint {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

.apple-pick-hint.hidden {
  display: none;
}

.you-face-btn {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #1c2230;
  color: var(--muted);
  font: inherit;
  font-size: 0.72rem;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
}

.you-face-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.you-face-btn.has-face span {
  display: none;
}

.avatar img {
  width: 44px;
  height: 44px;
  max-width: none;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 0;
}

.marker-dot.face {
  background-size: cover;
  background-position: center;
  background-color: #1c2230;
}

.live-ttl {
  display: flex;
  gap: 4px;
  margin-right: auto;
}

.live-ttl button,
.snap-ttl button {
  min-height: 36px;
  padding: 6px 10px;
  font-size: 0.82rem;
}

.live-ttl button.on,
.snap-ttl button.on {
  background: var(--accent);
  color: #06241c;
  font-weight: 700;
}

.sex-picks {
  border: 0;
  margin: 8px 0 4px;
  padding: 0;
  min-width: 0;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.sex-picks legend {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 8px;
  padding: 0;
}

.sex-opt {
  display: block !important;
  margin: 0 !important;
  cursor: pointer;
}

.sex-opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.sex-opt span,
.sex-picks.compact button {
  display: grid;
  place-items: center;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #1c2230;
  color: var(--text);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.sex-opt:nth-child(2) span,
.sex-picks.compact button[data-sex="man"] {
  color: var(--them);
}

.sex-opt:nth-child(3) span,
.sex-picks.compact button[data-sex="vrouw"] {
  color: var(--vrouw);
}

.sex-opt:nth-child(4) span,
.sex-picks.compact button[data-sex="x"] {
  color: var(--x);
}

.sex-opt input:checked + span,
.sex-picks.compact button.on {
  border-color: currentColor;
  background: #243044;
  box-shadow: inset 0 0 0 1px currentColor;
}

.sex-picks.compact {
  margin: 0 0 10px;
}

.sex-picks.compact button {
  min-height: 38px;
  font-size: 0.86rem;
}

.sex-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  vertical-align: 1px;
  font-style: normal;
}

.sex-tag.man {
  background: rgba(110, 168, 255, 0.18);
  color: var(--them);
}

.sex-tag.vrouw {
  background: rgba(255, 126, 179, 0.18);
  color: var(--vrouw);
}

.sex-tag.x {
  background: rgba(196, 160, 255, 0.18);
  color: var(--x);
}

.avatar.vrouw {
  background: #3a2230;
  color: var(--vrouw);
}

.avatar.x {
  background: #2c2440;
  color: var(--x);
}

.you-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.you-actions button,
.rename-form button[type="submit"] {
  border: 1px solid var(--line);
  background: #1c2230;
  color: var(--text);
  border-radius: 10px;
  padding: 8px 12px;
  min-height: 40px;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

#logoutBtn {
  color: var(--danger);
}

.rename-form {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rename-form p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.rename-form input {
  width: 100%;
  border: 1px solid var(--line);
  background: #0e1118;
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  font-size: 16px;
}

.ghost {
  background: transparent;
  border: 0;
  color: var(--accent);
  padding: 8px 10px;
  min-height: 44px;
  cursor: pointer;
  font: inherit;
}

.hidden {
  display: none !important;
}

#peopleList {
  list-style: none;
  margin: 0;
  padding: 6px 8px 12px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#peopleList .people-section span {
  width: auto;
  display: block;
  padding: 12px 12px 4px;
  min-height: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#peopleList li button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 1.02rem;
  padding: 10px 12px;
  min-height: 56px;
  border-radius: 12px;
  cursor: pointer;
}

#peopleList li button:active {
  background: rgba(255, 255, 255, 0.04);
}

#peopleList li.people-section span {
  color: var(--muted);
}

#peopleList .person-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--text);
}

#peopleList .person-copy strong {
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#peopleList .person-copy em {
  font-style: normal;
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#peopleList .person-copy em.typing-line {
  color: var(--accent);
}

#peopleList li.offline button {
  opacity: 0.55;
}

#peopleList .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3dd68c;
  flex-shrink: 0;
}

#peopleList .dot.you {
  background: var(--accent);
}

#peopleList .mini-badge {
  margin-left: auto;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
}

.inbox-list {
  flex: 1;
  list-style: none;
  margin: 0;
  padding: 4px 8px 12px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.inbox-list .people-section span {
  display: block;
  padding: 14px 12px 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.inbox-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  padding: 12px;
  min-height: 74px;
  border-radius: 14px;
  cursor: pointer;
}

.inbox-avatar {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
}

.inbox-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  padding: 0;
  cursor: pointer;
}

.inbox-row:active {
  background: rgba(255, 255, 255, 0.05);
}

.avatar {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #243044;
  color: var(--them);
  font-size: 1.05rem;
  font-weight: 700;
}

.avatar.you {
  background: var(--accent-dim);
  color: var(--accent);
}

.inbox-list .person-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.inbox-list .person-copy strong {
  font-weight: 650;
  font-size: 1.05rem;
}

.inbox-list .person-copy .place {
  display: inline;
  font-weight: 500;
  color: var(--muted);
  font-size: 0.78rem;
  margin-left: 6px;
}

.inbox-list .person-copy em {
  font-style: normal;
  color: var(--muted);
  font-size: 0.86rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inbox-list .person-copy em.typing-line {
  color: var(--accent);
}

.inbox-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.inbox-meta time {
  color: var(--muted);
  font-size: 0.72rem;
}

.inbox-list .mini-badge {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
  font-style: normal;
}

.inbox-list li.offline .inbox-row {
  opacity: 0.55;
}

.empty-inbox {
  display: block;
  padding: 16px 12px;
  color: var(--muted);
}

.typing-bar {
  margin: 0;
  padding: 8px 16px 0;
  color: var(--accent);
  font-size: 0.86rem;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.panel {
  position: absolute;
  z-index: 500;
  left: 0;
  right: 0;
  bottom: var(--kb);
  width: 100%;
  display: flex;
  flex-direction: column;
  border-radius: 18px 18px 0 0;
  overflow: hidden;
  transition: transform 0.22s ease, height 0.22s ease;
  touch-action: pan-y;
}

.panel.dragging,
.people-drawer.dragging {
  transition: none;
}

.panel.collapsed {
  height: calc(var(--peek) + var(--sab));
}

.panel.collapsed .messages,
.panel.collapsed .composer,
.panel.collapsed .inbox-list,
.panel.collapsed .you-card,
.panel.collapsed .typing-bar {
  display: none;
}

.panel.collapsed .panel-head {
  border-bottom: 0;
  padding-bottom: max(8px, var(--sab));
}

.panel.expanded {
  height: min(90dvh, calc(var(--vvh) - var(--sat) - 44px));
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 14px 10px;
  border-bottom: 1px solid var(--line);
  touch-action: none;
}

.panel-titles {
  flex: 1;
  min-width: 0;
}

.panel-head h1 {
  margin: 0;
  font-size: 1.05rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.panel-head p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.panel-head .chat-place {
  color: #d7dee8;
  font-size: 0.78rem;
}

.panel-head .chat-place.hidden {
  display: none;
}

.panel-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
}

.panel.expanded .panel-toggle {
  transform: rotate(180deg);
}

.messages {
  flex: 1;
  list-style: none;
  margin: 0;
  padding: 12px 14px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.messages li {
  max-width: 88%;
  padding: 9px 12px;
  border-radius: 14px;
  background: #1c2230;
  line-height: 1.4;
  font-size: 1rem;
}

.messages li.you {
  align-self: flex-end;
  background: var(--accent-dim);
}

.messages li.system {
  align-self: center;
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  max-width: 100%;
}

.messages li.typing {
  width: fit-content;
  max-width: 40%;
  padding: 10px 14px;
}

.dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 12px;
}

.dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  animation: typing-bounce 1.05s infinite ease-in-out;
}

.dots i:nth-child(2) {
  animation-delay: 0.15s;
}

.dots i:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes typing-bounce {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.35;
  }
  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

.messages .meta {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  margin-bottom: 3px;
}

.messages li.snap {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  width: min(168px, 58%);
  max-width: 72%;
  padding: 0;
  overflow: visible;
  background: transparent;
  line-height: 1.25;
  align-self: flex-start;
  gap: 6px;
}

.messages li.you.snap {
  background: transparent;
  align-self: flex-end;
}

.snap-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  aspect-ratio: 3 / 4;
  min-height: 156px;
  margin: 0;
  padding: 16px 12px;
  border: 0;
  border-radius: 22px;
  color: #fff;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.snap-tile.photo {
  background: linear-gradient(165deg, #ff7ab8 0%, #ff3d71 48%, #e0124a 100%);
}

.snap-tile.clip {
  background: linear-gradient(165deg, #d4a5ff 0%, #a855f7 46%, #6d28d9 100%);
}

.snap-tile.seen {
  filter: saturate(0.62) brightness(0.78);
}

.snap-tile-lab {
  text-transform: capitalize;
}

.snap-ico {
  position: relative;
  display: block;
  width: 44px;
  height: 44px;
}

.snap-ico.pic {
  border: 3px solid #fff;
  border-radius: 12px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18);
}

.snap-ico.pic::after {
  content: "";
  position: absolute;
  right: 5px;
  top: 5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
}

.snap-ico.play {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 3px solid #fff;
}

.snap-ico.play::after {
  content: "";
  position: absolute;
  left: 18px;
  top: 14px;
  border-style: solid;
  border-width: 9px 0 9px 16px;
  border-color: transparent transparent transparent #fff;
}

.messages li.snap .snap-pic {
  display: none;
}

.messages li.snap .snap-foot {
  display: block;
  padding: 2px 6px;
  font-size: 0.75rem;
  font-weight: 750;
  color: var(--muted);
  background: transparent;
}

.messages li.snap .snap-foot.wait {
  color: #ffd37a;
}

.messages li.snap .snap-foot.shot {
  color: #ffb020;
}

.messages li.snap-note {
  align-self: center;
  width: auto;
  max-width: 92%;
  background: transparent;
  padding: 2px 0 8px;
}

.messages li.you.snap-note {
  align-self: flex-end;
  background: transparent;
}

.snap-shot-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #1c2230;
  border: 1px solid rgba(255, 176, 90, 0.38);
  color: #ffd089;
  font-size: 0.8rem;
  font-weight: 750;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}

.snap-shot-ico {
  width: 18px;
  height: 18px;
  border: 2px solid #ffd089;
  border-radius: 5px;
  position: relative;
  flex-shrink: 0;
}

.snap-shot-ico::before {
  content: "";
  position: absolute;
  left: 4px;
  top: -4px;
  width: 6px;
  height: 4px;
  border-radius: 2px 2px 0 0;
  background: #ffd089;
}

.snap-shot-ico::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1.5px solid #ffd089;
}

.messages li.snap.receipt {
  width: auto;
  min-width: 148px;
  max-width: 82%;
  background: #141820;
  overflow: hidden;
}

.messages li.snap .meta {
  padding: 0 4px;
  margin: 0;
  line-height: 1.3;
}

.messages li.snap.unopened {
  min-width: 148px;
}

.cam-btn {
  border: 1px solid var(--line);
  background: #1c2230;
  color: var(--text);
  border-radius: 12px;
  width: 48px;
  min-width: 48px;
  min-height: 48px;
  padding: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.snap-cam,
.live-cam {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: #000;
  display: flex;
  flex-direction: column;
  touch-action: none;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

html.cam-on,
html.cam-on body {
  overflow: hidden;
  overscroll-behavior: none;
}

.snap-peek {
  position: fixed;
  inset: 0;
  z-index: 1300;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
}

.snap-peek.hidden {
  display: none;
}

.snap-peek img,
.snap-peek video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  -webkit-touch-callout: none;
  user-select: none;
}

.snap-captions {
  position: absolute;
  inset: 0;
  z-index: 12;
  pointer-events: none;
}

.snap-caption,
.snap-caption-bar {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  z-index: 6;
  transform: translateY(-50%);
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  background: rgba(0, 0, 0, 0.52);
  color: #fff;
  text-align: center;
  pointer-events: auto;
  box-sizing: border-box;
}

.snap-caption.hidden,
.snap-caption-bar.hidden {
  display: none;
}

.snap-caption textarea,
.snap-caption-bar {
  width: 100%;
  border: 0;
  color: #fff;
  text-align: center;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 24px;
  letter-spacing: 0;
  resize: none;
  outline: none;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  -webkit-font-smoothing: antialiased;
}

.snap-caption textarea {
  display: block;
  background: transparent;
  padding: 0 12px;
  margin: 0;
  min-height: 24px;
  height: 24px;
  line-height: 24px;
  overflow: hidden;
  -webkit-user-select: text;
  user-select: text;
}

.snap-caption-bar {
  pointer-events: none;
  padding: 0 12px;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 24px;
}

.snap-caption textarea::placeholder {
  color: rgba(255, 255, 255, 0.5);
  font-weight: 400;
  line-height: 24px;
}

.snap-preview-tools {
  position: absolute;
  top: max(12px, var(--sat));
  right: 12px;
  z-index: 9;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.snap-preview-tools.hidden {
  display: none;
}

.snap-text-btn {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 800;
  font-size: 22px;
  line-height: 1;
}

.snap-text-btn.on {
  background: rgba(255, 214, 74, 0.92);
  color: #111;
}

.snap-cam.hidden,
.live-cam.hidden {
  display: none;
}

.snap-cam video,
.snap-still,
.live-cam video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  transform-origin: center center;
  opacity: 0.99;
}

.snap-cam::before,
.snap-cam::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  z-index: 2;
  pointer-events: none;
}

.snap-cam::before {
  top: 0;
  height: 120px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent);
}

.snap-cam::after {
  bottom: 0;
  height: 200px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent);
}

.snap-still.hidden {
  display: none;
}

.live-cam-err {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 40%;
  text-align: center;
  color: #ff8a8a;
  z-index: 2;
}

.snap-x {
  position: absolute;
  top: max(12px, var(--sat));
  left: 12px;
  z-index: 5;
  border: 0;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.6rem;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.snap-tools {
  position: absolute;
  top: max(12px, var(--sat));
  right: 12px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.snap-tool {
  position: relative;
  border: 0;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}

.snap-tool.on,
.snap-tool[data-mode="on"],
.snap-tool[data-mode="auto"],
.snap-tool[data-sec="3"],
.snap-tool[data-sec="5"] {
  background: rgba(255, 214, 74, 0.92);
  color: #111;
}

.snap-tool em {
  position: absolute;
  right: -2px;
  bottom: -2px;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  border-radius: 8px;
  background: #111;
  color: #fff;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
}

.snap-tool em:empty {
  display: none;
}

.snap-grid {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(to right, transparent 32.9%, rgba(255, 255, 255, 0.28) 33%, rgba(255, 255, 255, 0.28) 33.4%, transparent 33.5%, transparent 66.1%, rgba(255, 255, 255, 0.28) 66.2%, rgba(255, 255, 255, 0.28) 66.6%, transparent 66.7%),
    linear-gradient(to bottom, transparent 32.9%, rgba(255, 255, 255, 0.28) 33%, rgba(255, 255, 255, 0.28) 33.4%, transparent 33.5%, transparent 66.1%, rgba(255, 255, 255, 0.28) 66.2%, rgba(255, 255, 255, 0.28) 66.6%, transparent 66.7%);
}

.snap-grid.hidden {
  display: none;
}

.snap-flash {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: #fff;
  pointer-events: none;
}

.snap-flash.hidden {
  display: none;
}

.snap-count {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  margin: 0;
  font-size: 7rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

.snap-count.hidden {
  display: none;
}

.snap-ttl {
  position: static;
  transform: none;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  margin: 0 auto 12px;
}

.snap-ttl span {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.8;
}

.snap-ttl button {
  border: 0;
  background: transparent;
  color: #fff;
  border-radius: 999px;
  min-height: 32px;
  padding: 6px 10px;
  cursor: pointer;
}

.snap-cam.face-mode .snap-ttl,
.snap-cam.clip-preview .snap-ttl {
  display: none;
}

.snap-send {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: max(18px, calc(var(--sab) + 12px));
  z-index: 8;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.snap-send.hidden {
  display: none;
}

.snap-cam.cap-dragging .snap-send {
  opacity: 0;
  pointer-events: none;
}

.snap-cap-trash {
  position: absolute;
  left: 50%;
  bottom: max(28px, calc(var(--sab) + 18px));
  z-index: 16;
  width: 58px;
  height: 58px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.58);
  color: #fff;
  display: grid;
  place-items: center;
  transform: translateX(-50%);
  pointer-events: none;
}

.snap-cap-trash.hidden {
  display: none;
}

.snap-cap-trash.hot {
  background: #ff3b5c;
  transform: translateX(-50%) scale(1.18);
}

.snap-caption.dump {
  opacity: 0.28;
}

.snap-send-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.snap-shutter {
  position: absolute;
  left: 50%;
  bottom: max(28px, calc(var(--sab) + 18px));
  transform: translateX(-50%);
  z-index: 3;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: 5px solid #fff;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 0 8px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  padding: 0;
  touch-action: none;
  -webkit-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.snap-shutter,
.snap-shutter * {
  -webkit-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none;
}

.snap-shutter.rec {
  border-color: #ff3b5c;
}

.snap-shutter::after {
  content: "";
  display: block;
  width: 58px;
  height: 58px;
  margin: 4px auto;
  border-radius: 50%;
  background: #fff;
}

.snap-shutter.rec::after {
  width: 32px;
  height: 32px;
  margin: 18px auto;
  border-radius: 10px;
  background: #ff3b5c;
}

.snap-rec-ring {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  pointer-events: none;
  background: conic-gradient(#ff3b5c calc(var(--rec) * 1%), transparent 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
}

.snap-rec-hint {
  position: absolute;
  left: 50%;
  bottom: max(118px, calc(var(--sab) + 108px));
  transform: translateX(-50%);
  z-index: 4;
  margin: 0;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 8px #000;
  pointer-events: none;
  white-space: nowrap;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.snap-cam.face-mode .snap-rec-hint,
.snap-cam.preview .snap-rec-hint,
.snap-cam.rec .snap-rec-hint,
.snap-lenses:not(.hidden) ~ .snap-rec-hint {
  display: none;
}

.snap-lenses {
  position: absolute;
  left: 50%;
  bottom: max(118px, calc(var(--sab) + 108px));
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
}

.snap-lenses.hidden {
  display: none;
}

.snap-lenses button {
  min-width: 44px;
  height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.snap-lenses button.on {
  background: #ffd64a;
  color: #111;
}

.snap-cam.preview .snap-shutter,
.snap-cam.preview .snap-tools,
.snap-cam.preview .snap-lenses {
  display: none;
}

.snap-send button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

#liveRetry {
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border-radius: 999px;
  padding: 12px 16px;
  min-height: 48px;
}

#liveSend {
  background: var(--accent);
  color: #06241c;
  font-weight: 800;
  border-radius: 999px;
  padding: 14px 22px;
  min-height: 52px;
  min-width: 120px;
}

.live-cam-bar {
  display: none;
}

.composer {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  padding-bottom: max(10px, calc(var(--sab) - var(--kb)));
  border-top: 1px solid var(--line);
}

.composer input,
.card input[type="text"],
.card input[type="number"],
.profile-age {
  width: 100%;
  border: 1px solid var(--line);
  background: #0e1118;
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px;
}

.card input[type="number"]::-webkit-outer-spin-button,
.card input[type="number"]::-webkit-inner-spin-button,
.profile-age::-webkit-outer-spin-button,
.profile-age::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.card input[type="number"],
.profile-age {
  -moz-appearance: textfield;
}

.age-tag {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.82rem;
  font-weight: 650;
  font-style: normal;
  color: var(--muted);
}

.composer button[type="submit"],
.card button[type="submit"],
#joinBtn {
  border: 0;
  background: var(--accent);
  color: #06241c;
  font-weight: 650;
  border-radius: 12px;
  padding: 12px 16px;
  min-height: 48px;
  cursor: pointer;
  font: inherit;
  flex-shrink: 0;
}

#joinBtn {
  width: 100%;
  position: relative;
  z-index: 20;
  touch-action: manipulation;
}

.card button[type="submit"]:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.toast {
  position: absolute;
  z-index: 700;
  left: 12px;
  right: 12px;
  top: calc(max(10px, var(--sat)) + 54px);
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 14px;
  padding: 12px 14px;
  min-height: 48px;
  box-shadow: var(--shadow);
  font: inherit;
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
}

.overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: auto;
  z-index: 900;
  display: block;
  padding: 0;
  max-height: min(78dvh, calc(var(--vvh) - 72px));
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: linear-gradient(180deg, transparent, rgba(11, 13, 18, 0.88) 22%);
  pointer-events: auto;
}

.overlay .card {
  pointer-events: auto;
  isolation: isolate;
  position: relative;
  z-index: 2;
}

#joinBtn,
#geoBtn {
  touch-action: manipulation;
  position: relative;
  z-index: 5;
}

.card {
  width: 100%;
  border-radius: 20px 20px 0 0;
  padding: 4px 16px calc(14px + var(--sab));
}

.kicker {
  margin: 8px 0 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.68rem;
  color: var(--accent);
}

.card h2 {
  margin: 6px 0 4px;
  font-size: 1.25rem;
}

.lede,
.card label {
  color: var(--muted);
  font-size: 0.9rem;
}

.card label {
  display: block;
  margin: 8px 0;
}

.check {
  display: flex !important;
  align-items: center;
  gap: 10px;
  min-height: 48px;
}

.check input {
  width: 22px;
  height: 22px;
}

.join-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.geo-btn {
  width: 100%;
  border-color: var(--accent);
  color: var(--accent);
}

.card button[type="submit"] {
  width: 100%;
}

.error {
  color: #ff8a8a;
  min-height: 1.2em;
}

.marker-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 0 0 6px rgba(126, 224, 194, 0.28);
  background: var(--you);
}

.marker-dot.other {
  background: var(--them);
  box-shadow: 0 0 0 6px rgba(110, 168, 255, 0.28);
}

.marker-dot.vrouw {
  background: var(--vrouw);
  box-shadow: 0 0 0 6px rgba(255, 126, 179, 0.3);
}

.marker-dot.x {
  background: var(--x);
  box-shadow: 0 0 0 6px rgba(196, 160, 255, 0.3);
}

.user-pin {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: auto;
  height: 44px;
  cursor: pointer;
  gap: 6px;
}

.user-pin.named {
  width: auto;
  justify-content: flex-start;
  gap: 6px;
}

.cluster-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid #fff;
  background: #6ea8ff;
  color: #0b0d12;
  font-weight: 800;
  font-size: 13px;
  box-shadow: 0 0 0 6px rgba(110, 168, 255, 0.28);
  cursor: pointer;
}

.pin-name {
  display: block;
  background: #12151c;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 2px 8px;
  font-size: 11px;
  white-space: nowrap;
}

.profile-album {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.album-shot {
  position: relative;
  width: 64px;
  height: 64px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #1c2230;
  cursor: pointer;
}

.album-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.album-shot.on {
  outline: 2px solid var(--accent);
}

.album-hint {
  flex: 1 0 100%;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

.album-shot .del {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 12px;
  line-height: 20px;
  padding: 0;
}

.album-add {
  width: 64px;
  height: 64px;
  border: 1px dashed var(--accent);
  border-radius: 10px;
  background: #1c2230;
  color: var(--accent);
  font-size: 1.8rem;
  line-height: 64px;
  text-align: center;
  cursor: pointer;
  position: relative;
  z-index: 2;
  display: block;
}

.feed-page {
  height: min(88dvh, var(--vvh));
}

.feed-list {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding: 8px 14px 18px;
  flex: 1;
  min-height: 0;
  display: block;
}

.feed-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: #12151c;
  margin-bottom: 14px;
  flex: none;
}

.feed-card:last-child {
  margin-bottom: 0;
}

.feed-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
  object-position: center 18%;
  image-rendering: auto;
  background: #0b0d12;
  cursor: pointer;
}

.feed-copy {
  padding: 10px 12px 12px;
}

.feed-copy strong {
  display: block;
  font-size: 1.05rem;
}

.feed-copy .place {
  color: var(--muted);
  font-size: 0.82rem;
}

.feed-copy p {
  margin: 6px 0 10px;
  color: var(--text);
  font-size: 0.9rem;
}

.feed-copy button {
  width: 100%;
  border: 0;
  background: var(--accent);
  color: #06241c;
  font: inherit;
  font-weight: 700;
  border-radius: 12px;
  min-height: 44px;
  cursor: pointer;
}

.feed-empty {
  color: var(--muted);
  text-align: center;
  padding: 24px 12px;
}

body:not(.joined) .panel {
  display: none !important;
  pointer-events: none !important;
}

body:not(.joined) #feedBtn {
  display: none !important;
}

body.joined .leaflet-bottom {
  bottom: calc(var(--peek) + var(--sab) + 8px);
}

body.joined .leaflet-top.leaflet-right {
  top: calc(max(10px, var(--sat)) + 52px);
  right: 10px;
}

@media (min-width: 901px) {
  .brand {
    display: block;
    pointer-events: none;
  }

  .sheet-handle {
    display: none;
  }

  .topbar {
    right: auto;
    max-width: calc(100vw - 430px);
    gap: 10px;
  }

  .move-btn {
    margin-left: 0;
  }

  .people-drawer {
    top: calc(max(12px, var(--sat)) + 48px);
    left: max(12px, var(--sal));
    right: auto;
    bottom: auto;
    width: min(300px, 40vw);
    max-height: min(60vh, 460px);
    border-radius: 16px;
    padding-bottom: 0;
  }

  .profile-page {
    top: 16px;
    right: max(16px, var(--sar));
    left: auto;
    bottom: 16px;
    width: min(420px, calc(100vw - 32px));
    height: auto;
    max-height: calc(100dvh - 32px);
    border-radius: 18px;
  }

  #peopleList {
    padding-bottom: 8px;
  }

  .panel,
  .panel.collapsed,
  .panel.expanded {
    top: 16px;
    right: max(16px, var(--sar));
    left: auto;
    bottom: 16px;
    width: min(420px, calc(100vw - 32px));
    height: auto;
    border-radius: 18px;
  }

  .panel.collapsed .messages,
  .panel.collapsed .composer,
  .panel.collapsed .inbox-list,
  .panel.collapsed .you-card,
  .panel.collapsed .typing-bar {
    display: flex;
  }

  .panel.collapsed .inbox-list {
    flex-direction: column;
  }

  .panel.collapsed .composer.hidden,
  .panel.collapsed .messages.hidden,
  .panel.collapsed .inbox-list.hidden,
  .panel.collapsed .you-card.hidden,
  .panel.collapsed .typing-bar.hidden {
    display: none !important;
  }

  .panel-toggle {
    display: none;
  }

  .composer {
    padding-bottom: 12px;
  }

  .overlay {
    inset: 0;
    top: 0;
    place-items: end start;
    display: grid;
    padding: 24px;
    background: linear-gradient(90deg, rgba(11, 13, 18, 0.72), transparent 55%);
    pointer-events: none;
  }

  .overlay .card {
    pointer-events: auto;
  }

  .card {
    width: min(380px, 100%);
    border-radius: 18px;
    padding: 22px;
  }

  .join-actions {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .geo-btn {
    order: 2;
    width: auto;
    border: 0;
    background: transparent;
    color: var(--accent);
    min-height: auto;
    padding: 0;
  }

  .card button[type="submit"],
  #joinBtn {
    order: 1;
    width: auto;
    justify-self: start;
  }

  .marker-dot {
    width: 14px;
    height: 14px;
    border-width: 2px;
  }

  .user-pin {
    width: auto;
    height: auto;
    justify-content: flex-start;
    gap: 6px;
  }

  .pin-name {
    display: block;
  }

  .toast {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    max-width: min(420px, calc(100vw - 24px));
    width: max-content;
  }

  body.joined .leaflet-bottom {
    bottom: 0;
  }

  body.joined .leaflet-top.leaflet-right {
    top: 10px;
  }
}
