/* Medals: the art carries the colour, the surrounding UI stays neutral. */
.medal-defs{position:absolute;width:0;height:0;overflow:hidden}
.medal-tags{display:inline-flex;align-items:center;gap:2px;margin-left:5px;vertical-align:-4px;line-height:0}
.medal-tags:empty{display:none}
.frozen-tag{display:inline-block;margin-left:3px;padding:1px 5px;border:1px solid #7dd3fc;border-radius:4px;background:#e0f2fe;color:#075985;font:600 10px/1.4 var(--font-ui);letter-spacing:.02em;white-space:nowrap;cursor:help}:root[data-theme=dark] .frozen-tag{border-color:#0369a1;background:#0c4a6e;color:#e0f2fe}.profile-heading h1 .frozen-tag{font-size:12px;padding:2px 7px}.disabled-tag{display:inline-block;margin-left:3px;padding:1px 5px;border:1px solid #bfa08a;border-radius:4px;background:#f3ebe5;color:#5d4037;font:600 10px/1.4 var(--font-ui);letter-spacing:.02em;white-space:nowrap;cursor:help}:root[data-theme=dark] .disabled-tag{border-color:#6d4c41;background:#3e2723;color:#eadbd0}.profile-heading h1 .disabled-tag{font-size:12px;padding:2px 7px}
.profile-heading h1 .medal-tags{gap:4px;margin-left:10px;vertical-align:middle}.profile-heading h1 .medal-chip svg{width:28px;height:28px}
.medal-chip{display:inline-flex;align-items:center;justify-content:center;line-height:0;cursor:help;border-radius:50%}
.medal-chip:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
.medal-chip svg{display:block;overflow:visible}
.medal-tooltip{position:absolute;z-index:60;max-width:min(280px,calc(100vw - 16px));padding:10px 12px;border:1px solid var(--outline);border-radius:8px;background:var(--surface);color:var(--prose);box-shadow:0 12px 32px #0002;font-size:12px;line-height:1.45;pointer-events:none}
.medal-tooltip strong{display:block;font-size:13px}
.medal-tooltip-level{display:inline-block;margin-top:2px;font-family:var(--font-roll);font-weight:700;font-size:11px;color:var(--prose-2)}
.medal-tooltip p{margin:6px 0 0;color:var(--prose-2)}
.medal-tooltip .medal-tooltip-count{color:var(--prose);font-weight:500}
.profile-medals{margin:20px 0 24px}
.profile-medals>.section-heading{margin:0 0 16px}
.profile-medals>.section-heading h2{font-size:18px}
.medal-favourites{display:grid;grid-template-columns:200px minmax(0,1fr) auto;gap:20px;align-items:center;padding-bottom:20px;margin-bottom:20px;border-bottom:1px solid var(--outline)}
.medal-favourites h3{font-size:14px}
.medal-favourites p{margin:4px 0 0;font-size:12px;color:var(--prose-2)}
.medal-favourite-row{display:flex;gap:22px;flex-wrap:wrap}
.medal-wall{display:grid;grid-template-columns:repeat(auto-fill,minmax(128px,1fr));gap:20px 12px}
.medal-figure{margin:0;display:flex;flex-direction:column;align-items:center;text-align:center;min-width:0}
.medal-figure figcaption{display:flex;flex-direction:column;align-items:center;gap:2px;margin-top:6px;font-size:11px;color:var(--muted);max-width:100%}
.medal-figure figcaption b{font-size:12px;line-height:1.35;font-weight:600;color:var(--prose);overflow-wrap:anywhere}
.medal-figure progress{width:92px;height:5px;margin-top:5px;border:0;border-radius:5px;overflow:hidden;background:var(--surface-raised);appearance:none}
.medal-figure progress::-webkit-progress-bar{background:var(--surface-raised)}
.medal-figure progress::-webkit-progress-value{background:var(--focus)}
.medal-figure progress::-moz-progress-bar{background:var(--focus)}
.medal-next{font-family:var(--font-roll);font-size:10px}
.medal-figure.is-locked .medal-chip{filter:grayscale(1);opacity:.45}
.medal-progress{margin-top:22px}
.medal-progress>summary{cursor:pointer;font-size:13px;font-weight:600;margin-bottom:16px}
.medal-dialog{width:min(480px,calc(100vw - 32px))}
.medal-history-hint{margin:-8px 0 16px}
.medal-history-button{display:inline-flex;margin:0;padding:0;border:0;border-radius:50%;background:none;color:inherit;line-height:0;cursor:pointer}
.medal-history-button:focus-visible{outline:2px solid var(--focus);outline-offset:4px}
.medal-history-button .medal-chip,.medal-figure[data-medal-history]{cursor:pointer}
.medal-history-summary{display:flex;align-items:center;gap:16px;margin:2px 0 14px}
.medal-history-summary svg{flex:none}
.medal-history-summary p{margin:0 0 4px;color:var(--prose-2);font-size:13px}
.medal-history-summary .medal-history-level{color:var(--prose);font-weight:700;font-size:14px}
.medal-history-first{margin:0 0 10px;color:var(--prose-2);font-size:13px}
.medal-history-list{max-height:min(420px,52vh);margin:0 0 8px;padding:0;overflow:auto;list-style:none;border-top:1px solid var(--outline)}
.medal-dialog.is-history{width:min(580px,calc(100vw - 32px))}
.medal-event{display:grid;grid-template-columns:96px minmax(0,1fr) auto;align-items:center;gap:4px 12px;padding:10px 2px;border-bottom:1px solid var(--outline);font-size:13px}
.medal-event time{color:var(--muted);font-size:12px}
.medal-event-what{min-width:0}
.medal-event-side{display:flex;align-items:center;justify-content:flex-end;gap:8px}
.medal-event-level{padding:2px 8px;border:1px solid var(--ep-line);border-radius:999px;background:var(--ep-bg);color:var(--ep-text);font-size:11px;font-weight:700}
.medal-event .button{min-height:30px;padding:6px 10px;font-size:11px}
.medal-dialog>p{color:var(--prose-2);font-size:13px;margin:0 0 12px}
.medal-pick-list{display:grid;gap:2px;max-height:min(360px,52vh);overflow:auto;margin-bottom:10px;border-top:1px solid var(--outline)}
.medal-pick{display:flex;align-items:center;gap:10px;padding:8px 2px;border-bottom:1px solid var(--outline);cursor:pointer}
.medal-pick input{width:17px;height:17px;margin:0;accent-color:var(--action)}
.medal-pick span{display:flex;flex-direction:column;min-width:0}
.medal-pick b{font-size:13px;font-weight:600}
.medal-pick small{font-size:11px;color:var(--muted)}
.medal-pick-count{font-family:var(--font-roll);font-size:11px;color:var(--muted);margin:0 0 6px}
.medal-dialog .message-status{min-height:18px;margin-bottom:10px}
.medal-sheen{animation:medal-sheen 5.5s ease-in-out infinite}
@keyframes medal-sheen{0%,55%{transform:skewX(-18deg) translateX(0)}100%{transform:skewX(-18deg) translateX(170px)}}
@media(prefers-reduced-motion:reduce){.medal-sheen{animation:none;display:none}}
@media(max-width:860px){.medal-favourites{grid-template-columns:1fr}.medal-favourites .button{justify-self:start}}
@media(max-width:520px){.medal-event{grid-template-columns:minmax(0,1fr) auto}.medal-event time{grid-column:1/-1}.medal-wall{grid-template-columns:repeat(2,minmax(0,1fr))}.medal-favourite-row{gap:12px}.medal-favourite-row svg{width:72px;height:72px}}
/* Grand Prix medals: from third place up the world in the glass moves and a light sweeps it; the top two
   twinkle, and the champion's halo pulses and its prism glint travels round the rim. */
.gpx-pulse{animation:gpx-pulse 3.2s ease-in-out infinite}
.gpx-twinkle{animation:gpx-twinkle 2.4s ease-in-out infinite;transform-box:fill-box;transform-origin:center}
.gpx-sweep{animation:gpx-sweep 5.5s ease-in-out infinite}
.gpx-tunnel{animation:gpx-tunnel 3.6s linear infinite;transform-box:fill-box;transform-origin:center}
.gpx-drift{animation:gpx-drift 7s ease-in-out infinite alternate}
.gpx-flicker{animation:gpx-flicker 2.2s ease-in-out infinite;transform-box:fill-box;transform-origin:50% 100%}
.gpx-ember{animation:gpx-ember 3.2s ease-in infinite}
.gpx-shine{animation:gpx-shine 2.8s ease-in-out infinite}
.gpx-glint{animation:gpx-glint 6s linear infinite;transform-box:view-box;transform-origin:60px 60px}
.gpx-d1{animation-delay:-.7s}.gpx-d2{animation-delay:-1.8s}.gpx-d3{animation-delay:-2.1s}
@keyframes gpx-pulse{0%,100%{opacity:.35}50%{opacity:.75}}
@keyframes gpx-twinkle{0%,100%{opacity:.25;transform:scale(.55)}50%{opacity:1;transform:scale(1.1)}}
@keyframes gpx-sweep{0%,55%{transform:translateX(-20px) skewX(-18deg)}100%{transform:translateX(170px) skewX(-18deg)}}
@keyframes gpx-tunnel{0%{transform:scale(.12);opacity:0}15%{opacity:1}100%{transform:scale(1);opacity:0}}
@keyframes gpx-drift{from{transform:translateX(-5px)}to{transform:translateX(5px)}}
@keyframes gpx-flicker{0%,100%{transform:scale(1,1) skewX(0deg)}30%{transform:scale(1.03,.94) skewX(2.5deg)}65%{transform:scale(.96,1.07) skewX(-2deg)}}
@keyframes gpx-ember{0%{transform:translateY(10px);opacity:0}25%{opacity:1}100%{transform:translateY(-18px);opacity:0}}
@keyframes gpx-shine{0%,100%{opacity:.5}50%{opacity:1}}
@keyframes gpx-glint{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.gpx-pulse,.gpx-twinkle,.gpx-tunnel,.gpx-drift,.gpx-flicker,.gpx-ember,.gpx-shine,.gpx-glint{animation:none}.gpx-sweep{animation:none;display:none}}
/* Version 3 adds champion highlights; the inner material loops remain versioned. */
.grand-prix-medal[data-medal-highlight]{overflow:visible}.gph-fx{overflow:visible;pointer-events:none}.gph-inner-effect{pointer-events:none}
.gph-lift{transform-box:view-box;transform-origin:60px 60px}.gph-a{transform-box:view-box;transform-origin:0 0;opacity:0}
@media(prefers-reduced-motion:reduce){.gph-fx,.gph-inner-effect{display:none}.gph-lift{transform:none!important;filter:none!important}}
/* Light pages: version-3 Aurora and Jade glass gains a fine contour, and highlight effects outside the glass use deeper inks. */
:root[data-theme=light] .gpx-v3:is(.gpx-aurora,.gpx-jade) .gpx-medal>path[fill$="-body)"]{stroke:#12294b;stroke-opacity:.38;stroke-width:3.6;paint-order:stroke}:root[data-theme=light] .gpx-v3.gpx-jade .gpx-medal>path[fill$="-body)"]{stroke:#0d604d}
:root[data-theme=light] .gph-meteor-tail>stop:nth-child(1){stop-color:#6a4fd8}:root[data-theme=light] .gph-meteor-tail>stop:nth-child(2){stop-color:#5a63d8;stop-opacity:.26}:root[data-theme=light] .gph-meteor-tail>stop:nth-child(3){stop-color:#1585b5;stop-opacity:.8}:root[data-theme=light] .gph-meteor-tail>stop:nth-child(4){stop-color:#0d8f74}
:root[data-theme=light] .gph-meteor-core>stop:nth-child(2){stop-color:#3fd0b0}:root[data-theme=light] .gph-meteor-core>stop:nth-child(3){stop-color:#0d8f74}:root[data-theme=light] .gph-star-seed>path{fill:#5a4bd1}:root[data-theme=light] .gph-star-seed>circle{fill:#0e8c84}:root[data-theme=light] .gph-meteor-rim>path{fill:#1fb594}
:root[data-theme=light] .gph-jade-projected-scale>path:nth-child(2){stroke:#9a6c1c;stroke-width:.7}:root[data-theme=light] .gph-jade-projected-scale>path:nth-child(3){stroke:#dc9f22}
:root[data-theme=light] .gph-spark>path:last-child{stroke:#ea580c}:root[data-theme=light] .gph-ember>circle:last-child{fill:#f97316}:root[data-theme=light] .gph-fireball>ellipse:first-child{opacity:.2}
:root[data-theme=light] .gpm-sparkle{stroke-opacity:.9;stroke-width:.65}:root[data-theme=light] .gph-ring-heat{stroke:#ffa21f}:root[data-theme=light] .gph-tongue-fill>stop:nth-child(1){stop-color:#ffb43c}:root[data-theme=light] .gph-tongue-fill>stop:nth-child(2){stop-color:#f5730f}:root[data-theme=light] .gph-tongue-fill>stop:nth-child(3){stop-color:#d9400b}
/* Version 2: motion belongs to the material inside the glass. */
.gpx-v2-neon-depth{animation:gpx-v2-neon-depth 3.6s linear infinite;transform-box:view-box;transform-origin:60px 55px}.gpx-v2-offset{animation-delay:-1.2s}.gpx-v2-neon-depth-third{animation-delay:-2.4s}
.gpx-v2-neon-rail{animation:gpx-v2-neon-rail 2.8s linear infinite}.gpx-v2-rail-1{animation-delay:-.4s}.gpx-v2-rail-2{animation-delay:-.8s}.gpx-v2-rail-3{animation-delay:-1.2s}.gpx-v2-rail-4{animation-delay:-1.6s}.gpx-v2-rail-5{animation-delay:-2s}
.gpx-v2-neon-nodes{animation:gpx-v2-neon-nodes 2.8s ease-in-out infinite}
.gpx-v2-aurora{animation:gpx-v2-aurora 6s ease-in-out infinite;transform-box:view-box;transform-origin:60px 45px}.gpx-v2-aurora-back{animation-duration:8s;animation-delay:-4s;animation-direction:reverse}
.gpx-v2-fire-roll{animation:gpx-v2-fire-roll 4.4s linear infinite;transform-box:view-box;transform-origin:60px 106px}
.gpx-v2-fire-counter{animation:gpx-v2-fire-counter 4s linear infinite;animation-delay:-1.6s;transform-box:view-box;transform-origin:60px 106px}
.gpx-v2-fire-heart{animation:gpx-v2-fire-heart 2.6s ease-in-out infinite;animation-delay:-.8s;transform-box:view-box;transform-origin:60px 106px}
.gpx-v2-ember{animation:gpx-v2-ember 2.8s linear infinite}.gpx-v2-d1{animation-delay:-.7s}.gpx-v2-d2{animation-delay:-1.4s}.gpx-v2-d3{animation-delay:-2.1s}
.gpx-v2-scale-wave{animation:gpx-v2-scale-wave 4.8s linear infinite}.gpx-v2-scale-wave-second{animation-delay:-2.4s}
@keyframes gpx-v2-neon-depth{0%{transform:scale(1);opacity:0}18%{opacity:.8}85%{opacity:.45}100%{transform:scale(.07);opacity:0}}
@keyframes gpx-v2-neon-rail{0%{stroke-dashoffset:18;opacity:0}16%,78%{opacity:1}100%{stroke-dashoffset:-100;opacity:0}}
@keyframes gpx-v2-neon-nodes{0%,100%{opacity:.45}45%{opacity:1}}
@keyframes gpx-v2-aurora{0%,100%{transform:translate(-3px,1px) skewX(-5deg) scaleY(.94);opacity:.78}25%{transform:translate(1px,-3px) skewX(0deg);opacity:.95}50%{transform:translate(5px,3px) skewX(7deg) scaleY(1.12);opacity:1}75%{transform:translate(-1px,-4px) skewX(3deg) scaleY(1.03);opacity:.9}}
@keyframes gpx-v2-fire-roll{0%{transform:translate(0,12px) skewX(-4deg) scale(.96,.82);opacity:0}15%{opacity:.85}65%{transform:translate(-3px,-10px) skewX(5deg) scale(1.04,1.1);opacity:.95}100%{transform:translate(2px,-24px) skewX(-2deg) scale(.96,1.2);opacity:0}}
@keyframes gpx-v2-fire-counter{0%{transform:translate(2px,9px) skewX(4deg) scaleY(.85);opacity:0}18%{opacity:.9}70%{transform:translate(-4px,-9px) skewX(-5deg) scaleY(1.12);opacity:1}100%{transform:translate(1px,-22px) skewX(2deg) scaleY(1.23);opacity:0}}
@keyframes gpx-v2-fire-heart{0%,100%{transform:scale(.96,.86);opacity:.72}50%{transform:scale(1.06,1.18);opacity:1}}
@keyframes gpx-v2-ember{0%{transform:translate(2px,12px);opacity:0}20%{opacity:1}100%{transform:translate(-6px,-32px);opacity:0}}
@keyframes gpx-v2-scale-wave{0%{transform:translateX(-90px) skewX(-24deg);opacity:0}20%,75%{opacity:1}100%{transform:translateX(200px) skewX(-24deg);opacity:0}}
@media(prefers-reduced-motion:reduce){.gpx-v2-neon-depth,.gpx-v2-neon-rail,.gpx-v2-neon-nodes,.gpx-v2-aurora,.gpx-v2-fire-roll,.gpx-v2-fire-counter,.gpx-v2-fire-heart,.gpx-v2-ember,.gpx-v2-scale-wave{animation:none}}
.medal-share{margin:10px 0 4px}.medal-share+.share-fallback{max-width:420px;margin:8px 0 12px}
