/* App Top Bar (compartido) */
.app-top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 14px 32px;
  background: rgba(244,239,231,.92); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.app-top-nav { display: flex; gap: 4px; }
.app-top-item {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px; border-radius: 999px;
  font-size: 13px; color: var(--ink-2);
  position: relative;
  transition: background .15s, color .15s;
}
.app-top-item:hover { background: var(--paper-2); }
.app-top-item.active { background: var(--ink); color: white; }
.app-top-badge {
  background: var(--red); color: white; font-size: 10px;
  padding: 2px 6px; border-radius: 999px; margin-left: 4px;
  font-family: var(--mono);
}
.app-top-right { display: flex; gap: 10px; align-items: center; }
.app-top-icon {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: white; border: 1px solid var(--line);
  color: var(--ink-2);
}
.app-top-icon:hover { background: var(--paper-2); }
.app-top-avatar { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; border: 1.5px solid var(--line-2); }
.app-top-avatar .portrait { height: 100%; border-radius: 0; }
.app-top-avatar .portrait-init { font-size: 22px !important; }

/* Wall */
.wall-page { padding-bottom: 60px; }
.wall-header {
  max-width: 1240px; margin: 0 auto; padding: 40px;
  display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; align-items: end;
}
@media (max-width: 900px) { .wall-header { grid-template-columns: 1fr; padding: 30px 24px; } }
.wall-cta-card {
  background: white; padding: 22px; border-radius: var(--r-lg);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}

.wall-filters {
  max-width: 1240px; margin: 0 auto; padding: 0 40px 24px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px;
}
.wall-filter-group { display: flex; gap: 8px; flex-wrap: wrap; }

.wall-grid {
  max-width: 1240px; margin: 0 auto; padding: 0 40px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
@media (max-width: 1080px) { .wall-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 820px) { .wall-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .wall-grid { grid-template-columns: 1fr; padding: 0 24px; } }

.match-card {
  background: white; border-radius: var(--r-lg);
  overflow: hidden; cursor: pointer;
  border: 1px solid var(--line);
  transition: transform .25s cubic-bezier(0.2,0.8,0.2,1), box-shadow .25s;
}
.match-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }

.match-portrait { position: relative; aspect-ratio: 4/5; }
.match-portrait .portrait { border-radius: 0; height: 100%; }

.match-score {
  position: absolute; top: 12px; right: 12px;
  background: rgba(20,18,16,.85); backdrop-filter: blur(10px);
  color: white; padding: 8px 12px; border-radius: 12px;
  text-align: center;
}
.match-score-num { font-family: var(--serif); font-size: 24px; line-height: 1; letter-spacing: -0.02em; }
.match-score-lbl { font-size: 8px; letter-spacing: 0.1em; opacity: .7; margin-top: 2px; }

.match-badges {
  position: absolute; top: 12px; left: 12px;
  display: flex; flex-direction: column; gap: 6px;
}
.match-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 8px; border-radius: 999px;
  font-size: 10px; font-family: var(--mono); letter-spacing: 0.04em;
  backdrop-filter: blur(6px);
}
.verified-chip { background: rgba(74,93,58,.9); color: white; }
.signature-chip { background: rgba(184,147,90,.95); color: white; }

.match-body { padding: 16px 18px 18px; }
.match-name { margin-bottom: 4px; }
.match-meta { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink-3); flex-wrap: wrap; }
.match-meta svg { vertical-align: middle; margin-right: 2px; }
.match-tags { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 5px; }
.match-tag {
  font-size: 11px; padding: 3px 8px;
  background: var(--paper-2); border-radius: 999px;
  color: var(--ink-2);
}

.wall-note {
  max-width: 1240px; margin: 32px auto 0; padding: 0 40px;
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 12px; color: var(--ink-3);
}
.wall-note svg { color: var(--ink-4); margin-top: 3px; flex-shrink: 0; }

/* Profile view */
.profile-page { min-height: 100vh; background: var(--paper); padding-bottom: 60px; }
.profile-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 40px; border-bottom: 1px solid var(--line);
  background: rgba(244,239,231,.9); backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 5;
}
.profile-body {
  max-width: 1240px; margin: 0 auto; padding: 40px;
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 50px;
}
@media (max-width: 900px) { .profile-body { grid-template-columns: 1fr; padding: 24px; } }

.profile-hero {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow-md);
}
.profile-hero .portrait { border-radius: 0; height: 100% !important; aspect-ratio: unset; }
.profile-hero-badge {
  position: absolute; bottom: 16px; left: 16px;
  padding: 10px 14px; background: rgba(20,18,16,.72); backdrop-filter: blur(8px);
  border-radius: var(--r-sm);
}
.profile-hero-badge .verified { color: #a0c780; }
.profile-hero-badge .mono { color: rgba(255,255,255,.6) !important; }

.profile-thumbs {
  margin-top: 12px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
.profile-thumb {
  aspect-ratio: 1; border-radius: var(--r-sm); overflow: hidden;
  cursor: pointer; border: 2px solid transparent;
  transition: border-color .15s;
}
.profile-thumb.active { border-color: var(--red); }
.profile-thumb .portrait { border-radius: 0; height: 100%; aspect-ratio: 1; }

.profile-head { margin-bottom: 24px; }
.profile-meta { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--ink-3); margin-top: 8px; }
.profile-badges { display: flex; gap: 6px; margin-top: 14px; flex-wrap: wrap; }

.profile-score-card {
  background: white; border-radius: var(--r-lg); padding: 24px;
  border: 1px solid var(--line);
  display: grid; grid-template-columns: 200px 1fr; gap: 24px;
  align-items: center;
  margin-bottom: 24px;
}
@media (max-width: 700px) { .profile-score-card { grid-template-columns: 1fr; } }

.profile-score-bars { display: flex; flex-direction: column; gap: 8px; }
.pscore-row { display: grid; grid-template-columns: 100px 1fr 30px; gap: 12px; align-items: center; font-size: 13px; color: var(--ink-2); }
.pscore-bar { height: 4px; background: var(--paper-3); border-radius: 999px; overflow: hidden; }
.pscore-bar > div { height: 100%; background: var(--red); border-radius: 999px; }

.profile-tabs {
  display: flex; gap: 4px;
  border-bottom: 1px solid var(--line); margin-bottom: 24px;
}
.profile-tab {
  padding: 12px 4px; margin-right: 20px;
  font-size: 14px; color: var(--ink-3);
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.profile-tab.active { color: var(--ink); border-bottom-color: var(--red); }

.profile-tab-body { min-height: 180px; }
.profile-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.profile-ans { padding: 14px 0; border-bottom: 1px dashed var(--line); }
.profile-ans:last-child { border-bottom: 0; }

.profile-actions { margin-top: 30px; }
.profile-locked-cta {
  background: white; border: 1px solid var(--red);
  border-radius: var(--r-lg); padding: 20px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px;
  box-shadow: 0 8px 20px rgba(230,57,70,.08);
  flex-wrap: wrap;
}
.profile-locked-cta > div:first-child svg { color: var(--red); }
