[hidden] {
  display: none !important;
}

/* ——— Match hub shell ——— */

.match-hub {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.25rem 1.15rem 3rem;
}

.hub-head {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.1rem;
}

.hub-head h1 {
  font-size: clamp(1.6rem, 3.4vw, 2.15rem);
  line-height: 1.1;
  color: #fff;
}

.hub-sub {
  margin-top: 0.35rem;
  color: rgba(220, 225, 255, 0.7);
  font-size: 0.95rem;
}

.head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hub-search {
  margin-bottom: 0.9rem;
}

.hub-search-input {
  width: 100%;
  padding: 0.85rem 1.15rem;
  border-radius: 999px;
  border: 1px solid rgba(140, 160, 255, 0.28);
  background: rgba(8, 10, 22, 0.85);
  color: #fff;
  font-size: 1rem;
  font-family: inherit;
}

.hub-search-input:focus {
  outline: none;
  border-color: rgba(46, 203, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(46, 203, 255, 0.14);
}

/* ——— Tabs ——— */

.hub-tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid rgba(140, 160, 255, 0.18);
  margin-bottom: 1rem;
  overflow-x: auto;
}

.hub-tab {
  appearance: none;
  border: none;
  background: transparent;
  color: rgba(220, 225, 255, 0.62);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.7rem 1.1rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.18s, border-color 0.18s;
}

.hub-tab:hover {
  color: #eef2ff;
}

.hub-tab.is-active {
  color: #2ecbff;
  border-bottom-color: #2ecbff;
}

.hub-status {
  font-size: 0.9rem;
  color: rgba(220, 225, 255, 0.66);
  margin-bottom: 0.9rem;
}

.hub-panel {
  margin-bottom: 1.75rem;
}

.panel-title {
  font-size: 1.15rem;
  color: #fff;
  margin-bottom: 0.2rem;
}

.panel-sub {
  font-size: 0.9rem;
  color: rgba(220, 225, 255, 0.66);
}

.rail-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 0.9rem;
}

.same-city-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: rgba(220, 225, 255, 0.8);
  font-size: 0.9rem;
  cursor: pointer;
}

/* ——— Match cards ——— */

.match-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.match-card {
  display: flex;
  flex-direction: column;
  background: rgba(16, 18, 34, 0.78);
  border: 1px solid rgba(140, 160, 255, 0.18);
  border-radius: 18px;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.match-card:hover {
  transform: translateY(-3px);
  border-color: rgba(46, 203, 255, 0.45);
}

.match-card-media {
  position: relative;
  aspect-ratio: 16 / 11;
  background: #12141f;
}

.match-card-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.match-card-photo--empty {
  background: linear-gradient(135deg, #243b55 0%, #141e30 100%);
}

.match-badge {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  padding: 0.22rem 0.6rem;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.9);
  color: #04140d;
  backdrop-filter: blur(4px);
}

.match-card-body {
  padding: 0.85rem 0.9rem 0.5rem;
  flex: 1;
}

.match-card-body h3 {
  font-size: 1rem;
  color: #fff;
  margin-bottom: 0.2rem;
  line-height: 1.25;
}

.match-card-loc {
  font-size: 0.82rem;
  color: rgba(220, 225, 255, 0.6);
  margin-bottom: 0.5rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.5rem;
}

.tag {
  font-size: 0.71rem;
  font-weight: 600;
  padding: 0.18rem 0.5rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  color: #cbd5e1;
}

.tag--match {
  background: rgba(46, 203, 255, 0.16);
  color: #7dd3fc;
}

.match-card-common {
  font-size: 0.8rem;
  color: rgba(220, 225, 255, 0.55);
}

.match-card-actions {
  display: flex;
  gap: 0.45rem;
  padding: 0.5rem 0.9rem 0.9rem;
}

/* ——— Buttons ——— */

.btn-match {
  flex: 1;
  appearance: none;
  border: none;
  border-radius: 10px;
  padding: 0.5rem 0.7rem;
  font-family: inherit;
  font-size: 0.83rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  background: linear-gradient(90deg, #22d3ee, #3b82f6);
  color: #041018;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: filter 0.18s;
}

.btn-match:hover {
  filter: brightness(1.08);
}

.btn-match:disabled {
  opacity: 0.65;
  cursor: default;
}

.btn-match--ghost {
  background: transparent;
  border: 1px solid rgba(140, 160, 255, 0.35);
  color: #cbd5e1;
}

.btn-match--waiting {
  background: linear-gradient(90deg, #f59e0b, #ea580c);
  color: #1a0f05;
}

/* ——— Tier accents ——— */

.match-card.tier-excellent {
  border-color: rgba(52, 211, 153, 0.45);
}

.match-card.tier-strong {
  border-color: rgba(34, 211, 238, 0.4);
}

/* ——— Incoming request strip ——— */

.request-strip {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.request-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  padding: 0.8rem 1rem;
  border-radius: 14px;
  background: rgba(16, 18, 34, 0.72);
  border: 1px solid rgba(140, 160, 255, 0.22);
}

.request-photo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

.request-photo--empty {
  background: linear-gradient(135deg, #243b55 0%, #141e30 100%);
}

.request-text {
  flex: 1;
  min-width: 160px;
}

.request-text p {
  font-size: 0.9rem;
  color: #e2e8f0;
}

.request-meta {
  font-size: 0.8rem;
  color: rgba(220, 225, 255, 0.6);
  margin-top: 0.15rem;
}

.request-actions {
  display: flex;
  gap: 0.45rem;
}

.request-actions .btn-match {
  flex: 0 0 auto;
  min-width: 92px;
}

/* ——— Profile drawer ——— */

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 5, 12, 0.62);
  backdrop-filter: blur(3px);
  z-index: 60;
  animation: fadeIn 0.18s ease;
}

.person-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(420px, 100vw);
  z-index: 61;
  background: rgba(12, 14, 26, 0.98);
  border-left: 1px solid rgba(140, 160, 255, 0.22);
  display: flex;
  flex-direction: column;
  animation: slideIn 0.22s ease;
}

@keyframes slideIn {
  from {
    transform: translateX(24px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid rgba(140, 160, 255, 0.16);
}

.drawer-kicker {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(220, 225, 255, 0.6);
}

.drawer-close {
  appearance: none;
  border: none;
  background: transparent;
  color: rgba(220, 225, 255, 0.75);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.25rem;
}

.drawer-body {
  padding: 1.15rem;
  overflow-y: auto;
  flex: 1;
}

.drawer-top {
  display: flex;
  gap: 0.9rem;
  align-items: center;
  margin-bottom: 0.9rem;
}

.drawer-photo {
  width: 96px;
  height: 96px;
  border-radius: 16px;
  object-fit: cover;
  flex-shrink: 0;
}

.drawer-photo--empty {
  background: linear-gradient(135deg, #243b55 0%, #141e30 100%);
}

.drawer-top h3 {
  font-size: 1.2rem;
  color: #fff;
}

.drawer-match {
  color: #6ee7b7;
  font-weight: 700;
  font-size: 0.9rem;
  margin: 0.2rem 0;
}

.drawer-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(220, 225, 255, 0.55);
  margin: 1rem 0 0.4rem;
}

.drawer-text {
  font-size: 0.9rem;
  color: rgba(220, 225, 255, 0.8);
  line-height: 1.5;
}

.drawer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.4rem;
}

.match-reasons {
  font-size: 0.85rem;
  color: #a5b4fc;
  line-height: 1.4;
}

body.drawer-open {
  overflow: hidden;
}

/* ——— Feature strip ——— */

.feature-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  padding-top: 1.5rem;
  margin-top: 0.5rem;
  border-top: 1px solid rgba(140, 160, 255, 0.14);
}

.feature-item h3 {
  font-size: 0.95rem;
  color: #fff;
  margin-bottom: 0.25rem;
}

.feature-item p {
  font-size: 0.85rem;
  color: rgba(220, 225, 255, 0.6);
  line-height: 1.45;
}

/* ——— Profile setup gate ——— */

.setup-panel {
  background: rgba(16, 18, 34, 0.62);
  border: 1px solid rgba(140, 160, 255, 0.22);
  border-radius: 20px;
  padding: 1.25rem;
  backdrop-filter: blur(16px);
}

.photo-setup {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin: 1rem 0;
}

.photo-preview {
  width: 88px;
  height: 88px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  background-size: cover;
  background-position: center;
  border: 1px dashed rgba(125, 211, 252, 0.45);
  flex-shrink: 0;
}

.photo-preview.has-img {
  border-style: solid;
}

.photo-hint {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: rgba(220, 225, 255, 0.55);
}

.profile-setup-grid {
  display: grid;
  gap: 0.75rem;
  margin: 0.75rem 0;
}

@media (min-width: 720px) {
  .profile-setup-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.profile-setup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.interest-chips {
  list-style: none;
  margin: 0.5rem 0 1rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.interest-chip {
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.82rem;
  color: #cbd5e1;
}

.interest-chip button {
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  margin-left: 0.25rem;
  font-size: 1rem;
  line-height: 1;
}

/* ——— Shared legacy bits (person.html / connections.html) ——— */

.results-section-title {
  margin: 1.25rem 0 0.75rem;
  font-size: 1.15rem;
  color: #e2e8f0;
  letter-spacing: 0.02em;
}

.match-pill {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(34, 211, 238, 0.2);
  color: #67e8f9;
  vertical-align: middle;
}

.btn-request--ghost {
  background: transparent !important;
  border: 1px solid rgba(125, 211, 252, 0.45);
  color: #7dd3fc !important;
}

.btn-request--danger {
  background: rgba(248, 113, 113, 0.25) !important;
  color: #fecaca !important;
}

.group-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.person-profile-top {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.person-avatar {
  width: 88px;
  height: 88px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.person-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.mini-heading {
  font-size: 0.95rem;
  margin: 1rem 0 0.35rem;
  color: #94a3b8;
}

.match-line {
  color: #67e8f9;
  font-weight: 700;
  margin: 0.25rem 0;
}

.dm-messages {
  max-height: 280px;
  overflow-y: auto;
  margin: 0.75rem 0;
  padding: 0.75rem;
  border-radius: 12px;
  background: rgba(8, 10, 22, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.dm-bubble {
  margin: 0 0 0.5rem;
  font-size: 0.92rem;
  color: #e2e8f0;
}

.dm-bubble.mine {
  color: #a5f3fc;
}

.dm-form {
  display: flex;
  gap: 0.5rem;
}

.dm-form input {
  flex: 1;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 10, 22, 0.7);
  color: #fff;
}

.ok-msg {
  color: #7dffa0;
  margin-top: 0.75rem;
}

.back-link {
  display: inline-block;
  margin-bottom: 0.75rem;
  color: #7dd3fc;
  text-decoration: none;
  font-weight: 600;
}

/* ——— Connections list (All / Pending / Connected) ——— */

.conn-list {
  display: grid;
  gap: 0.6rem;
}

.conn-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  padding: 0.75rem 1rem;
  border-radius: 14px;
  background: rgba(16, 18, 34, 0.72);
  border: 1px solid rgba(140, 160, 255, 0.18);
}

.conn-photo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

.conn-photo--empty {
  background: linear-gradient(135deg, #243b55 0%, #141e30 100%);
}

.conn-info {
  flex: 1;
  min-width: 150px;
}

.conn-info h3 {
  font-size: 0.98rem;
  color: #fff;
}

.conn-meta {
  font-size: 0.8rem;
  color: rgba(220, 225, 255, 0.6);
  margin-top: 0.15rem;
}

.conn-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.conn-actions .btn-match {
  flex: 0 0 auto;
  min-width: 88px;
}

@media (max-width: 620px) {
  .match-card-actions {
    flex-direction: column;
  }
  .request-actions,
  .conn-actions {
    width: 100%;
  }
  .request-actions .btn-match,
  .conn-actions .btn-match {
    flex: 1;
  }
}
