.account-dashboard {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.account-sections {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.account-sections a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .5rem .85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--accent);
  font-weight: 650;
  text-decoration: none;
}

.account-sections a:hover { background: var(--hover-surface); }
.account-dashboard section { scroll-margin-block-start: 1rem; }

.account-section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .7rem;
}

.account-dashboard h2 { margin: 0; font-size: 1.4rem; }
#account-empty { margin: .85rem 0 0; }
.owned-projects:empty { display: none; }

.account-history {
  margin-top: 1rem;
  border-top: 1px solid var(--line);
  padding-top: .35rem;
}

.account-history summary {
  min-height: 44px;
  padding: .65rem 0;
  color: var(--accent);
  font-weight: 650;
}

.account-history .owned-projects { margin-top: .25rem; }
.owned-projects:last-child { margin-bottom: 0; }
.owned-projects h3 { margin: 0 0 .2rem; font-size: 1.1rem; overflow-wrap: anywhere; }

#account-trophy-status, #account-membership {
  margin: .35rem 0 0;
  color: var(--muted);
}

.trophy-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.trophy-list:empty { display: none; }

.trophy-card {
  display: grid;
  align-content: start;
  gap: .5rem;
  min-width: 0;
  padding: .8rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--page);
}

.trophy-card[data-tier="bronze"] { --medal-highlight: #ffd6ac; --medal-shadow: #bb7653; }
.trophy-card[data-tier="silver"] { --medal-highlight: #f2f7ff; --medal-shadow: #a0b4cb; }
.trophy-card[data-tier="gold"] { --medal-highlight: #ffebac; --medal-shadow: #daa644; }
.trophy-card[data-tier="platinum"] { --medal-highlight: #e1f7ff; --medal-shadow: #88bdec; }

.trophy-card-heading {
  display: flex;
  align-items: center;
  gap: .65rem;
}

.trophy-medal {
  display: grid;
  flex: 0 0 44px;
  place-items: center;
  height: 44px;
  border: 1px solid var(--control-line);
  border-radius: 14px;
  background: var(--image-surface);
  color: var(--muted);
  font-size: 1.35rem;
}

.trophy-card[data-earned="true"] .trophy-medal {
  border-color: var(--medal-shadow);
  background: linear-gradient(150deg, var(--medal-highlight), var(--medal-shadow));
  box-shadow: inset 0 0 0 2px rgb(255 255 255 / .35);
  color: #182342;
}

.trophy-card h3 { margin: 0; font-size: 1.03rem; overflow-wrap: anywhere; }
.trophy-card p { margin: 0; color: var(--muted); }
.trophy-card-state, .trophy-progress-label { font-size: .875rem; }

.trophy-card progress {
  width: 100%;
  height: .7rem;
  accent-color: var(--accent);
}

.trophy-progress-label { font-variant-numeric: tabular-nums; }

@media (max-width: 590px) {
  .trophy-list { grid-template-columns: minmax(0, 1fr); }
}
