/* Achievement medal system. Existing unlock logic and symbols stay unchanged. */
.team-achievement-story[data-achievement-family="daily"],
.team-achievement-preview-icon[data-achievement-family="daily"],
.profile-achievement-medal[data-achievement-family="daily"] {
  --achievement-medal-image:url("../assets/achievement-badges/daily-red-v1.webp");
}

.team-achievement-story[data-achievement-family="career"],
.team-achievement-preview-icon[data-achievement-family="career"],
.profile-achievement-medal[data-achievement-family="career"] {
  --achievement-medal-image:url("../assets/achievement-badges/career-green-v1.webp");
}

.team-achievement-story[data-achievement-family="speed"],
.team-achievement-preview-icon[data-achievement-family="speed"],
.profile-achievement-medal[data-achievement-family="speed"] {
  --achievement-medal-image:url("../assets/achievement-badges/speed-blue-v1.webp");
}

.team-achievement-story[data-achievement-family="streak"],
.team-achievement-preview-icon[data-achievement-family="streak"],
.profile-achievement-medal[data-achievement-family="streak"] {
  --achievement-medal-image:url("../assets/achievement-badges/streak-purple-v1.webp");
}

.team-achievement-story[data-achievement-family="online"],
.team-achievement-preview-icon[data-achievement-family="online"],
.profile-achievement-medal[data-achievement-family="online"] {
  --achievement-medal-image:url("../assets/achievement-badges/online-orange-v1.webp");
}

.team-achievement-story[data-achievement-family="special"],
.team-achievement-preview-icon[data-achievement-family="special"],
.profile-achievement-medal[data-achievement-family="special"] {
  --achievement-medal-image:url("../assets/achievement-badges/special-gold-v1.webp");
}

.team-profile-section-panel .team-achievement-stories {
  gap:20px 10px;
}

.team-achievement-story {
  display:flex;
  flex-direction:column;
  align-items:center;
  border-radius:12px;
}

.team-achievement-story-ring {
  position:relative;
  width:76px;
  height:76px;
  margin:0 auto 7px;
  padding:0;
  display:block;
  background:var(--achievement-medal-image) center/contain no-repeat;
  border-radius:0;
  filter:drop-shadow(0 5px 6px rgba(13,43,75,.2));
  transition:transform .18s ease,filter .18s ease,opacity .18s ease;
}

.team-achievement-story-icon {
  position:absolute;
  top:41%;
  left:50%;
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  transform:translate(-50%,-50%);
  color:#fff;
  background:none;
  border:0;
  border-radius:0;
  font-size:23px;
  line-height:1;
  text-shadow:0 2px 4px rgba(0,0,0,.45);
}

.team-achievement-story:hover .team-achievement-story-ring,
.team-achievement-story:focus-visible .team-achievement-story-ring {
  transform:translateY(-2px) scale(1.04);
  filter:drop-shadow(0 8px 9px rgba(13,43,75,.28));
}

.team-achievement-story:focus-visible {
  outline:2px solid #0aa4d6;
  outline-offset:4px;
}

.team-achievement-story.is-locked .team-achievement-story-ring,
body.theme-dark .team-achievement-story.is-locked .team-achievement-story-ring {
  background:var(--achievement-medal-image) center/contain no-repeat;
  filter:grayscale(1) saturate(.18) opacity(.46);
}

.team-achievement-story.is-locked .team-achievement-story-icon,
body.theme-dark .team-achievement-story.is-locked .team-achievement-story-icon {
  color:#f8fafc;
  background:none;
  filter:none;
  font-size:18px;
  text-shadow:0 2px 4px rgba(0,0,0,.55);
}

.team-achievement-story-name {
  max-width:112px;
  font-size:10px;
  line-height:1.3;
}

.team-achievement-preview {
  grid-template-columns:106px minmax(0,1fr);
}

.team-achievement-preview-icon {
  position:relative;
  width:100px;
  height:100px;
  color:#fff;
  background:var(--achievement-medal-image) center/contain no-repeat;
  border-radius:0;
}

.team-achievement-preview-glyph {
  position:absolute;
  top:41%;
  left:50%;
  display:grid;
  place-items:center;
  transform:translate(-50%,-50%);
  font-size:32px;
  line-height:1;
  text-shadow:0 3px 6px rgba(0,0,0,.45);
}

.team-achievement-preview.is-locked .team-achievement-preview-icon {
  filter:grayscale(1) saturate(.2) opacity(.56);
}

.profile-achievement-medal {
  position:relative;
  width:34px !important;
  height:38px !important;
  flex:0 0 34px !important;
  display:block !important;
  background:var(--achievement-medal-image) center/contain no-repeat !important;
  border-radius:0 !important;
  font-size:0 !important;
}

.profile-achievement-medal > span {
  position:absolute;
  top:41%;
  left:50%;
  width:auto !important;
  height:auto !important;
  display:block !important;
  transform:translate(-50%,-50%);
  background:none !important;
  border-radius:0 !important;
  font-size:14px !important;
  line-height:1;
  text-shadow:0 1px 2px rgba(0,0,0,.5);
}

@media (max-width:680px) {
  .team-achievement-story-ring { width:70px; height:70px; }
  .team-achievement-story-icon { font-size:21px; }
  .team-achievement-preview { grid-template-columns:88px minmax(0,1fr); }
  .team-achievement-preview-icon { width:84px; height:84px; }
  .team-achievement-preview-glyph { font-size:28px; }
}

@media (prefers-reduced-motion:reduce) {
  .team-achievement-story-ring { transition:none; }
}
