html,body {
  min-height: 100%;
  min-height: 100dvh;
}

:root {
  --bottom-nav-height: calc(76px + env(safe-area-inset-bottom));
  --top-nav-height: calc(66px + env(safe-area-inset-top));
}

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
  overscroll-behavior-x: none;
}

body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
  overscroll-behavior-x: none;
}

#app {
  width: 100%;
  max-width: 100%;
  min-height: 100%;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-x: clip;
}

.shell {
  width: 100%;
  min-height: 100dvh;
  padding-bottom: calc(var(--bottom-nav-height) + 34px);
  overflow-x: hidden;
  overflow-x: clip;
}

.nav {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  max-width: 760px;
  min-height: var(--bottom-nav-height);
  margin: 0 auto;
  z-index: 100;
  transform: none !important;
  background: rgba(255, 253, 248, 0.98);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: 0 -8px 24px rgba(25, 33, 29, 0.08);
  isolation: isolate;
  grid-template-columns: repeat(5, 1fr);
}

.fab {
  display: none !important;
}

.app-intro {
  display: none;
}

.app-scenes {
  display: none;
}

.card h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 94%;
}

.activity-icon {
  flex: 0 0 auto;
  font-size: 42px;
  line-height: 1;
  filter: saturate(1.08);
}

.activity-title {
  min-width: 0;
}

.location-consent {
  background: var(--card);
  border: 1px solid rgba(25, 33, 29, 0.08);
  border-radius: 24px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.location-consent h2 {
  margin: 8px 0;
  font-size: 26px;
}

.location-consent p {
  color: var(--muted);
  line-height: 1.65;
}

.location-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: white;
  background: var(--orange);
  font-size: 30px;
  box-shadow: 0 12px 24px rgba(255, 92, 53, 0.25);
}

.consent-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 18px 0;
  padding: 13px;
  border-radius: 14px;
  background: #f0eee7;
  font-size: 13px;
}

.consent-check input {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  accent-color: var(--orange);
}

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

.radar {
  position: relative;
  width: min(100%, 430px);
  aspect-ratio: 1;
  margin: 4px auto 14px;
  overflow: hidden;
  border-radius: 50%;
  background: radial-gradient(circle, #fffdf8 0 12%, #edf3ed 13% 100%);
  border: 1px solid rgba(25, 33, 29, 0.12);
  box-shadow: inset 0 0 60px rgba(59, 128, 97, 0.08), 0 18px 40px rgba(33, 43, 37, 0.1);
  contain: layout paint;
}

.radar::before,
.radar::after {
  content: "";
  position: absolute;
  background: rgba(59, 128, 97, 0.13);
}

.radar::before { width: 1px; height: 100%; left: 50%; }
.radar::after { height: 1px; width: 100%; top: 50%; }

.radar-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  border: 1px solid rgba(59, 128, 97, 0.19);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.ring-one { width: 32%; height: 32%; }
.ring-two { width: 62%; height: 62%; }
.ring-three { width: 90%; height: 90%; }

.radar-sweep {
  position: absolute;
  inset: 5%;
  border-radius: 50%;
  background: conic-gradient(from -15deg, rgba(117, 201, 168, 0.34), transparent 58deg, transparent 360deg);
  animation: radar-spin 5s linear infinite;
}

.radar-me,
.radar-person {
  position: absolute;
  z-index: 4;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  font-weight: 900;
  box-shadow: 0 7px 18px rgba(25, 33, 29, 0.2);
}

.radar-me {
  left: 50%;
  top: 50%;
  width: 46px;
  height: 46px;
  transform: translate(-50%, -50%);
  background: var(--ink);
  border: 4px solid white;
}

.radar-person {
  left: var(--x);
  top: var(--y);
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%);
  background: var(--orange);
  border: 3px solid white;
  font-size: 12px;
}

.location-status {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  margin-bottom: 16px;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38a169;
  box-shadow: 0 0 0 5px rgba(56, 161, 105, 0.12);
}

.nearby-list {
  display: grid;
  gap: 10px;
}

.nearby-person {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(25, 33, 29, 0.08);
  background: var(--card);
}

.nearby-avatar {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: white;
  background: var(--ink);
  font-weight: 900;
}

.nearby-person h3,
.nearby-person p {
  margin: 0;
}

.nearby-person p,
.nearby-person small {
  color: var(--muted);
}

.nearby-person small {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.install-guide {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: grid;
  align-items: end;
  background: rgba(16, 23, 19, 0.5);
  padding: 16px;
}

.install-guide section {
  position: relative;
  width: min(100%, 500px);
  margin: 0 auto;
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
  border-radius: 26px;
  background: var(--card);
  box-shadow: 0 24px 70px rgba(16, 23, 19, 0.28);
}

.install-guide-icon {
  float: left;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin-right: 12px;
  border-radius: 16px;
  background: white;
  color: var(--ink);
  font-size: 24px;
  font-weight: 950;
  box-shadow: 0 7px 18px rgba(25, 33, 29, 0.16);
}

.install-guide h2 {
  margin: 3px 34px 18px 0;
  font-size: 24px;
}

.install-guide ol {
  clear: both;
  margin: 0 0 14px;
  padding: 14px 14px 14px 38px;
  border-radius: 16px;
  background: #f0eee7;
}

.install-guide li {
  margin: 8px 0;
}

.install-guide p {
  color: var(--muted);
  font-size: 13px;
}

.install-guide .secondary {
  width: 100%;
}

.install-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #f0eee7;
  color: var(--ink);
  font-size: 22px;
}

@media (display-mode: standalone), (hover: none) and (pointer: coarse) {
  body {
    overscroll-behavior-y: none;
  }

  .shell {
    max-width: 520px;
    padding: var(--top-nav-height) 16px calc(var(--bottom-nav-height) + 32px);
  }

  .top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 90;
    width: 100%;
    max-width: 520px;
    min-height: var(--top-nav-height);
    margin: 0 auto;
    padding: calc(10px + env(safe-area-inset-top)) 20px 12px;
    background: rgba(244, 241, 234, 0.98);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border-bottom: 1px solid rgba(25, 33, 29, 0.07);
    box-shadow: 0 8px 24px rgba(25, 33, 29, 0.05);
    transform: none;
    isolation: isolate;
  }

  .grid {
    grid-template-columns: 1fr !important;
    gap: 14px;
  }

  .grid .card:first-child {
    grid-column: auto !important;
  }

  .hero {
    padding: 4px 0 18px;
  }

  .hero .eyebrow {
    display: none;
  }

  .hero h1 {
    font-size: clamp(38px, 11vw, 48px);
    line-height: 1;
  }

  .web-intro {
    display: none;
  }

  .app-intro {
    display: inline;
  }

  .app-scenes {
    display: block;
    overflow: hidden;
    margin: 0 -16px 14px;
    padding: 2px 0;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    contain: layout paint;
  }

  .scene-track {
    display: flex;
    gap: 10px;
    width: max-content;
    padding-right: 10px;
    animation: scene-scroll 28s linear infinite;
  }

  .app-scenes:active .scene-track {
    animation-play-state: paused;
  }

  .scene-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    border: 1px solid rgba(25, 33, 29, 0.08);
    border-radius: 16px;
    padding: 10px 13px;
    background: rgba(255, 253, 248, 0.9);
    box-shadow: 0 7px 18px rgba(33, 43, 37, 0.07);
    font-size: 13px;
    font-weight: 750;
  }

  .scene-pill b {
    font-size: 22px;
    line-height: 1;
  }

  .hero p {
    display: block;
    margin-top: 10px;
    font-size: 16px;
    line-height: 1.5;
  }

  .card {
    border-radius: 20px;
    padding: 17px;
  }

  .card h2 {
    font-size: 22px;
    gap: 10px;
  }

  .activity-icon {
    font-size: 46px;
  }

  .primary,
  .secondary,
  .danger {
    min-height: 44px;
  }

  .field input,
  .field textarea,
  .field select {
    font-size: 16px;
  }

  .nav button {
    min-height: 56px;
    padding: 6px 4px;
  }

  .sheet {
    max-height: 88dvh;
    padding-bottom: calc(22px + env(safe-area-inset-bottom));
  }

  .modal {
    z-index: 200;
  }

  #toast {
    z-index: 300;
  }
}

@keyframes scene-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-50% - 5px)); }
}

@media (prefers-reduced-motion: reduce) {
  .scene-track {
    animation: none;
  }

  .app-scenes {
    overflow-x: auto;
  }

  .radar-sweep {
    animation: none;
  }
}

@media (max-width: 360px) {
  .shell {
    padding-left: 12px;
    padding-right: 12px;
  }

  .hero h1 {
    font-size: 35px;
    letter-spacing: -2px;
  }

  .card {
    padding: 14px;
  }

  .card h2 {
    font-size: 20px;
  }

  .activity-icon {
    font-size: 40px;
  }

  .people {
    gap: 10px;
    align-items: flex-start;
  }

  .primary,
  .secondary,
  .danger {
    padding-left: 12px;
    padding-right: 12px;
  }

  .nearby-person {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .nearby-person > .chip {
    grid-column: 2;
    justify-self: start;
  }
}

/* v15.2: standard AMap presentation, nickname markers and strict mobile width */
.profile-form,
.profile-form > *,
.profile-form .field,
.profile-form .profile-prompts {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.profile-form {
  margin-top: 20px;
  overflow: hidden;
}

.profile-prompts {
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.profile-prompts::after {
  content: "";
  flex: 0 0 8px;
}

.stat button {
  min-width: 0;
  padding: 12px;
  border: 0;
  border-radius: 13px;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  text-align: left;
  cursor: pointer;
}

.stat button:active {
  background: rgba(255, 255, 255, .16);
}

.stat button b {
  display: block;
  font-size: 22px;
}

.room-filters {
  width: 100%;
  display: flex;
  gap: 8px;
  margin: 4px 0 16px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.own-map-shell,
.map-shell {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(25, 33, 29, .1);
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.own-map-shell {
  margin: 12px 0 18px;
}

.own-location-map {
  width: 100%;
  height: 270px;
  min-height: 270px;
  background: #edf0eb;
}

.own-map-caption {
  padding: 10px 14px;
  color: var(--muted);
  font-size: 11px;
}

.map-user-label {
  position: relative;
  max-width: min(240px, 66vw);
  padding: 8px 12px;
  border: 2px solid rgba(255, 255, 255, .95);
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  box-shadow: 0 8px 22px rgba(25, 33, 29, .25);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  transform: translate(var(--marker-x, 0), var(--marker-y, 0));
}

.map-user-label::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 9px;
  height: 9px;
  transform: translateX(-50%) rotate(45deg);
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  background: inherit;
}

.map-user-label.group {
  border-radius: 14px;
  background: var(--ink);
}

.map-user-label.own {
  background: var(--green);
}

.map-user-label span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.radar-person,
.radar-me {
  width: auto;
  max-width: 116px;
  height: auto;
  min-height: 34px;
  padding: 7px 11px;
  border-width: 2px;
  border-radius: 999px;
  font-size: 11px;
}

.radar-person b,
.radar-me {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 380px) {
  .own-location-map {
    height: 235px;
    min-height: 235px;
  }

  .map-user-label {
    max-width: 58vw;
    font-size: 11px;
  }
}

@media (max-width: 640px) {
  input,
  textarea,
  select,
  .field input,
  .field textarea,
  .field select {
    font-size: 16px !important;
  }

  .create-location-field > div {
    grid-template-columns: minmax(0, 1fr);
  }

  .create-location-field > div .chip {
    width: 100%;
    min-height: 44px;
  }
}

/* v15: friends, own location, legal consent, notifications and mobile time input */
.own-location {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  margin: 0 0 15px;
  padding: 14px;
  border: 1px solid rgba(25, 33, 29, .08);
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 8px 22px rgba(33, 43, 37, .06);
}

.own-location-icon,
.map-self {
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: var(--ink);
  color: #fff;
  font-weight: 950;
  letter-spacing: -1px;
  box-shadow: 0 8px 18px rgba(25, 33, 29, .25);
}

.own-location-icon {
  width: 52px;
  height: 52px;
  font-size: 20px;
}

.own-location b,
.own-location span,
.own-location small {
  display: block;
}

.own-location span {
  margin: 2px 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.own-location small {
  color: var(--muted);
  font-size: 11px;
}

.radar-own-label {
  position: absolute;
  left: 50%;
  top: calc(50% + 32px);
  z-index: 4;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.map-self {
  width: 46px;
  height: 46px;
  border: 4px solid #fff;
  border-radius: 50%;
  font-size: 17px;
}

.friends-entry {
  width: 100%;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin: 16px 0 0;
  padding: 14px;
  border: 1px solid rgba(25, 33, 29, .08);
  border-radius: 19px;
  background: var(--card);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 8px 22px rgba(33, 43, 37, .06);
}

.friends-entry > span {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #e4f2eb;
  font-size: 24px;
}

.friends-entry b,
.friends-entry small {
  display: block;
}

.friends-entry small {
  margin-top: 2px;
  color: var(--muted);
}

.friends-entry em {
  color: var(--muted);
  font-size: 28px;
  font-style: normal;
}

.friends-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin: 8px 0 20px;
}

.friends-head .page-title,
.friends-head .sub {
  margin-top: 0;
}

.friends-directory {
  display: grid;
  gap: 12px;
}

.friend-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 13px;
  padding: 15px;
  border: 1px solid rgba(25, 33, 29, .08);
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 8px 22px rgba(33, 43, 37, .06);
}

.directory-avatar {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 19px;
  background: #ece9df;
  font-size: 22px;
  font-weight: 900;
}

.directory-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.friend-card-copy,
.friend-name {
  min-width: 0;
}

.friend-name {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.friend-name h2,
.friend-card p {
  margin: 0;
}

.friend-name h2 {
  overflow: hidden;
  font-size: 19px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-card p {
  margin-top: 4px;
  color: var(--muted);
}

.friend-card small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}

.presence {
  flex: 0 0 auto;
  border-radius: 99px;
  padding: 4px 8px;
  background: #f0eee7;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.presence.online {
  background: #dcf1e5;
  color: #246546;
}

.notification-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(25, 33, 29, .08);
  border-radius: 19px;
  background: var(--card);
  box-shadow: 0 8px 22px rgba(33, 43, 37, .06);
}

.notification-bell {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #fff0ec;
  color: var(--orange);
  font-size: 24px;
}

.notification-card p,
.notification-card small {
  display: block;
  margin: 2px 0 0;
  color: var(--muted);
}

.notification-card small {
  font-size: 11px;
}

.policy-links {
  display: flex;
  gap: 5px;
  align-items: center;
  margin-top: 18px;
  font-size: 12px;
}

.legal-link {
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: var(--green);
  padding: 0;
  font-size: inherit;
  cursor: pointer;
}

.policy-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: end center;
  padding: 18px;
  background: rgba(18, 25, 21, .72);
}

.policy-sheet {
  position: relative;
  width: min(680px, 100%);
  max-height: 90dvh;
  overflow: auto;
  padding: 22px;
  border-radius: 25px;
  background: var(--paper);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .25);
}

.policy-sheet header {
  padding-right: 42px;
}

.policy-sheet header small,
.policy-copy .policy-lead {
  color: var(--muted);
}

.policy-sheet h2 {
  margin: 2px 0 18px;
  font-size: 28px;
}

.policy-copy h3 {
  margin: 22px 0 6px;
  font-size: 16px;
}

.policy-copy p {
  margin: 0;
  line-height: 1.75;
}

.policy-sheet > .secondary {
  width: 100%;
  margin-top: 24px;
}

.agreement-shell {
  max-width: 560px;
}

.agreement-card {
  margin-top: 22px;
  padding: 22px;
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.agreement-card h1 {
  margin: 8px 0;
  font-size: 30px;
  line-height: 1.1;
}

.agreement-card > p,
.agreement-card > small {
  color: var(--muted);
}

.agreement-card form,
.register-agreements {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.agreement-check {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.agreement-check input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--orange);
}

.create-location-field > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.create-location-field small,
.clock-field small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}

.date-time-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.clock-field > div {
  position: relative;
}

.clock-face {
  position: absolute;
  top: 50%;
  left: 13px;
  z-index: 1;
  transform: translateY(-50%);
  color: var(--orange);
  font-size: 23px;
  pointer-events: none;
}

.clock-field input {
  padding-left: 43px;
  font-size: 18px;
  font-weight: 850;
}

.compact-people {
  max-width: 180px;
}

.profile-prompts {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  margin-top: 8px;
  padding-bottom: 3px;
  scrollbar-width: none;
}

.profile-prompts .chip {
  flex: 0 0 auto;
  padding: 6px 10px;
  font-size: 11px;
}

.prohibited-rules {
  margin: 0 0 18px;
  border: 1px solid #efc8bd;
  border-radius: 15px;
  background: #fff4f0;
  color: #8e3523;
  font-size: 12px;
}

.prohibited-rules summary {
  padding: 12px 14px;
  font-weight: 850;
  cursor: pointer;
}

.prohibited-rules p {
  margin: 0;
  padding: 0 14px 14px;
  line-height: 1.65;
}

.collection-list {
  display: grid;
  gap: 9px;
}

.collection-list p {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--card);
}

@media (max-width: 440px) {
  .notification-card {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .notification-card > button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .date-time-picker,
  .create-location-field > div {
    grid-template-columns: 1fr;
  }

  .create-location-field .chip,
  .compact-people {
    width: 100%;
    max-width: none;
  }
}

.update-banner {
  position: fixed;
  left: 50%;
  top: calc(12px + env(safe-area-inset-top));
  z-index: 500;
  width: min(420px, calc(100% - 24px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 16px 40px rgba(25, 33, 29, .28);
}

.update-banner span,
.update-banner small {
  display: block;
}

.update-banner small {
  opacity: .7;
  margin-top: 2px;
}

.update-banner button {
  flex: 0 0 auto;
  border: 0;
  border-radius: 11px;
  padding: 9px 12px;
  background: var(--orange);
  color: #fff;
  font-weight: 850;
}

.location-switch {
  margin-top: 4px;
}

.map-shell {
  overflow: hidden;
  border: 1px solid rgba(25, 33, 29, .08);
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.amap-map {
  width: 100%;
  height: min(62dvh, 580px);
  min-height: 420px;
  background: #e9ece7;
}

.map-loading,
.map-error {
  width: 100%;
  height: 100%;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 30px;
  color: var(--muted);
  text-align: center;
}

.map-error b,
.map-error span {
  display: block;
}

.map-status {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 11px 14px;
  color: var(--muted);
  font-size: 12px;
}

.map-cluster {
  min-width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  align-content: center;
  border: 3px solid rgba(255, 255, 255, .92);
  border-radius: 18px;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 10px 26px rgba(25, 33, 29, .27);
  transform: translateZ(0);
}

.map-cluster b,
.map-cluster span {
  display: block;
  line-height: 1;
  white-space: nowrap;
}

.map-cluster b {
  font-size: 18px;
}

.map-cluster span {
  max-width: 74px;
  margin-top: 3px;
  overflow: hidden;
  color: rgba(255, 255, 255, .78);
  font-size: 9px;
  text-overflow: ellipsis;
}

.map-cluster.single {
  background: var(--orange);
}

@media (max-width: 380px) {
  .amap-map {
    min-height: 380px;
  }
}

@media (display-mode: standalone) and (min-width: 700px) {
  .shell {
    max-width: 680px;
  }

  .hero h1 {
    font-size: 54px;
  }
}

@media (display-mode: standalone) and (orientation: landscape) and (max-height: 500px) {
  .shell {
    padding-top: var(--top-nav-height);
  }

  .hero {
    padding-top: 4px;
  }

  .nav button {
    min-height: 46px;
  }
}

/* v13: avatars, friends and private messages */
.avatar img,
.host-avatar img,
.nearby-avatar img,
.friend-avatar img,
.profile-avatar img,
.radar-person img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: inherit;
}

.host {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.host-avatar {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: #ece9df;
  color: var(--ink);
  font-weight: 850;
}

.nearby-person {
  align-items: flex-start;
}

.nearby-person-copy {
  min-width: 0;
}

.nearby-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.primary.small {
  min-height: 36px;
  padding: 7px 12px;
}

.text-action {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 7px 4px;
  font-size: 12px;
  cursor: pointer;
}

.nav span {
  position: relative;
}

.nav span i {
  position: absolute;
  top: -7px;
  left: calc(50% + 6px);
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  border-radius: 99px;
  background: var(--orange);
  color: #fff;
  font: 800 10px/1 system-ui;
}

.message-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 14px 0 20px;
}

.message-switch .chip {
  width: 100%;
}

.social-section {
  margin: 0 0 26px;
}

.social-section > h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 18px;
}

.social-section > h2 span {
  color: var(--orange);
  font-size: 13px;
}

.friend-row,
.request-row,
.greeting-row {
  width: 100%;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.friend-row {
  cursor: pointer;
}

.friend-avatar {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 16px;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
}

.friend-row span,
.request-row > div,
.greeting-row > div {
  min-width: 0;
}

.friend-row b,
.friend-row small {
  display: block;
}

.friend-row small,
.request-row p,
.greeting-row p,
.greeting-row small {
  margin: 3px 0 0;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-row em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.friend-row em i {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  border-radius: 99px;
  background: var(--orange);
  color: white;
  font-style: normal;
  font-weight: 850;
}

.request-row,
.greeting-row {
  background: var(--card);
  border: 1px solid rgba(25, 33, 29, .08);
  border-radius: 18px;
  padding: 14px;
  margin-bottom: 10px;
}

.request-row {
  grid-template-columns: 48px minmax(0, 1fr);
}

.request-row .actions {
  margin-top: 10px;
}

.chat-head {
  display: grid;
  grid-template-columns: auto 48px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 5px 0 14px;
  border-bottom: 1px solid var(--line);
}

.chat-head h2,
.chat-head small {
  margin: 0;
}

.chat-head small {
  color: var(--muted);
}

.private-chat {
  min-height: 46dvh;
  padding: 16px 0 96px;
}

.private-message {
  width: fit-content;
  max-width: 82%;
  margin: 10px 0;
}

.private-message.mine {
  margin-left: auto;
  text-align: right;
}

.private-message small {
  color: var(--muted);
  font-size: 10px;
}

.private-message p {
  margin: 4px 0 0;
  padding: 10px 13px;
  border-radius: 5px 16px 16px 16px;
  background: var(--card);
  box-shadow: 0 7px 18px rgba(33, 43, 37, .06);
  text-align: left;
  overflow-wrap: anywhere;
}

.private-message.mine p {
  border-radius: 16px 5px 16px 16px;
  background: var(--ink);
  color: white;
}

.private-compose {
  position: fixed;
  left: 50%;
  bottom: var(--bottom-nav-height);
  z-index: 80;
  width: min(760px, 100%);
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(244, 241, 234, .98);
  border-top: 1px solid var(--line);
}

.private-compose input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--card);
  color: var(--ink);
  padding: 11px 13px;
  font: inherit;
  font-size: 16px;
}

.profile-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.profile-card .stat {
  grid-column: 1 / -1;
}

.avatar-upload {
  display: grid;
  gap: 6px;
  justify-items: center;
  cursor: pointer;
}

.avatar-upload > span {
  color: #fff;
  opacity: .75;
  font-size: 11px;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, .25);
  border-radius: 24px;
  background: #fff;
  color: var(--ink);
  font-size: 26px;
  font-weight: 950;
}

.admin-map-config {
  margin: 18px 0 30px;
}

.map-secret-status {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.map-secret-status span {
  color: var(--muted);
  text-align: right;
}

.secret-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.secret-input input {
  min-width: 0;
}

@media (max-width: 360px) {
  .friend-row,
  .request-row,
  .greeting-row {
    gap: 9px;
  }

  .nearby-actions .chip,
  .nearby-actions .primary {
    padding-left: 10px;
    padding-right: 10px;
  }
}
