.gpc-widget {
    --gpc-accent: #7c6f91;
    --gpc-bg: #f6f7f9;
    --gpc-card: #ffffff;
    --gpc-code-bg: #f8f9fb;
    --gpc-text: #20242c;
    --gpc-muted: #687080;
    --gpc-border: #d8dde6;
    --gpc-success: #397a55;
    color-scheme: light;
    margin: 2rem 0;
    color: var(--gpc-text);
}

.gpc-widget[data-theme="dark"] {
    --gpc-bg: #11141a;
    --gpc-card: #1a1e26;
    --gpc-code-bg: #13171e;
    --gpc-text: #f2f4f7;
    --gpc-muted: #aab1bd;
    --gpc-border: #343b47;
    --gpc-success: #77c795;
    color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
    .gpc-widget[data-theme="auto"] {
        --gpc-bg: #11141a;
        --gpc-card: #1a1e26;
        --gpc-code-bg: #13171e;
        --gpc-text: #f2f4f7;
        --gpc-muted: #aab1bd;
        --gpc-border: #343b47;
        --gpc-success: #77c795;
        color-scheme: dark;
    }
}

.gpc-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 285px), 1fr));
    gap: 1rem;
}

.gpc-card {
    padding: 1.15rem;
    border: 1px solid var(--gpc-border);
    border-radius: 16px;
    background: var(--gpc-card);
    box-shadow: 0 10px 28px rgba(20, 25, 35, 0.08);
}

.gpc-code-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1rem;
}

.gpc-code {
    display: block;
    min-width: 0;
    flex: 1 1 auto;
    overflow-wrap: anywhere;
    padding: .72rem .85rem;
    border: 1px dashed var(--gpc-border);
    border-radius: 11px;
    background: var(--gpc-code-bg);
    color: var(--gpc-text);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: clamp(1rem, 2.5vw, 1.22rem);
    font-weight: 750;
    letter-spacing: .035em;
}

.gpc-copy {
    flex: 0 0 auto;
    min-height: 44px;
    padding: .7rem .95rem;
    border: 1px solid var(--gpc-accent);
    border-radius: 999px;
    background: var(--gpc-accent);
    color: #fff;
    font: inherit;
    font-size: .84rem;
    font-weight: 750;
    cursor: pointer;
    transition: transform .18s ease, filter .18s ease;
}

.gpc-copy:hover,
.gpc-copy:focus-visible {
    filter: brightness(.88);
    transform: translateY(-1px);
}

.gpc-copy:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--gpc-accent) 30%, transparent);
    outline-offset: 2px;
}

.gpc-copy.is-copied {
    background: var(--gpc-success);
    border-color: var(--gpc-success);
}

.gpc-meta {
    display: grid;
    grid-template-columns: minmax(75px, auto) 1fr;
    gap: .75rem;
    padding: .55rem 0;
    border-top: 1px solid var(--gpc-border);
}

.gpc-meta-label {
    color: var(--gpc-muted);
    font-size: .84rem;
    font-weight: 700;
}

.gpc-meta-value {
    color: var(--gpc-text);
    font-size: .93rem;
    line-height: 1.5;
}

.gpc-active-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    margin-top: .8rem;
    padding: .28rem .62rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--gpc-success) 12%, transparent);
    color: var(--gpc-success);
    font-size: .78rem;
    font-weight: 750;
}

.gpc-active-badge::before {
    width: .45rem;
    height: .45rem;
    border-radius: 50%;
    background: currentColor;
    content: "";
}

.gpc-message {
    grid-column: 1 / -1;
    padding: 1.2rem;
    border: 1px solid var(--gpc-border);
    border-radius: 14px;
    background: var(--gpc-card);
    color: var(--gpc-text);
    text-align: center;
}

.gpc-live-status,
.gpc-updated {
    margin: .75rem 0 0;
    color: var(--gpc-muted);
    font-size: .82rem;
}

.gpc-live-status:empty,
.gpc-updated:empty {
    display: none;
}

@media (max-width: 520px) {
    .gpc-code-row {
        align-items: stretch;
        flex-direction: column;
    }
    .gpc-copy { width: 100%; }
    .gpc-meta {
        grid-template-columns: 1fr;
        gap: .18rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gpc-copy { transition: none; }
}
