.rider-achievements[hidden], .rider-trophies-page[hidden] { display: none !important; }
.profile-shell > .rider-achievements, .profile-shell > .rider-trophies-page { width: calc(100% - 2 * var(--profile-content-gutter, 0px)); max-width: 820px; margin-inline: auto; min-width: 0; color: var(--text-main); }
@media (max-width: 860px) { .profile-page.is-showing-trophies { padding-top: max(14px, env(safe-area-inset-top, 0px)); } }
.profile-page.is-showing-trophies .profile-shell > :not(.rider-trophies-page) { display: none !important; }
.achievement-open { display: flex; width: 100%; align-items: center; gap: 14px; padding: 12px 16px; text-align: left; border: 1px solid var(--line); border-radius: 17px; background: var(--bg-panel); color: var(--text-main); cursor: pointer; font: inherit; }
.achievement-open:hover { border-color: var(--accent-cool); }
.achievement-open-copy { display: grid; gap: 5px; min-width: 0; }
.achievement-open-copy strong { font-size: 1rem; }
.achievement-open-copy small { font-size: .78rem; color: var(--text-muted); line-height: 1.4; }
.achievement-open-chevron { margin-left: auto; font-size: 1.6rem; color: var(--text-muted); }
.achievement-open .achievement-trophy { width: 42px; height: 46px; flex-basis: 42px; }
.rider-trophies-page { min-width: 0; }
.trophies-page-heading { padding: 0 0 14px; }
.trophies-page-heading h2 { margin: 14px 0 5px; font-size: 1.8rem; line-height: 1.2; }
.trophies-page-heading h2:focus { outline: none; }
.trophies-page-heading p, .achievement-help { margin: 5px 0 0; color: var(--text-muted); font-size: .78rem; line-height: 1.55; }
.achievement-back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-panel); color: var(--text-main); font: inherit; font-size: .82rem; cursor: pointer; }
.achievement-back span { font-size: 1.2rem; }
.achievement-summary { padding: 14px; border: 1px solid var(--line); border-radius: 17px; background: var(--bg-panel); }
.achievement-overview { display: flex; gap: 14px; align-items: center; }
.achievement-overview-copy { display: grid; gap: 4px; min-width: 0; }
.achievement-overview-copy > span, .achievement-overview-copy small { color: var(--text-muted); font-size: .8rem; line-height: 1.4; }
.achievement-featured-title { font-size: 1.2rem; line-height: 1.25; overflow-wrap: anywhere; }
.achievement-trophy { width: 64px; height: 68px; flex: 0 0 64px; color: #e6aa7a; }
.tier-silver { color: #c2d3e3; }
.tier-gold { color: #f3ca61; }
.tier-platinum { color: #80e0d5; }
.tier-diamond { color: #83c9ff; }
.tier-legendary { color: #d9abff; }
.achievement-medallion { fill: var(--bg-panel-strong); }
.achievement-progress { display: grid; gap: 7px; margin: 13px 0 0; font-size: .8rem; line-height: 1.4; }
.achievement-progress progress { width: 100%; height: 6px; border: 0; border-radius: 8px; overflow: hidden; accent-color: var(--accent-cool); background: var(--line); }
.achievement-progress progress::-webkit-progress-bar { background: var(--line); border-radius: 8px; }
.achievement-progress progress::-webkit-progress-value { background: var(--accent-cool); border-radius: 8px; }
.achievement-progress progress::-moz-progress-bar { background: var(--accent-cool); border-radius: 8px; }
.achievement-open:focus-visible, .rider-trophies-page button:focus-visible { outline: 2px solid var(--accent-cool); outline-offset: 4px; border-radius: 10px; }
.achievement-color-guide { margin: 14px 0; color: var(--text-muted); font-size: .8rem; line-height: 1.5; }
.achievement-group { padding: 16px; border: 1px solid var(--line); border-radius: 17px; background: var(--bg-panel); margin-top: 14px; }
.achievement-group h3 { margin: 0 0 7px; font-size: 1rem; }
.achievement-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 14px 0 0; padding: 0; list-style: none; }
.achievement-item { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px 10px; border: 1px solid var(--line); border-radius: 12px; min-width: 0; text-align: center; }
.achievement-item.is-earned { background: color-mix(in srgb, var(--accent-cool) 4%, transparent); }
.achievement-item .achievement-trophy { width: 64px; height: 68px; flex-basis: 68px; }
.achievement-item > div { display: grid; gap: 5px; min-width: 0; width: 100%; overflow-wrap: anywhere; }
.achievement-item strong { font-size: .86rem; line-height: 1.4; }
.achievement-item span, .achievement-item small { font-size: .74rem; color: var(--text-muted); line-height: 1.5; }
.achievement-status { font-size: .78rem; line-height: 1.5; color: var(--text-muted); }
.achievement-status:empty { display: none; }
.rider-trophies-page > button { margin-top: 10px; min-height: 44px; }
.achievement-calendar { margin-top: 16px; }
.light-theme .tier-bronze { color: #8b4d20; }
.light-theme .tier-silver { color: #4b627a; }
.light-theme .tier-gold { color: #8c6500; }
.light-theme .tier-platinum { color: #16796f; }
.light-theme .tier-diamond { color: #24689b; }
.light-theme .tier-legendary { color: #8754b3; }
/* Grey must override tier colors in both themes, including the Pro badge. */
.rider-trophies-page .is-locked .achievement-trophy, .rider-achievements .is-locked .achievement-trophy { color: #858585; opacity: .72; filter: grayscale(1); }
@media (min-width: 680px) { .achievement-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .rider-achievements *, .rider-trophies-page * { animation: none !important; transition: none !important; } }
