.profile-details {
  margin: 20px 0 24px;
  padding: 16px 20px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.profile-details summary {
  cursor: pointer;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-main);
  user-select: none;
  min-height: 36px;
  display: flex;
  align-items: center;
}

.profile-details form {
  margin-top: 16px;
}

.profile-intro {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 16px;
}

/* Mobile-first grid template for profile fields */
.fields {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 12px;
}

.fields label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-details button[type="submit"] {
  width: 100%;
  margin-top: 16px;
}

.notice, .error {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 16px;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.notice {
  background-color: #e8f5e9;
  color: #1b5e20;
  border: 1px solid #c8e6c9;
}

.error {
  background-color: #ffebee;
  color: #c62828;
  border: 1px solid #ffcdd2;
}

.htmx-indicator {
  display: none;
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: var(--z-toast, 50);
  padding: 12px 18px;
  border-radius: 999px;
  background-color: var(--primary);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

@media (min-width: 480px) {
  .fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
