/* =============================================
   Yui — Profile page
   ============================================= */

.profile-page {
  padding: var(--space-2xl) 0 var(--space-3xl);
  position: relative;
  z-index: 1;
}

.profile-hero {
  text-align: center;
  margin-bottom: var(--space-xl);
}
.profile-hero h1 {
  font-size: clamp(2rem, 6vw, 3rem);
  margin: var(--space-sm) 0 var(--space-md);
}
.profile-tagline {
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.55;
}

/* ----- card shell ----- */
.profile-card {
  padding: var(--space-xl);
  margin-bottom: var(--space-lg);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.profile-card-header {
  margin-bottom: var(--space-lg);
}
.profile-card-eyebrow {
  display: inline-block;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.profile-card-header h2 {
  margin: 0;
  font-size: 1.4rem;
}

/* ----- inputs / hints ----- */
.profile-hint {
  color: var(--text-muted);
  font-size: 0.78rem;
  margin: 6px 0 0;
  line-height: 1.5;
}
.profile-optional {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 0.8em;
  margin-left: 4px;
}

/* responsive 2-col grid for paired inputs (pronouns+birthday, phone+lovelang) */
.profile-row-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-top: var(--space-md);
}

/* ----- avatar ----- */
.profile-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}
.profile-row--avatar {
  flex-wrap: wrap;
}
.profile-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--gradient-warm);
  flex-shrink: 0;
  font-size: 1.6rem;
}
.profile-avatar--lg {
  width: 64px;
  height: 64px;
  font-size: 2.1rem;
  box-shadow: var(--shadow-glow-mixed);
}

/* avatar picker grid */
.profile-avatar-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
  gap: 8px;
  padding: 12px;
  background: var(--bg-glass);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
}
.profile-avatar-opt {
  background: var(--bg-card);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 10px 0;
  font-size: 1.4rem;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}
.profile-avatar-opt:hover {
  background: var(--bg-card-hover);
  border-color: var(--bg-glass-border);
  transform: scale(1.08);
}

/* ----- card footer / save state ----- */
.profile-card-footer {
  margin-top: var(--space-md);
  min-height: 1.2em;
}
.profile-save-state,
.profile-sync-state {
  margin: 6px 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity var(--transition-normal);
}
.profile-save-state.is-on,
.profile-sync-state.is-on {
  opacity: 1;
  color: var(--accent-mint);
}
.profile-sync-state.is-online  { color: var(--accent-mint); opacity: 1; }
.profile-sync-state.is-offline { color: var(--text-muted); opacity: 1; }

/* ----- couple-card specifics ----- */
.profile-days-together {
  margin: var(--space-md) 0 0;
  padding: 12px 16px;
  background: var(--bg-glass);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-md);
  text-align: center;
  font-weight: 600;
  color: var(--text-primary);
}
.profile-locked {
  color: var(--text-secondary);
  margin: 0 0 var(--space-md);
  line-height: 1.55;
}

/* ----- partner readout ----- */
.profile-partner-headline {
  flex: 1;
  min-width: 0;
}
.profile-partner-name {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}
.profile-partner-pronouns {
  margin: 2px 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.profile-readout {
  margin: var(--space-md) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.profile-readout-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  align-items: baseline;
  padding: 10px 0;
  border-top: 1px solid var(--bg-glass-border);
  margin: 0;
}
.profile-readout-row:first-child {
  border-top: 0;
}
.profile-readout dt {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  margin: 0;
}
.profile-readout dd {
  color: var(--text-primary);
  margin: 0;
  font-size: 0.95rem;
}
.profile-readout-empty {
  color: var(--text-secondary);
  margin: var(--space-md) 0 0;
  font-style: italic;
  line-height: 1.55;
}
.profile-phone-link {
  color: var(--accent-amber);
  text-decoration: none;
  border-bottom: 1px dashed rgba(245, 180, 97, 0.4);
}
.profile-phone-link:hover {
  border-bottom-style: solid;
}

/* ----- mobile ----- */
@media (max-width: 640px) {
  .profile-card {
    padding: var(--space-lg);
  }
  .profile-row-grid {
    grid-template-columns: 1fr;
  }
  .profile-readout-row {
    grid-template-columns: 110px 1fr;
  }
}

/* ----- Host-role row (inside the couple card) ----- */
.profile-host-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: 14px 16px;
  margin-bottom: var(--space-lg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--bg-glass-border);
  background: var(--bg-card);
}
.profile-host-info { flex: 1; min-width: 0; }
.profile-host-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 4px;
}
.profile-host-state {
  font-size: 1rem;
  color: var(--text-primary);
  margin: 0 0 4px;
}
.profile-host-state strong { color: var(--text-primary); }
.profile-host-row .btn {
  flex-shrink: 0;
  padding: 8px 14px;
  font-size: 0.88rem;
}
@media (max-width: 520px) {
  .profile-host-row {
    flex-direction: column;
    align-items: stretch;
  }
}
