.horse-care-identity {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin: 1rem 0;
}

.horse-care-identity > .horse-picture {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  object-fit: cover;
  border-radius: 10px;
}

.horse-care-identity .horse-picture-placeholder .horse-icon {
  width: 48px;
  height: 48px;
  flex-basis: 48px;
}

.horse-care-identity > div {
  min-width: 0;
}

.horse-care-identity h1 {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
}

.horse-care-identity p {
  margin: 0.25rem 0 0;
}

.horse-care-identity .horse-care-duty {
  margin-top: 0.5rem;
}

.horse-profile-page .horse-profile-header {
  margin: 0 0 1rem;
  padding: 1rem;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: var(--color-background-secondary);
}

.horse-profile-page .horse-profile-header > .horse-picture {
  width: 150px;
  border-radius: 10px;
}

.horse-profile-identity {
  min-width: 0;
  overflow-wrap: anywhere;
}

.horse-profile-identity .stable-eyebrow {
  margin-bottom: 0.35rem;
}

.horse-profile-identity .horse-registered-name {
  margin: 0.35rem 0;
}

.horse-profile-facts {
  margin: 0.65rem 0 1rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.horse-profile-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.horse-profile-page .horse-profile-actions {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
}

.horse-profile-actions .dashboard-action {
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  text-decoration: none;
}

.horse-profile-actions .dashboard-action:hover {
  border-color: var(--color-foreground-secondary);
}

.horse-profile-actions .dashboard-action-heading {
  gap: 0.65rem;
}

.horse-profile-actions .dashboard-action-heading .material-icons {
  font-size: 1.6rem;
  color: var(--color-foreground-secondary);
}

.horse-profile-actions .dashboard-action strong {
  font-size: 1rem;
}

.horse-profile-care {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  align-items: start;
  gap: 1.5rem;
  margin-top: 2rem;
}

.horse-profile-care:empty {
  display: none;
}

.horse-profile-care .horse-panel h2 {
  margin-bottom: 0.25rem;
}

.horse-care-row {
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
}

.horse-care-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.horse-care-row p {
  margin: 0.5rem 0 0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.horse-care-row-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.horse-care-row-heading h3 {
  flex: 1 1 140px;
  margin-bottom: 0;
}

.horse-care-status {
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  background: var(--color-background-tertiary);
  font-size: 0.75rem;
  font-weight: 700;
}

.horse-care-overdue {
  color: var(--color-red);
}

.horse-care-empty {
  margin: 1rem 0 0;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.horse-care-tasks {
  display: inline-block;
  margin-top: 1rem;
  padding-block: 0.5rem;
}

@media (max-width: 600px) {
  .horse-profile-page .horse-profile-header {
    gap: 1rem;
    align-items: flex-start;
    flex-wrap: nowrap;
    padding: 1rem;
  }

  .horse-profile-page .horse-profile-header > .horse-picture {
    width: 80px;
    aspect-ratio: 1;
  }

  .horse-profile-page .horse-picture-placeholder .horse-icon {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
  }

  .horse-profile-facts {
    font-size: 0.875rem;
  }

  .horse-profile-page .horse-profile-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .horse-profile-actions .dashboard-action {
    padding: 0.75rem;
  }

  .horse-profile-care {
    gap: 1rem;
    margin-top: 1.5rem;
  }
}

.horse-profile-page .horse-profile-header {
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1rem;
}

.horse-profile-identity {
  flex: 1 1 240px;
}

.horse-profile-identity .horse-details {
  margin-block: 0.75rem;
  gap: 0.4rem 0.75rem;
  font-size: 0.9rem;
}

.horse-profile-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.horse-profile-page .horse-profile-actions {
  gap: 0.75rem;
}

@media (max-width: 600px) {
  .horse-profile-page .horse-profile-header {
    display: flow-root;
  }

  .horse-profile-page .horse-profile-header > .horse-picture {
    float: left;
    margin: 0 1rem 0.75rem 0;
  }

  .horse-profile-identity .horse-details {
    clear: both;
    font-size: 0.8rem;
  }

  .horse-profile-edit-actions {
    margin-top: 0.75rem;
  }
}

.horse-details.horse-identity-details {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 0.5rem 1.5rem;
}

.horse-identity-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 0.75rem;
  align-content: start;
}

.horse-identity-field dd {
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.horse-profile-actions .dashboard-action-heading {
  flex-wrap: nowrap;
}

.horse-profile-details > summary {
  display: none;
}

@media (max-width: 600px) {
  .horse-profile-details {
    clear: both;
  }

  .horse-profile-details > summary {
    display: list-item;
    padding-block: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
  }
}
