/* Me screen: extra photos. */
.more-photos {
  margin-top:22px
}

.own-photo-grid {
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(84px,1fr));
  gap:14px
}

.own-photo {
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:5px
}

.own-photo-image {
  width:100%;
  aspect-ratio:1;
  border-radius:12px;
  overflow:hidden;
  background:#12222e
}

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

.own-photo-actions {
  display:flex;
  align-items:center;
  gap:2px
}

.own-photo-actions .icon-button {
  width:36px;
  font-size:14px
}

.own-photo-actions .text-button {
  font-size:11px
}

.own-photo .subdued {
  font-size:10px
}

.add-photo {
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
  aspect-ratio:1;
  border:1px dashed #3a5262;
  border-radius:12px;
  color:#7d97a8;
  cursor:pointer
}

.add-photo span {
  font-size:22px;
  line-height:1
}

.add-photo small {
  font-size:10px
}





.danger-text {
  color:#f6a6a6
}

[data-delete-account] {
  display:block;
  width:100%;
  min-height:44px;
  font-size:11px
}

/* The three account links (Sign out, Download my data, Delete account) line up the same way. */
.logout-form .text-button,
a.text-button[download] {
  display:block;
  width:100%;
  text-align:center;
  min-height:44px
}

#delete-account-form .danger-button {
  margin-bottom:env(safe-area-inset-bottom)
}

.danger-button {
  background:#eab1af;
  color:#381310
}

.introduction-copy {
  margin:20px 0;
  padding:16px;
  background:#1b303e;
  border-radius:14px;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  font-size:14px;
  line-height:1.6;
  text-align:left
}

/* Range gesture and uncluttered radar readouts. */
.direction-stage,.direction-stage .bubble-hit {
  touch-action:none
}

.compass-field {
  width:calc(100% - 72px);
  max-width:388px
}

.radar-side-labels {
  position:absolute;
  inset:auto 0 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  z-index:4;
  pointer-events:none;
  font:11px ui-monospace,SFMono-Regular,monospace;
  color:#b7e8ef
}

.range-readout {
  pointer-events:auto;
  min-width:34px;
  min-height:44px;
  padding:3px;
  text-align:center;
  font:inherit
}

.range-readout small {
  display:block;
  font-size:9px;
  margin-top:2px;
  color:#7197a8
}


.dot-rings .range-ring {
  fill:none;
  stroke:#4cd8e8;
  stroke-width:1
}

.dot-rings .range-ring.dotted {
  stroke-dasharray:1 3;
  opacity:.5
}

.dot-rings .range-ring.solid {
  opacity:1
}

.compass-caption {
  display:none
}

.radar-map path {
  vector-effect:non-scaling-stroke
}

/* True arcs: bubbles keep a bearing-independent radius, so close ones swing down beside the radar.
   The stack no longer clips them; the stage does, and the side fade comes from each bubble's own opacity. */
.direction-stage {
  position:relative;
  overflow:hidden
}

.profile-arc {
  overflow:visible;
  mask-image:none;
  -webkit-mask-image:none
}

/* Chat photo bar and request cards. */
.photo-bar {
  display:flex;
  flex-wrap:nowrap;
  align-items:center;
  justify-content:space-between;
  gap:6px 10px;
  flex:none;
  padding:8px 4px;
  border-bottom:1px solid var(--line);
  font-size:12px;
  color:var(--muted)
}

.chat-wait .photo-bar {
  justify-content:center;
  border:0;
  margin:6px 0 4px
}

.photo-toggle,.photo-status {
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:32px;
  min-width:0;
  white-space:nowrap;
  padding:0 10px;
  border-radius:16px;
  font:inherit;
  color:var(--muted);
  background:#12222e;
  border:1px solid #2c4252
}

.photo-toggle {
  color:var(--ice);
  cursor:pointer
}

.photo-toggle.on {
  color:#0f2330;
  background:var(--ice);
  border-color:var(--ice)
}

.lock {
  width:9px;
  height:11px;
  border:1.5px solid currentColor;
  border-radius:2px;
  position:relative;
  flex:none;
  margin-top:3px
}

.lock::before {
  content:"";
  position:absolute;
  left:1px;
  top:-6px;
  width:5px;
  height:6px;
  border:1.5px solid currentColor;
  border-bottom:0;
  border-radius:4px 4px 0 0
}

.lock.open::before {
  transform:translateX(-4px) rotate(-25deg)
}

.intro-card {
  text-align:left;
  margin:18px 0 6px
}

.intro-label {
  display:block;
  font-size:11px;
  letter-spacing:.6px;
  text-transform:uppercase;
  color:var(--muted);
  margin:0 4px 6px
}

.chat-wait .introduction-copy {
  margin:0
}

.chat-wait .primary {
  margin-top:18px
}

/* Faint map behind the bubble stack, same projection as the bubbles, rotating with the view. */
.stack-map-layer {
  position:absolute;
  left:0;
  top:0;
  width:100%;
  pointer-events:none;
  z-index:0;
  opacity:.5;
  mask-image:linear-gradient(to bottom,transparent,#000 12%,#000 100%);
  -webkit-mask-image:linear-gradient(to bottom,transparent,#000 12%,#000 100%)
}

.stack-map {
  display:block;
  width:100%;
  height:100%;
  fill:none;
  stroke-linecap:round;
  stroke-linejoin:round
}

.stack-map path {
  vector-effect:non-scaling-stroke
}

.stack-map .map-road {
  stroke-width:1.3;
  opacity:.95
}

.stack-map .map-coast {
  stroke-width:1.4
}

.stack-map .map-water {
  stroke-width:1
}

/* Status colours. Green: online. Red: a chat, or a profile pic unlocked either way. Neutral cyan otherwise. */
.arc-profile .avatar {
  margin-bottom:0;
  border-width:1.5px
}









/* Installed on a phone: draw under the status bar and home indicator, and keep the header clear of the notch. */
html {
  height:100%;
  background:var(--bg)
}

.app-header {
  box-sizing:content-box;
  padding-top:env(safe-area-inset-top);
  position:sticky;
  top:0;
  z-index:6
}

/* Profile stats, combined profile + introduction sheet, grid online dot, chat composer pinned to the bottom. */
.no-name {
  color:var(--muted);
  font-weight:500
}

.hint {
  color:var(--muted);
  font-weight:400;
  font-size:12px
}

.stats {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px 14px;
  margin:14px 0 6px;
  padding:0
}

.stats div {
  display:flex;
  flex-direction:column;
  gap:2px
}

.stats dt {
  font-size:11px;
  letter-spacing:.5px;
  text-transform:uppercase;
  color:var(--muted)
}

.stats dd {
  margin:0;
  font-size:14px
}

.eyebrow .dot.online {
  display:inline-block;
  width:7px;
  height:7px;
  border-radius:50%;
  background:#4fe08a;
  margin-right:6px;
  vertical-align:middle
}

.intro-inline {
  margin-top:16px;
  text-align:left
}

.intro-inline label {
  display:block;
  margin:0 0 8px;
  font-size:13px
}

.intro-inline .primary {
  margin-top:12px;
  width:100%
}

.stats-field .stat-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:6px 12px;
  align-items:center
}

.stats-field .stat-grid label {
  margin:0;
  font-size:13px
}

.stats-field .stat-grid select,.stats-field .stat-grid input[type=number] {
  width:100%;
  font:inherit;
  color:var(--ink);
  background:#122330;
  border:1px solid #3c4e5d;
  border-radius:10px;
  padding:9px 10px;
  font-size:15px
}

.stats-field .stat-toggle {
  grid-column:1 / -1;
  padding:4px 0 8px
}

.stats-field legend span {
  display:block;
  font-size:12px;
  color:var(--muted);
  font-weight:400
}

.stats-field fieldset {
  border:0;
  padding:0;
  margin:14px 0 0
}

.stats-field fieldset legend {
  font-size:14px;
  margin-bottom:8px
}

.counter {
  margin:4px 2px 0;
  font-size:11px;
  color:var(--muted);
  text-align:right
}



.avatar-button {
  background:none;
  border:0;
  padding:0;
  cursor:pointer;
  display:flex
}

main:has(.conversation) {
  padding-bottom:var(--nav-h,calc(69px + env(safe-area-inset-bottom)))
}

.conversation {
  height:calc(100dvh - 44px - env(safe-area-inset-top) - var(--nav-h,calc(69px + env(safe-area-inset-bottom))) - 2px);
  min-height:0;
  overflow:hidden
}

.composer {
  flex:none;
  padding-bottom:6px
}


/* Profile sheet: big photo, photo strip with locks, info below. */
.hero-photo {
  margin:6px -4px 10px;
  border-radius:18px;
  overflow:hidden;
  background:#0f1e2a
}

.hero-photo.empty {
  display:flex;
  justify-content:center;
  padding:22px 0 8px;
  background:none
}

.avatar.hero-square {
  width:100%;
  height:auto;
  aspect-ratio:1;
  border-radius:0;
  border:0
}

.photo-strip {
  display:flex;
  gap:8px;
  overflow-x:auto;
  padding:2px 2px 6px;
  scrollbar-width:none
}

.thumb {
  flex:none;
  width:58px;
  height:58px;
  border-radius:12px;
  overflow:hidden;
  padding:0;
  border:2px solid transparent;
  background:#12222e;
  display:flex;
  align-items:center;
  justify-content:center
}

.thumb.current {
  border-color:var(--ice)
}

.thumb .avatar.thumb-photo {
  width:100%;
  height:100%;
  border-radius:0;
  border:0
}

.thumb.locked {
  color:#7d97a8;
  border:1px dashed #3a5262;
  background:repeating-linear-gradient(135deg,#132431 0 6px,#0f1d28 6px 12px)
}

.thumb.locked .lock {
  width:11px;
  height:13px
}

.photo-note {
  margin:0 2px 8px;
  font-size:12px;
  color:var(--muted)
}

.profile-top.compact {
  padding-top:2px
}

/* Presence: green = online, grey = seen within 24 hours (older ones are offline and not shown at all). */




.grid-mutual {
  right:auto;
  left:8px
}






/* Sheet dismiss by dragging the handle down. */
.sheet-handle {
  height:4px;
  width:35px;
  margin:0 auto 21px;
  position:relative
}

.sheet-handle::before {
  content:"";
  position:absolute;
  inset:-14px -60px -18px
}

dialog {
  touch-action:pan-y;
  will-change:transform
}

.sheet-handle,.sheet-handle::before {
  touch-action:none;
  cursor:grab
}

dialog:focus {
  outline:none
}

/* ⋯ menu holding Block / Report (and View profile in a chat). */
.more-button {
  position:absolute;
  right:60px;
  top:16px;
  width:44px;
  height:44px;
  font-size:22px;
  color:#b4c5d2;
  background:none;
  border:0;
  letter-spacing:1px
}

.conversation-header {
  position:relative
}

.more-menu {
  position:absolute;
  right:14px;
  top:58px;
  z-index:8;
  min-width:160px;
  padding:6px;
  border-radius:14px;
  background:#0f1c27;
  border:1px solid #33475a;
  box-shadow:0 14px 34px #00000080
}

.conversation-header .more-menu {
  top:46px;
  right:0
}

.more-menu button {
  display:block;
  width:100%;
  text-align:left;
  padding:11px 12px;
  border:0;
  border-radius:9px;
  background:none;
  color:var(--ink);
  font:inherit;
  font-size:15px
}

.more-menu button:hover {
  background:#18293a
}

.more-menu [data-block],.more-menu [data-report] {
  color:#f6a6a6
}

/* Keep the hero photo clear of the X and ⋯ buttons. */
.hero-photo {
  margin-top:48px
}

.hero-photo.empty {
  margin-top:14px
}

.bio {
  white-space:pre-line;
  text-align:left
}

/* Photo messages. */
.composer .attach {
  flex:none;
  width:46px;
  height:46px;
  padding:0;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  border:1px solid var(--line);
  background:var(--panel2);
  color:var(--ice);
  cursor:pointer
}

.composer .attach svg {
  width:22px;
  height:22px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.7;
  stroke-linecap:round;
  stroke-linejoin:round
}

.composer .voice-record {
  flex:none;
  width:46px;
  height:46px;
  padding:0;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  border:1px solid var(--line);
  background:var(--panel2);
  color:var(--ice);
  cursor:pointer
}

.composer .voice-record[aria-pressed="true"] {
  color:#ff9f9f;
  border-color:#ff9f9f;
  box-shadow:0 0 0 3px #ff9f9f25
}

.composer .voice-record svg {
  width:22px;
  height:22px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.7;
  stroke-linecap:round;
  stroke-linejoin:round
}

.voice-recorder {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:9px;
  margin:8px 0 2px;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:15px;
  background:#102633;
  color:var(--muted);
  font-size:12px
}

.voice-recorder[hidden] {
  display:none
}

.voice-recorder .voice-status {
  flex:1 1 150px;
  min-width:0
}

.voice-recorder .voice-actions {
  display:flex;
  align-items:center;
  gap:7px
}

.voice-recorder .voice-actions button {
  min-height:36px;
  padding:7px 12px;
  border-radius:10px
}

.voice-recorder audio {
  display:block;
  width:min(100%, 330px);
  height:40px;
  flex:1 1 100%;
  min-width:0
}

.voice-recorder .voice-error {
  flex:1 1 100%;
  margin:0;
  color:#ffb0b0;
  line-height:1.45
}

.msg-row.voice-row .bubble.voice {
  min-width:0;
  padding:8px 10px
}

.voice-player {
  width:min(246px,68vw);
  min-height:42px;
  display:grid;
  grid-template-columns:38px minmax(0,1fr) 36px;
  align-items:center;
  gap:7px
}

.voice-player audio {display:none}

.voice-toggle {
  width:38px;
  min-height:38px;
  padding:0;
  display:grid;
  place-items:center;
  border:0;
  border-radius:50%;
  background:#8fe7ff;
  color:#09202d
}

.voice-toggle svg {width:18px;height:18px;fill:currentColor}
.voice-pause-icon,.voice-player.playing .voice-play-icon {display:none}
.voice-player.playing .voice-pause-icon {display:block}
.voice-progress {position:relative;height:32px;display:flex;align-items:center}
.voice-wave {position:absolute;inset:7px 2px;display:flex;align-items:center;justify-content:space-between;pointer-events:none;opacity:.52}
.voice-wave i {width:2px;height:calc(5px + var(--bar)*.75px);border-radius:2px;background:#83a9ba}
.voice-progress input {
  position:relative;
  z-index:1;
  width:100%;
  height:32px;
  margin:0;
  opacity:.01;
  cursor:pointer
}
.voice-progress::after {content:'';position:absolute;left:2px;right:2px;bottom:2px;height:2px;border-radius:2px;background:linear-gradient(90deg,#8fe7ff var(--played,0%),#46606d var(--played,0%));pointer-events:none}
.voice-clock {font-variant-numeric:tabular-nums;font-size:11px;color:var(--muted);text-align:right}
.voice-player.failed::after {content:'Tap again';grid-column:1/-1;color:#ffb0b0;font-size:10px;text-align:center}
.voice-recorder .voice-player {flex:1 1 100%;width:100%}
.voice-recorder .voice-player audio {display:none}

.bubble.photo {
  padding:4px;
  max-width:48%;   /* two thirds of the old 72% (John, 2026-09-11) */
  background:#12222e;
  overflow:hidden
}

.bubble.photo img {
  display:block;
  width:100%;
  border-radius:12px
}

/* Timestamps, date dividers, delivered/read, typing, unread badges, archive, tap, and the chat-photo blur. */
.date-divider {
  text-align:center;
  align-self:center;
  font-size:11px;
  color:var(--muted);
  margin:8px 0 2px
}

.date-divider span {
  background:var(--panel2);
  padding:3px 11px;
  border-radius:20px
}

.bubble-time {
  display:block;
  font-size:10px;
  margin-top:4px;
  opacity:.6
}

.bubble.outgoing .bubble-time {
  text-align:right;
  color:#12273499
}

.bubble.photo .bubble-time {
  position:absolute;
  right:8px;
  bottom:6px;
  background:#0007;
  color:#fff;
  padding:1px 6px;
  border-radius:8px;
  opacity:1
}

.bubble.photo {
  position:relative
}

.msg-status {
  align-self:flex-end;
  font-size:11px;
  color:var(--muted);
  margin-top:-6px
}

.typing-bubble {
  display:flex;
  gap:4px;
  align-items:center;
  padding:14px 16px
}

.typing-bubble span {
  width:6px;
  height:6px;
  border-radius:50%;
  background:var(--muted);
  animation:typing-dot 1.2s infinite
}

.typing-bubble span:nth-child(2) {
  animation-delay:.2s
}

.typing-bubble span:nth-child(3) {
  animation-delay:.4s
}

@keyframes typing-dot {
  0%,60%,100% {
    opacity:.3;
    transform:translateY(0)
  }
  30% {
    opacity:1;
    transform:translateY(-3px)
  }
}

@media(prefers-reduced-motion: reduce) {
  .typing-bubble span {
    animation:none;
    opacity:.7
  }
}

.unread-badge {
  flex:none;
  min-width:20px;
  height:20px;
  padding:0 6px;
  border-radius:10px;
  background:var(--ice);
  color:#132734;
  font-size:11px;
  font-weight:650;
  display:flex;
  align-items:center;
  justify-content:center
}

.archived-section {
  margin-top:20px
}

.archived-section summary {
  list-style:none;
  cursor:pointer;
  font-size:13px;
  font-weight:550;
  color:#b5c6d2;
  padding:8px 0
}

.archived-section summary::-webkit-details-marker {
  display:none
}

.archived-section summary::before {
  content:"›";
  display:inline-block;
  margin-right:6px;
  transition:transform .15s
}

.archived-section[open] summary::before {
  transform:rotate(90deg)
}

.archived-section summary span {
  color:var(--ice);
  margin-left:6px
}



.grid-cell {
  position:relative
}

.grid-cell>.grid-profile {
  width:100%
}



/* Full-width radar and map on phones; heights from the real visible viewport; keyboard-aware chat. */
.app-shell {
  border-inline:0
}

main:has(.direction-stage) {
  padding:0
}

.discover:has(.direction-stage) {
  height:calc(var(--vvh,100dvh) - 44px - env(safe-area-inset-top) - var(--nav-h,calc(69px + env(safe-area-inset-bottom))))
}

.discover:has(.direction-stage)>.discovery-filters {
  padding:0 14px
}

.profile-arc {
  margin:0;
  width:100%
}

.compass-field {
  width:calc(100% - 72px);
  max-width:none
}

.conversation {
  height:calc(var(--vvh,100dvh) - 44px - env(safe-area-inset-top) - var(--nav-h,calc(69px + env(safe-area-inset-bottom))) - 2px)
}

/* The first hello is the main profile action; photo sharing stays a separate choice. */
.profile-first-contact.tap-flavours {
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:8px;
  margin:12px 0;
}

.profile-first-contact .tap-main.primary {
  min-height:54px;
  font-size:1.05rem;
  border:0;
  background:var(--ice);
  color:#12232f;
  font-weight:700;
}

.profile-first-contact .greeting-note {
  color:var(--muted);
  line-height:1.4;
}

.profile-first-contact.tap-flavours .flavour-chips {
  justify-content:flex-start;
}

/* These notes float within the radar scene so they do not shorten its viewport-sized map. */
.direction-stage>.radar-context-note,
.direction-stage>.location-recovery {
  position:absolute;
  z-index:45;
  inset-inline:8px;
  top:8px;
  max-width:560px;
  margin:0 auto;
  box-sizing:border-box;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:7px 10px;
  border-radius:12px;
  background:var(--panel2,rgba(18,24,32,.96));
  box-shadow:0 3px 14px rgba(0,0,0,.18);
}

.direction-stage>.location-recovery {
  flex-direction:column;
  align-items:stretch;
}

.direction-stage>.location-recovery [data-location-try] {
  align-self:flex-start;
  width:auto;
}

.location-recovery p {
  margin:3px 0 0;
}

.location-recovery [data-location-try] {
  flex:none;
  min-height:40px;
}

body.keyboard-open .bottom-nav {
  display:none
}

body.keyboard-open main:has(.conversation) {
  position:fixed;
  left:0;
  right:0;
  top:var(--vvtop,0px);
  height:min(var(--vvh,100dvh),100dvh);
  padding:0;
  overflow:hidden;
  z-index:7
}

body.keyboard-open .conversation {
  position:static;
  height:100%;
  min-height:0;
  margin:0;
  padding:max(6px,env(safe-area-inset-top)) 7px 0;
  background:var(--bg);
  overflow:hidden
}

body.keyboard-open .app-header {
  display:none
}

body.keyboard-open .message-stream {
  min-height:0
}

body.keyboard-open {
  overflow:hidden
}
