.pmcp-community-wrap,
.pmcp-standalone {
    --pmcp-ink: #202124;
    --pmcp-muted: #5f6368;
    --pmcp-border: #e2e5e9;
    --pmcp-soft: #f7f8fa;
    --pmcp-accent: #b21f35;
    --pmcp-accent-dark: #871729;
    color: var(--pmcp-ink);
    margin: 1.2rem 0;
    font-family: inherit;
}
.pmcp-guide,
.pmcp-gate {
    box-sizing: border-box;
    border: 1px solid var(--pmcp-border);
    background: #fff;
    border-radius: 16px;
    padding: clamp(16px, 2.4vw, 26px);
    margin: 0 0 18px;
    box-shadow: 0 5px 20px rgba(20, 24, 30, .045);
}
.pmcp-guide h2,
.pmcp-gate h3 {
    margin: 5px 0 10px;
    line-height: 1.25;
    font-size: clamp(1.15rem, 2vw, 1.55rem);
    font-weight: 750;
    letter-spacing: -.02em;
}
.pmcp-guide p,
.pmcp-gate p {
    margin: 8px 0 13px;
    color: var(--pmcp-muted);
    line-height: 1.58;
}
.pmcp-guide-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}
.pmcp-eyebrow {
    color: var(--pmcp-accent);
    font-size: .76rem;
    line-height: 1.3;
    letter-spacing: .09em;
    text-transform: uppercase;
    font-weight: 800;
}
.pmcp-pill {
    border: 1px solid #e4e7eb;
    background: #f4f5f7;
    border-radius: 999px;
    padding: 5px 10px;
    color: #454951;
    font-size: .76rem;
    font-weight: 700;
}
.pmcp-pill-success {
    border-color: #d2e5d9;
    background: #f0f7f2;
    color: #22643b;
}
.pmcp-pill-warning {
    border-color: #f0d7b6;
    background: #fff7eb;
    color: #8c4c05;
}
.pmcp-preview-note,
.pmcp-grace-note,
.pmcp-restriction-notice {
    border-left: 3px solid var(--pmcp-accent);
    padding: 9px 12px;
    margin: 13px 0;
    background: var(--pmcp-soft);
    border-radius: 0 8px 8px 0;
    color: var(--pmcp-muted);
    line-height: 1.5;
    font-size: .92rem;
}
.pmcp-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 17px 0;
}
.pmcp-steps > span {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 11px;
    border: 1px solid var(--pmcp-border);
    border-radius: 10px;
    background: var(--pmcp-soft);
    color: #454951;
    font-size: .87rem;
    font-weight: 650;
}
.pmcp-steps b {
    flex: 0 0 25px;
    height: 25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #d9dde2;
    color: var(--pmcp-accent);
    font-size: .82rem;
}
.pmcp-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    margin-top: 15px;
}
.pmcp-button {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 42px;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: 9px;
    text-decoration: none !important;
    font: inherit;
    font-size: .9rem;
    line-height: 1.25;
    font-weight: 750;
    transition: background-color .15s ease, border-color .15s ease;
}
.pmcp-button-primary {
    color: #fff !important;
    background: var(--pmcp-accent);
}
.pmcp-button-primary:hover,
.pmcp-button-primary:focus {
    color: #fff !important;
    background: var(--pmcp-accent-dark);
}
.pmcp-button-secondary {
    color: var(--pmcp-ink) !important;
    border-color: #d8dce1;
    background: #fff;
}
.pmcp-button-secondary:hover,
.pmcp-button-secondary:focus {
    background: #f5f6f7;
    border-color: #aeb4bc;
}
.pmcp-progress-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--pmcp-muted);
    font-size: .86rem;
    margin: 14px 0 6px;
}
.pmcp-progress-row strong { color: var(--pmcp-ink); }
.pmcp-progress {
    display: block;
    width: 100%;
    height: 7px;
    margin: 0 0 16px;
    border: 0;
    border-radius: 20px;
    overflow: hidden;
    appearance: none;
    -webkit-appearance: none;
}
.pmcp-progress::-webkit-progress-bar { background: #eceef1; border-radius: 20px; }
.pmcp-progress::-webkit-progress-value { background: var(--pmcp-accent); border-radius: 20px; }
.pmcp-progress::-moz-progress-bar { background: var(--pmcp-accent); border-radius: 20px; }
.pmcp-task-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 12px 0 0 !important;
    display: grid;
    gap: 8px;
}
.pmcp-task {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid var(--pmcp-border);
    border-radius: 10px;
    background: #fff;
}
.pmcp-task.is-complete { background: #f8fbf8; border-color: #dce9df; }
.pmcp-status-icon {
    flex: 0 0 23px;
    width: 23px;
    height: 23px;
    border: 1.5px solid #aab0b7;
    color: #747980;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    font-weight: 800;
}
.pmcp-status-icon.is-complete { background: #e4f2e8; border-color: #b9d9c3; color: #22643b; }
.pmcp-task-copy { display: grid; gap: 3px; flex: 1; min-width: 0; }
.pmcp-task-copy strong { font-size: .9rem; line-height: 1.35; }
.pmcp-task-copy span { color: var(--pmcp-muted); font-size: .82rem; line-height: 1.45; }
.pmcp-small-link {
    flex: 0 0 auto;
    border: 1px solid #d7dbe0;
    border-radius: 7px;
    padding: 7px 10px;
    text-decoration: none !important;
    font-size: .8rem;
    font-weight: 750;
    color: var(--pmcp-ink) !important;
    background: #fff;
}
.pmcp-small-link:hover { background: var(--pmcp-soft); }
.pmcp-config-note { color: #8c4c05; font-size: .75rem; max-width: 95px; text-align: right; }
.pmcp-gate {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin: 18px 0;
    background: #fbfbfc;
    border-color: #d9dde3;
}
.pmcp-gate-icon {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--pmcp-accent);
    background: #f9e9ec;
}
.pmcp-gate-copy { flex: 1 1 270px; min-width: 0; }
.pmcp-gate-copy h3 { font-size: 1.15rem; margin: 0 0 5px; }
.pmcp-gate-copy p { margin: 0 0 5px; }
.pmcp-gate-copy small { color: var(--pmcp-muted); }
.pmcp-gate .pmcp-actions { margin-top: 0; }
.pmcp-guest-limited .pm-sb-infinite-scroll { display: none !important; }
.pmcp-member-restricted .pm-sb-post-list,
.pmcp-member-restricted .pm-sb-feed-heading,
.pmcp-member-restricted .pm-sb-empty,
.pmcp-member-restricted .pm-sb-infinite-scroll { display: none !important; }

/* Profilo completato: riepilogo compatto, con guida completa richiudibile. */
.pmcp-complete-compact {
    margin: 0 0 14px;
    color: var(--pmcp-ink, #202124);
}
.pmcp-complete-compact > summary {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 13px;
    border: 1px solid #d7e5db;
    border-radius: 10px;
    background: #f8fbf8;
    cursor: pointer;
    list-style: none;
}
.pmcp-complete-compact > summary::-webkit-details-marker { display: none; }
.pmcp-complete-compact > summary::marker { content: ''; }
.pmcp-complete-compact > summary:hover { background: #f1f8f3; }
.pmcp-complete-check {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid #b9d9c3;
    background: #e4f2e8;
    color: #22643b;
    font-weight: 800;
}
.pmcp-complete-summary-copy { display: grid; gap: 2px; min-width: 0; }
.pmcp-complete-summary-copy strong { font-size: .88rem; line-height: 1.3; }
.pmcp-complete-summary-copy small { color: var(--pmcp-muted, #5f6368); font-size: .78rem; line-height: 1.35; }
.pmcp-complete-summary-action {
    margin-left: auto;
    padding-left: 10px;
    color: var(--pmcp-accent, #b21f35);
    white-space: nowrap;
    font-size: .82rem;
    font-weight: 750;
}
.pmcp-complete-compact[open] > summary { border-radius: 10px; }
.pmcp-complete-expanded { padding-top: 10px; }
.pmcp-complete-expanded > .pmcp-guide { margin-bottom: 0; }
@media (max-width: 520px) {
    .pmcp-complete-compact > summary { align-items: flex-start; flex-wrap: wrap; }
    .pmcp-complete-summary-action { margin-left: 34px; padding-left: 0; }
}

@media (max-width: 640px) {
    .pmcp-steps { grid-template-columns: 1fr; gap: 7px; }
    .pmcp-steps > span { padding: 9px 10px; }
    .pmcp-task { align-items: flex-start; flex-wrap: wrap; }
    .pmcp-task-copy { flex-basis: calc(100% - 40px); }
    .pmcp-small-link, .pmcp-config-note { margin-left: 33px; }
    .pmcp-gate { align-items: flex-start; }
    .pmcp-gate .pmcp-actions { flex-basis: 100%; }
    .pmcp-actions .pmcp-button { flex: 1 1 150px; }
}


/* Elenco pubblico dei profili che hanno completato i requisiti. */
.pmcp-completed-members {
    --pmcp-completed-ink: #202124;
    --pmcp-completed-muted: #5f6368;
    --pmcp-completed-border: #e2e5e9;
    --pmcp-completed-green: #22643b;
    margin: 1.15rem 0 1.4rem;
    padding: 14px;
    border: 1px solid var(--pmcp-completed-border);
    border-radius: 13px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 6px 22px rgba(0,0,0,.04);
    box-sizing: border-box;
    color: var(--pmcp-completed-ink);
    font-family: inherit;
}
.pmcp-completed-title { margin: 0 0 8px; font-size: clamp(1.25rem, 2vw, 1.7rem); line-height: 1.25; }
.pmcp-completed-intro, .pmcp-completed-count { color: var(--pmcp-completed-muted); line-height: 1.55; margin: 6px 0; }
.pmcp-completed-count { font-size: .88rem; font-weight: 700; }
.pmcp-completed-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 12px; margin: 16px 0 !important; padding: 0 !important; list-style: none !important; }
.pmcp-completed-card { display: flex; align-items: stretch; min-width: 0; box-sizing: border-box; padding: 0; border: 1px solid var(--pmcp-completed-border); border-radius: 13px; background: #fff; overflow: hidden; transition: border-color .15s ease, box-shadow .15s ease; }
.pmcp-completed-card:hover { border-color: #c9ced6; box-shadow: 0 5px 18px rgba(0,0,0,.045); }
.pmcp-completed-card-link { display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; padding: 13px; box-sizing: border-box; color: inherit !important; text-decoration: none !important; border-radius: inherit; }
.pmcp-completed-card-link:focus-visible { outline: 2px solid #9b4f8c; outline-offset: -3px; }
.pmcp-completed-card-link:hover .pmcp-completed-member-copy > strong { color: #8a347c; }
.pmcp-completed-avatar-wrap { flex: 0 0 52px; width: 52px; height: 52px; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; border: 1px solid #e2e5e9; border-radius: 50%; background: #f5f6f7; }
.pmcp-completed-avatar, .pmcp-completed-avatar-wrap img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.pmcp-completed-avatar-fallback { display: inline-flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: var(--pmcp-completed-green); font-size: 1.2rem; font-weight: 800; text-transform: uppercase; }
.pmcp-completed-member-copy { display: grid; gap: 5px; min-width: 0; }
.pmcp-completed-member-copy > strong { overflow-wrap: anywhere; font-size: .98rem; line-height: 1.3; }
.pmcp-completed-status { display: inline-flex; align-items: center; gap: 5px; color: var(--pmcp-completed-green); font-size: .79rem; font-weight: 700; line-height: 1.3; }
.pmcp-completed-empty { padding: 13px; border: 1px dashed var(--pmcp-completed-border); border-radius: 10px; color: var(--pmcp-completed-muted); }
.pmcp-completed-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px; margin: 18px 0 0; font-size: .9rem; }
.pmcp-completed-pagination a { color: inherit; text-decoration: none; font-weight: 700; }
.pmcp-completed-pagination a:hover { text-decoration: underline; }
.pmcp-completed-pagination span { color: var(--pmcp-completed-muted); }
