/* Profile badges: two-letter element tiles like the brand mark (docs/brand/README.md).
   Tier 1 outline, tier 2 ink fill, tier 3 amber fill; one-off badges are an ink tile with amber lettering. */
.pf-badge {
    --s: 30px;
    position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none; box-sizing: border-box;
    width: var(--s); height: var(--s); padding: calc(var(--s) * .16) 0 0 calc(var(--s) * .08); margin: 0; vertical-align: middle;
    border: 1.5px solid var(--pt-text); border-radius: calc(var(--s) * .2);
    background: var(--pt-surface); color: var(--pt-text);
    font-family: var(--pt-font-display); font-weight: 800; font-size: calc(var(--s) * .4); line-height: 1; letter-spacing: -.02em;
    cursor: default;
}
button.pf-badge { cursor: pointer; transition: transform .12s ease; }
button.pf-badge:hover { transform: translateY(-1px); }
button.pf-badge:focus-visible { outline: 2px solid var(--pt-focus-ring); outline-offset: 2px; }
.pf-badge i {
    position: absolute; top: calc(var(--s) * .07); left: calc(var(--s) * .11); margin: 0;
    font-style: normal; font-family: var(--pt-font-mono); font-weight: 500; font-size: calc(var(--s) * .2); line-height: 1;
}
.pf-badge.is-t2 { background: var(--pt-text); color: var(--pt-surface); }
.pf-badge.is-t3 { background: var(--pt-accent); border-color: var(--pt-accent); color: var(--pt-on-accent); }
.pf-badge.is-special { background: var(--pt-ink); border-color: var(--pt-amber-500); color: var(--pt-amber-500); }
.pf-badge.is-t0 { opacity: .35; border-style: dashed; }
/* Point-shop badges (shopapp, kind "badge"): a picture. Prompt Search's own keep the square tile
   with the solid ink border of the earned badges; member-made ones are round with a dashed ring,
   so the two never look alike, even at 20px. */
.pf-badge.is-shop-site, .pf-badge.is-shop-member { padding: 0; overflow: hidden; background: var(--pt-surface-2); }
.pf-badge.is-shop-site img, .pf-badge.is-shop-member img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pf-badge.is-shop-member { border-radius: 50%; border-style: dashed; border-color: var(--pt-border-strong); }
.pf-badge.is-shop-member img { border-radius: 50%; }
.pf-badge-sm { --s: 20px; }
.pf-badge-sm { padding: 0; }
.pf-badge-sm i { display: none; }
.pf-badge-lg { --s: 44px; }
@media (prefers-reduced-motion: reduce) { button.pf-badge { transition: none; } button.pf-badge:hover { transform: none; } }

/* Profile header */
.ps-badges-name { display: inline-flex; gap: 6px; vertical-align: middle; margin-left: .35rem; }
.ps-badge-title {
    display: inline-block; margin: .1rem 0 .4rem; padding: .15rem .75rem; border: 1px solid var(--pt-border);
    border-radius: var(--pt-radius-pill); font-size: .85rem; font-weight: 600; color: var(--pt-accent-text);
}
.ps-badge-shelf { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin: .75rem 0 .25rem; }
.ps-badge-edit { display: inline-flex; align-items: center; gap: .2rem; font-size: .8rem; color: var(--pt-text-muted); }
.ps-badge-edit .material-icons { font-size: 1rem; }

/* Badge popup */
.bd-dialog {
    width: min(24rem, calc(100vw - 2rem)); padding: 0; border: 1px solid var(--pt-border);
    border-radius: var(--pt-radius-lg); background: var(--pt-surface); color: var(--pt-text);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
}
.bd-dialog::backdrop { background: rgba(0, 0, 0, .55); backdrop-filter: blur(2px); }
.bd-head { display: flex; align-items: center; gap: .9rem; padding: 1.1rem 1rem .5rem 1.25rem; margin: 0; }
.bd-head > div { flex: 1; min-width: 0; }
.bd-head h2 { margin: 0; font: var(--pt-text-h2); }
.bd-head p { margin: .1rem 0 0; color: var(--pt-accent-text); font-weight: 600; font-size: .875rem; }
.bd-body { padding: .25rem 1.25rem 1rem; }
.bd-counts { margin: 0 0 .6rem; color: var(--pt-text-muted); font-size: .875rem; }
.bd-tiers { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.bd-tiers li { display: flex; align-items: center; gap: .6rem; padding: .35rem .5rem; border-radius: var(--pt-radius-sm); font-size: .875rem; }
.bd-tiers li.is-reached { background: var(--pt-surface-2); }
.bd-tiers li b { margin-left: auto; font-family: var(--pt-font-mono); font-weight: 500; font-variant-numeric: tabular-nums; }
.bd-meta { margin: .75rem 0 0; font-size: .8rem; color: var(--pt-text-muted); }
.bd-progress { margin: .5rem 0 0; font-size: .85rem; }
@media (max-width: 575px) {
    .bd-dialog { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: var(--pt-radius-lg) var(--pt-radius-lg) 0 0; }
}
