/* A badge stays inside the existing name cell and line height. Explanations use the top layer. */
.player-name-with-badge { display: inline-flex; align-items: center; gap: 4px; width: 100%; contain: inline-size; vertical-align: bottom; }
.player-name-with-badge > :first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-name-with-badge > :not(:first-child) { flex-shrink: 0; }
.featured-badge { display: inline-grid; place-items: center; flex: 0 0 18px; width: 18px; height: 18px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--gold); cursor: pointer; vertical-align: middle; }
.featured-badge .hall-icon { width: 16px; height: 16px; }
.featured-badge:hover, .featured-badge[aria-expanded=true] { background: color-mix(in srgb, var(--gold) 12%, transparent); }
.badge-popover { position: fixed; inset: auto; width: min(300px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto; margin: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--ink); box-shadow: 0 8px 30px rgb(0 0 0 / .2); font-size: 13px; line-height: 1.5; white-space: normal; }
.badge-popover p { margin: 0 0 8px; }
.badge-popover .badge-popover-heading { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.badge-popover .hall-medal { flex-shrink: 0; }
.badge-popover .muted { font-size: 12px; }
.badge-popover-links { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.badge-popover-links a { padding-block: 4px; }
.badge-setting { scroll-margin-top: 20px; }
.badge-picker { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 8px; }
.badge-picker select { flex: 1 1 180px; }
.badge-choice-help { flex-basis: 100%; color: var(--muted); font-size: 13px; }
.badge-choice-help p { margin: 0; }
.badge-choice-help .muted { display: block; margin-top: 4px; font-size: 12px; }
@media (max-width: 640px) { .badge-popover-links a { display: inline-flex; align-items: center; min-height: 44px; } }
