.medal-viewer { --medal-accent: #d8e1eb; --medal-halo: #c1d0df10; display: flex; flex-direction: column; min-width: 0; color: var(--text, #f0f1f3); }
.medal-viewer[data-medal-tier="gold"] { --medal-accent: #ebca81; --medal-halo: #d5a74717; }
.medal-viewer[data-medal-tier="bronze"] { --medal-accent: #dbad8c; --medal-halo: #b477501a; }
.medal-viewer[data-medal-tier="graphite"] { --medal-accent: #a1afbf; --medal-halo: #76859c13; }
.medal-stage { position: relative; height: 202px; isolation: isolate; }
.medal-stage::before { content: ''; position: absolute; inset: 9% 2% 0; z-index: -1; border-radius: 50%; background: radial-gradient(ellipse, var(--medal-halo), transparent 68%); }
.medal-poster { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }
.medal-viewer[data-medal-tier="gold"] .medal-poster { filter: sepia(1) saturate(1.65) hue-rotate(355deg) brightness(.96); }
.medal-viewer[data-medal-tier="bronze"] .medal-poster { filter: sepia(1) saturate(1.7) hue-rotate(340deg) brightness(.78); }
.medal-viewer[data-medal-tier="graphite"] .medal-poster { filter: grayscale(1) brightness(.62); }
.medal-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; touch-action: pan-y; cursor: grab; }
.medal-canvas.is-dragging { cursor: grabbing; }
.medal-canvas:focus-visible { outline: 1px solid var(--medal-accent); outline-offset: -3px; border-radius: 12px; }
.medal-viewer[data-medal-state="ready"] .medal-poster { visibility: hidden; }
.medal-status { position: absolute; z-index: 2; left: 0; right: 0; bottom: 3px; margin: 0; text-align: center; color: var(--muted, #a3a8b1); font-size: .5625rem; }
.medal-enable { position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%); z-index: 2; padding: 8px 12px; border: 1px solid var(--line, #303339); border-radius: 7px; background: #101215; color: var(--silver, #d9dde3); font: inherit; font-size: .625rem; cursor: pointer; white-space: nowrap; }
.medal-summary { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.medal-tier-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border: 1px solid color-mix(in srgb, var(--medal-accent) 35%, transparent); border-radius: 5px; color: var(--medal-accent); font-size: .625rem; font-weight: 600; }
.medal-tier-chip::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.medal-percentile { color: var(--silver, #d9dde3); font-size: .625rem; font-variant-numeric: tabular-nums; }
.medal-basis { margin: 7px 0 0; text-align: center; color: var(--muted, #a3a8b1); font-size: .5625rem; line-height: 1.5; }
.medal-controls { display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: 7px; }
.medal-hint { margin-right: 6px; color: var(--muted, #a3a8b1); font-size: .5625rem; }
.medal-control { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 1px solid var(--line, #303339); border-radius: 50%; background: transparent; color: var(--silver, #d9dde3); font-size: .9375rem; cursor: pointer; }
.medal-control:hover { color: white; border-color: #7e8999; background: #ffffff05; }
.medal-legend { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 7px 10px; list-style: none; padding: 10px 0 0; margin: 7px 0 0; border-top: 1px solid #ffffff0c; }
.medal-legend li { display: inline-flex; align-items: center; gap: 4px; color: var(--muted, #a3a8b1); font-size: .5rem; line-height: 1.4; white-space: nowrap; }
.medal-legend li[aria-current] { color: var(--silver, #d9dde3); }
.medal-swatch { width: 5px; height: 5px; border-radius: 50%; background: #99a7b9; }
.medal-legend-gold .medal-swatch { background: #dbb660; }
.medal-legend-silver .medal-swatch { background: #c9d4e1; }
.medal-legend-bronze .medal-swatch { background: #bf8d68; }
.medal-legend-graphite .medal-swatch { background: #6d7b8f; }
.medal-viewer [hidden] { display: none !important; }
@media (max-width: 700px) { .medal-stage { height: 190px; } .medal-summary { margin-top: 3px; } .medal-legend { margin-top: 5px; padding-top: 8px; } }
