/* CrossPaths dating profile page */
.page-profile .app-main {
  padding-bottom: 6rem;
}

.profile-back {
  margin: 0 0 1rem;
}

.profile-layout {
  display: grid;
  gap: 2rem;
}

@media (min-width: 900px) {
  .profile-layout {
    grid-template-columns: minmax(240px, 300px) 1fr;
    gap: 2.5rem;
    align-items: start;
  }
}

.profile-identity {
  text-align: center;
}

@media (min-width: 900px) {
  .profile-identity {
    position: sticky;
    top: 5rem;
    text-align: left;
  }
}

.profile-avatar {
  position: relative;
  width: min(220px, 70vw);
  aspect-ratio: 1;
  margin: 0 auto 1.25rem;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
}

@media (min-width: 900px) {
  .profile-avatar {
    margin-left: 0;
  }
}

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

.profile-avatar__zoom {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  color: inherit;
  font: inherit;
}

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

.profile-avatar__placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse 70% 60% at 50% 40%, rgba(212, 165, 116, 0.14), transparent 70%),
    linear-gradient(160deg, #141418, #0a0a0b);
  color: var(--accent);
}

.profile-avatar__paths {
  width: 72%;
  height: 72%;
  opacity: 0.9;
}

.profile-avatar__actions {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.65rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
}

.profile-avatar__upload {
  cursor: pointer;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.55) !important;
  background: rgba(0, 0, 0, 0.35) !important;
}

.profile-avatar__upload:hover {
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.85) !important;
  background: rgba(0, 0, 0, 0.5) !important;
}

.profile-name {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-weight: 750;
  font-size: clamp(1.6rem, 3vw, 2rem);
  letter-spacing: -0.03em;
}

.profile-paused-note {
  margin: 0 0 0.85rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(212, 165, 116, 0.4);
  background: rgba(212, 165, 116, 0.12);
  color: var(--accent-hot);
  font-size: 0.88rem;
}

.profile-age {
  font-weight: 600;
  color: var(--ink-soft);
}

.profile-city {
  margin: 0 0 1rem;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-pencil {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.btn-pencil:hover {
  color: var(--accent);
  border-color: rgba(212, 165, 116, 0.35);
  background: rgba(212, 165, 116, 0.08);
}

.profile-bio-block {
  margin: 0 0 1.15rem;
  text-align: left;
}

.profile-bio-block__title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 650;
  color: var(--ink-soft);
}

.field--bio textarea {
  min-height: 5.5rem;
  resize: vertical;
}

.field__label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.profile-facts,
.profile-lifestyle {
  margin: 0 0 0.35rem;
  color: var(--ink-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.profile-section {
  margin: 0 0 2.25rem;
  padding: 1.35rem 1.25rem 1.45rem;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background: var(--bg-elevated);
}

.profile-section h2 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.profile-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.profile-grid {
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 640px) {
  .profile-grid {
    grid-template-columns: 1fr 1fr;
  }
  .profile-grid__wide {
    grid-column: 1 / -1;
  }
}

/* Height slider */
.field--slider {
  margin-bottom: 1.15rem;
}

.field__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.field__row strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.field--slider input[type="range"] {
  width: 100%;
  height: 0.35rem;
  appearance: none;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(212, 165, 116, 0.35), rgba(255, 255, 255, 0.08));
  outline: none;
  cursor: pointer;
}

.field--slider input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #1a1612;
  box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.25);
  cursor: grab;
}

.field--slider input[type="range"]::-moz-range-thumb {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #1a1612;
  box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.25);
  cursor: grab;
}

.slider-ends {
  display: flex;
  justify-content: space-between;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--ink-muted);
}

/* Children / lifestyle toggles */
.toggle-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.35rem;
}

.toggle-group__label {
  margin: 0 0 0.4rem;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.toggle-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

@media (max-width: 520px) {
  .toggle-pair {
    grid-template-columns: 1fr;
  }
}

.toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  text-align: center;
  font-size: 0.88rem;
  color: var(--ink-soft);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
  min-height: 2.75rem;
}

.toggle-btn input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-btn:has(input:checked),
.toggle-btn.is-on {
  border-color: rgba(212, 165, 116, 0.55);
  background: rgba(212, 165, 116, 0.12);
  color: var(--ink);
}

.toggle-btn:hover {
  border-color: rgba(212, 165, 116, 0.35);
}

.chip-group--wrap {
  flex-wrap: wrap;
}

.chip--check {
  margin-top: 0.75rem;
  display: inline-flex;
}

.char-count {
  display: block;
  margin-top: 0.35rem;
  color: var(--ink-muted);
  font-size: 0.8rem;
  text-align: right;
}

.city-select {
  width: 100%;
  margin-top: 0.65rem;
  min-height: 12rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  padding: 0.35rem;
}

.city-select option {
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
}

.field-input {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  padding: 0.75rem 0.9rem;
  font: inherit;
}

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

.field-input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.interest-cat {
  margin-top: 1.15rem;
}

.interest-cat__title {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 650;
  color: var(--ink-soft);
}

.interest-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.interest-tiles--compact {
  margin-top: 0.25rem;
}

@media (min-width: 640px) {
  .interest-tiles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .interest-tiles {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.interest-tile {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.65rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--ink-soft);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
  min-width: 0;
}

.interest-tile input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.interest-tile:hover {
  border-color: rgba(212, 165, 116, 0.35);
}

.interest-tile.is-selected {
  border-color: rgba(212, 165, 116, 0.55);
  background: rgba(212, 165, 116, 0.1);
  color: var(--ink);
}

.interest-tile__emoji {
  flex-shrink: 0;
  font-size: 1.05rem;
  line-height: 1;
}

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

.interest-tiles--view .interest-tile,
.interest-selected .interest-tile {
  cursor: default;
}

.interest-catalog {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.interest-empty {
  margin: 0;
}

.profile-interest-count {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  color: var(--accent);
}

.profile-bio {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.65;
  white-space: pre-wrap;
}

.lifestyle-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.lifestyle-chip {
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.88rem;
  color: var(--ink-soft);
}

/* CrossPath world network (viewing other profile) */
.profile-section--world {
  overflow: hidden;
}

.world-net {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1.15fr) 28px minmax(0, 1fr);
  gap: 0.35rem;
  align-items: start;
  margin-top: 0.35rem;
}

.world-net__col--mine {
  transform: rotate(-2.5deg);
  transform-origin: top center;
}

.world-net__col--theirs {
  transform: rotate(2.5deg);
  transform-origin: top center;
}

.world-net__col--shared {
  position: relative;
  z-index: 2;
}

.world-net__label {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-align: center;
}

.world-net__label--gold {
  color: var(--accent);
}

.world-net__nodes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.world-net__empty {
  margin: 0;
  padding: 0.65rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--ink-muted);
  border: 1px dashed var(--line);
  border-radius: 12px;
}

.world-net__bridge {
  align-self: stretch;
  min-height: 8rem;
  color: var(--accent);
  opacity: 0.7;
  display: flex;
  align-items: center;
}

.world-net__bridge svg {
  width: 100%;
  height: 100%;
  min-height: 8rem;
}

.world-node {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.65rem 0.7rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  min-width: 0;
}

.world-node__link {
  display: contents;
  color: inherit;
  text-decoration: none;
}

a.world-node__link:hover .world-node__name {
  color: var(--accent);
}

.world-node__icons {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-bottom: 0.15rem;
}

.world-node__icons .place-icon {
  margin-bottom: 0;
}

.world-node .place-partner-chip {
  margin: 0;
  width: 1.15rem;
  height: 1.15rem;
  font-size: 0.7rem;
}

.world-node .place-icon {
  width: 1.15rem;
  height: 1.15rem;
  color: var(--ink-muted);
  margin-bottom: 0.15rem;
}

.world-node__name {
  font-size: 0.88rem;
  font-weight: 550;
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.world-node__meta {
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.world-node--mine {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(244, 241, 234, 0.14);
}

.world-node--mine .world-node__name {
  color: rgba(244, 241, 234, 0.78);
}

.world-node--shared {
  border-color: rgba(212, 165, 116, 0.55);
  background:
    radial-gradient(ellipse 80% 70% at 50% 30%, rgba(212, 165, 116, 0.22), transparent 70%),
    rgba(212, 165, 116, 0.1);
  box-shadow:
    0 0 0 1px rgba(212, 165, 116, 0.15),
    0 0 22px rgba(212, 165, 116, 0.22);
}

.world-node--shared .place-icon,
.world-node--shared .world-node__name {
  color: var(--accent-hot);
}

.world-node--shared .world-node__name {
  font-family: var(--font-display);
  font-weight: 650;
  white-space: normal;
}

.world-node--theirs {
  filter: blur(3.5px);
  opacity: 0.92;
  user-select: none;
  pointer-events: none;
  border-color: rgba(244, 241, 234, 0.22);
  background: rgba(244, 241, 234, 0.12);
  min-height: 2.75rem;
}

.world-node--theirs .world-node__name {
  color: rgba(244, 241, 234, 0.85);
  letter-spacing: 0.04em;
}

.world-node--theirs .place-icon {
  display: block;
  opacity: 0.75;
  color: rgba(244, 241, 234, 0.7);
}

.world-net__legend {
  margin: 1rem 0 0;
  text-align: center;
}

/* Mobile: compact chip rows, no bridge lines */
@media (max-width: 720px) {
  .profile-section--world {
    margin-bottom: 0.75rem;
  }

  .profile-section--world .profile-section__head {
    margin-bottom: 0.55rem;
  }

  .world-net {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 0;
  }

  .world-net__bridge {
    display: none;
  }

  .world-net__col--mine,
  .world-net__col--theirs,
  .world-net__col--shared {
    transform: none !important;
  }

  .world-net__label {
    margin: 0 0 0.3rem;
    text-align: left;
    font-size: 0.68rem;
  }

  .world-net__nodes {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.3rem;
  }

  .world-net__empty {
    padding: 0.4rem 0.55rem;
    font-size: 0.75rem;
    border-radius: 8px;
    width: 100%;
  }

  .world-node {
    flex-direction: row;
    align-items: center;
    gap: 0.3rem;
    padding: 0.32rem 0.5rem;
    border-radius: 999px;
    max-width: 100%;
  }

  .world-node .place-icon {
    display: none;
  }

  .world-node__name {
    font-size: 0.78rem;
    font-weight: 500;
    max-width: 9.5rem;
  }

  .world-node__meta {
    display: none;
  }

  .world-node--mine {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(244, 241, 234, 0.18);
  }

  .world-node--shared {
    box-shadow: none;
    background: rgba(212, 165, 116, 0.16);
    border-color: rgba(212, 165, 116, 0.45);
  }

  .world-node--shared .world-node__name {
    font-family: inherit;
    font-weight: 600;
    white-space: nowrap;
    color: var(--accent);
  }

  .world-node--theirs {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    padding: 0.55rem 0.65rem;
    border-radius: 12px;
    min-width: 5.5rem;
    max-width: 7.5rem;
    filter: blur(2.8px);
    opacity: 0.95;
    background: rgba(244, 241, 234, 0.16);
    border-color: rgba(244, 241, 234, 0.28);
  }

  .world-node--theirs .place-icon {
    display: block;
    width: 0.95rem;
    height: 0.95rem;
    margin: 0;
    opacity: 0.85;
    color: rgba(244, 241, 234, 0.8);
  }

  .world-node--theirs .world-node__name {
    max-width: 100%;
    font-size: 0.75rem;
    color: rgba(244, 241, 234, 0.9);
  }
}

@media (prefers-reduced-motion: reduce) {
  .world-net__col--mine,
  .world-net__col--theirs {
    transform: none;
  }
}

.profile-savebar {
  position: fixed;
  z-index: 60;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
  background: rgba(16, 16, 20, 0.94);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.profile-savebar[hidden] {
  display: none !important;
}

.profile-savebar__msg {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.profile-toast {
  position: fixed;
  z-index: 70;
  left: 50%;
  bottom: 5.5rem;
  transform: translateX(-50%);
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: var(--accent);
  color: #14110e;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 0.88rem;
  box-shadow: 0 8px 28px var(--accent-glow);
}

.profile-toast[hidden] {
  display: none !important;
}

/* Dashboard profile edit affordance */
.dash-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.dash-card__head h2 {
  margin: 0;
}

.btn-edit {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}

.btn-edit:hover {
  color: var(--ink);
  border-color: rgba(212, 165, 116, 0.4);
}

.btn-edit svg {
  width: 14px;
  height: 14px;
}

.profile-chat-wrap {
  margin: 0.85rem 0 0;
}

.profile-crosspath-wrap {
  margin: 0.55rem 0 0;
}

.profile-crosspath-wrap .btn--dark {
  display: inline-flex;
  background: #000;
  border-color: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.profile-crosspath-wrap .btn--dark:hover {
  background: #111;
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.profile-remove-wrap {
  margin: 0.85rem 0 0;
}

.profile-remove-connection {
  font-size: 0.88rem;
  color: var(--ink-muted);
}

.profile-remove-connection:hover {
  color: var(--ink-soft);
}

.profile-report-wrap {
  margin: 0.55rem 0 0;
}

.profile-report-btn {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 0.88rem;
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

.profile-report-btn:hover {
  color: var(--ink);
}

.profile-admin-delete-wrap {
  margin: 0.4rem 0 0;
}

.profile-admin-delete {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 0.82rem;
  color: rgba(200, 120, 110, 0.85);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

.profile-admin-delete:hover {
  color: rgba(230, 140, 125, 0.95);
}

.report-reason-list {
  display: grid;
  gap: 0.4rem;
  margin: 0.75rem 0 1rem;
}

.report-reason {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.report-reason:hover {
  background: rgba(255, 255, 255, 0.03);
}

.report-reason:has(input:checked) {
  border-color: rgba(212, 165, 116, 0.35);
  background: rgba(212, 165, 116, 0.08);
  color: var(--ink);
}

.report-block-option {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0.75rem 0 0.25rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
  cursor: pointer;
}
