.sid-connect-card {
    background:
        radial-gradient(circle at top, rgba(37, 167, 255, 0.16), transparent 45%),
        linear-gradient(180deg, #0d1724 0%, #111f31 100%);
    border: 1px solid rgba(107, 203, 255, 0.24);
    border-radius: 20px;
    box-shadow: 0 16px 40px rgba(2, 10, 24, 0.28);
    color: #e8f3ff;
    padding: 24px;
}

.sid-owner-panel {
    margin-top: 14px;
    overflow: hidden;
}

/* Each provider is its own card: [tag] [stats fill the middle] [action]. Wraps on mobile. */
.sid-integration {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px 12px;
    border: 1px solid rgba(107, 203, 255, 0.12);
    border-radius: 14px;
    background: rgba(10, 18, 31, 0.34);
}
.sid-integration + .sid-integration {
    margin-top: 10px;
}
.sid-integration.is-unlinked { opacity: 0.9; border-style: dashed; }
.sid-reach-unlinked {
    flex: 1 1 240px;
    min-width: 0;
    display: flex;
    align-items: center;
}
.sid-reach-unlinked .sid-owner-help { max-width: none; font-size: 12px; }
.sid-integration-status {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #7f93b3;
    white-space: nowrap;
}

/* Inline "paste your link + Save" on each provider card. */
.sid-integration-linkform {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 260px;
    min-width: 0;
    margin: 0;
}
.sid-reach-input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(123, 150, 210, 0.32);
    background: rgba(8, 12, 22, 0.5);
    color: #eaf1ff;
    font-size: 12.5px;
}
.sid-reach-input:focus { outline: none; border-color: rgba(107, 203, 255, 0.7); }
.sid-reach-save { flex: 0 0 auto; min-height: 34px; padding: 0 14px; }

/* Owner-side "public preview": a compact badge strip mocking how reach could read publicly. */
.sid-reach-preview {
    margin-top: 12px;
    padding: 12px 14px;
    border: 1px dashed rgba(107, 203, 255, 0.2);
    border-radius: 14px;
    background: rgba(10, 18, 31, 0.28);
    display: grid;
    gap: 8px;
}
.sid-reach-preview-label {
    font-size: 9px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: #7ecfff;
}
.sid-reach-preview-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.sid-reach-badge {
    display: inline-flex; align-items: baseline; gap: 6px;
    padding: 6px 13px; border-radius: 999px;
    background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
}
.sid-reach-badge-name { font-weight: 700; color: #cfe0f5; }
.sid-reach-badge-value { font-weight: 800; font-size: 14px; color: #fff; font-variant-numeric: tabular-nums; }
.sid-reach-badge-metric { font-size: 10.5px; color: #8ba0bf; }
.sid-reach-badge-spotify { border-color: rgba(30, 215, 96, 0.4); }
.sid-reach-badge-spotify .sid-reach-badge-name { color: #7bf0ac; }
.sid-reach-badge-youtube { border-color: rgba(255, 60, 60, 0.4); }
.sid-reach-badge-youtube .sid-reach-badge-name { color: #ff9d9d; }
.sid-reach-preview-note { font-size: 10.5px; color: #7f93b3; }
.sid-integration-tag {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border-radius: 12px;
    background: rgba(88, 101, 242, 0.16); /* Discord blurple */
    border: 1px solid rgba(88, 101, 242, 0.34);
    color: #cdd3fb;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
    position: relative;
}
/* Per-provider tag colours. */
.sid-integration-spotify .sid-integration-tag { background: rgba(30, 215, 96, 0.16); border-color: rgba(30, 215, 96, 0.36); color: #7bf0ac; }
.sid-integration-youtube .sid-integration-tag { background: rgba(255, 60, 60, 0.15); border-color: rgba(255, 60, 60, 0.36); color: #ff9d9d; }

/* Tooltip on a provider tag (used for the Discord description now the group's <p> is gone).
   Shows on hover AND focus, so it works on touch (tag is tabindex=0). */
.sid-integration-tag[data-tip] { cursor: help; }
.sid-integration-tag[data-tip]::after {
    content: attr(data-tip);
    position: absolute; bottom: calc(100% + 8px); left: 0;
    width: max-content; max-width: 280px;
    background: #1b2536; color: #edf2ff; border: 1px solid rgba(255, 255, 255, 0.16);
    padding: 8px 11px; border-radius: 9px; font-size: 11px; font-weight: 500;
    letter-spacing: 0; text-transform: none; line-height: 1.4; white-space: normal;
    opacity: 0; pointer-events: none; transform: translateY(4px);
    transition: opacity .12s ease, transform .12s ease; z-index: 40;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.55);
}
.sid-integration-tag[data-tip]:hover::after,
.sid-integration-tag[data-tip]:focus::after { opacity: 1; transform: translateY(0); }

/* Reach rows (Spotify/YouTube) carry only a couple of stats — keep them compact instead of
   stretching across four columns, and mute the "Updated" cell. */
.sid-reach-grid { grid-template-columns: repeat(3, minmax(0, 190px)); flex: 0 1 auto; }
.sid-reach-grid .sid-reach-updated .sid-owner-label { color: #6f86a8; }
.sid-reach-grid .sid-reach-updated strong { color: #9fb3d0; font-size: 11px; font-weight: 600; }

.sid-owner-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    flex: 1 1 360px;
    min-width: 0;
}

.sid-owner-stat {
    background: rgba(10, 18, 31, 0.54);
    border: 1px solid rgba(107, 203, 255, 0.14);
    border-radius: 12px;
    min-width: 0;
    padding: 7px 11px;
}

.sid-owner-label {
    color: #7ecfff;
    display: block;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.12em;
    margin-bottom: 3px;
    text-transform: uppercase;
}

.sid-owner-stat strong {
    color: #fff;
    display: block;
    font-size: 12.5px;
    line-height: 1.25;
    word-break: break-word;
}

.sid-owner-stat-meta {
    color: #86a6c6;
    display: block;
    font-size: 10px;
    margin-top: 2px;
}

.sid-owner-submeta {
    color: #9ab5d1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    font-size: 12px;
    margin-top: 8px;
}

.sid-owner-bottom {
    align-items: center;
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.sid-owner-bottom > * {
    min-width: 0;
}

.sid-owner-sync-message {
    background: rgba(107, 203, 255, 0.08);
    border: 1px solid rgba(107, 203, 255, 0.2);
    border-radius: 14px;
    color: #dbeaff;
    font-size: 12px;
    line-height: 1.35;
    margin-top: 10px;
    padding: 9px 12px;
}

.sid-owner-sync-message-error {
    border-color: rgba(245, 108, 108, 0.35);
}

.sid-owner-sync-message-warning {
    border-color: rgba(255, 189, 89, 0.35);
}

.sid-owner-sync-message-success {
    border-color: rgba(92, 214, 146, 0.35);
}

.sid-owner-actions {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.sid-owner-help {
    color: #9ab5d1;
    display: inline-block;
    font-size: 13px;
    max-width: 540px;
}

.sid-owner-actions .mmp-submit {
    min-height: 34px;
    padding: 0 14px;
}

.sid-owner-panel .mmp-profile-heading p {
    font-size: 11px;
    line-height: 1.3;
}

.sid-owner-panel .mmp-card-label {
    font-size: 12px;
}

.sid-connect-card h3 {
    color: #ffffff;
    font-size: 1.5rem;
    margin: 0 0 10px;
}

.sid-connect-card p {
    color: #cfe4ff;
}

.sid-connect-meta {
    list-style: none;
    margin: 18px 0;
    padding: 0;
}

.sid-connect-meta li {
    border-top: 1px solid rgba(107, 203, 255, 0.12);
    margin: 0;
    padding: 10px 0;
}

.sid-connect-meta strong {
    color: #ffffff;
}

.sid-connect-actions {
    margin-top: 18px;
}

.sid-connect-actions .button {
    border-radius: 999px;
    min-height: 42px;
    padding: 0 18px;
}

.sid-connect-actions .button-primary {
    background: #25a7ff;
    border-color: #25a7ff;
}

.sid-connect-actions .button-primary:hover,
.sid-connect-actions .button-primary:focus {
    background: #1495ea;
    border-color: #1495ea;
}

.sid-connect-notice {
    background: rgba(107, 203, 255, 0.12);
    border: 1px solid rgba(107, 203, 255, 0.35);
    border-radius: 12px;
    margin-bottom: 16px;
    padding: 10px 12px;
}

.sid-events-feed {
    margin: 0 auto;
    max-width: 1240px;
    padding: clamp(34px, 5vw, 54px) clamp(14px, 3vw, 28px) 140px;
    position: relative;
    z-index: 2;
}

.sid-events-feed__head {
    align-items: end;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 18px;
}

.sid-events-feed__title {
    color: #fff;
    font-size: clamp(32px, 6vw, 70px);
    letter-spacing: -0.03em;
    line-height: 0.98;
    margin: 0;
}

.sid-events-feed__grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}

.sid-events-feed--compact .sid-events-feed__grid {
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.sid-events-feed__empty {
    background: rgba(10, 18, 31, 0.7);
    border: 1px solid rgba(107, 203, 255, 0.16);
    border-radius: 20px;
    color: #d3e5ff;
    padding: 18px 20px;
}

.sid-events-feed__empty-error {
    border-color: rgba(255, 125, 125, 0.26);
}

.sid-event-card {
    background:
        radial-gradient(circle at top right, rgba(107, 203, 255, 0.16), transparent 34%),
        linear-gradient(180deg, rgba(11, 20, 35, 0.92) 0%, rgba(8, 13, 24, 0.96) 100%);
    border: 1px solid rgba(107, 203, 255, 0.18);
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(1, 7, 18, 0.34);
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.sid-event-card__cover {
    aspect-ratio: 16 / 8.5;
    background: linear-gradient(135deg, rgba(43, 107, 255, 0.4), rgba(144, 255, 251, 0.12));
    overflow: hidden;
}

.sid-event-card__cover img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.sid-event-card__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
}

.sid-events-feed--compact .sid-event-card {
    border-radius: 18px;
}

.sid-events-feed--compact .sid-event-card__cover {
    aspect-ratio: 16 / 7;
}

.sid-events-feed--compact .sid-event-card__body {
    gap: 10px;
    padding: 14px;
}

.sid-events-feed--compact .sid-event-card__title {
    font-size: 18px;
}

.sid-events-feed--compact .sid-event-card__description {
    font-size: 13px;
    line-height: 1.45;
}

.sid-event-card__meta {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sid-event-card__type,
.sid-event-card__status {
    border-radius: 999px;
    display: inline-flex;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.16em;
    padding: 6px 9px;
    text-transform: uppercase;
}

.sid-event-card__type {
    background: rgba(255, 255, 255, 0.06);
    color: #cfe6ff;
}

.sid-event-card__status {
    background: rgba(107, 203, 255, 0.12);
    color: #9ed8ff;
}

.sid-event-card__status-active {
    background: rgba(92, 214, 146, 0.16);
    color: #82f0ad;
}

.sid-event-card__title {
    color: #fff;
    font-size: 22px;
    line-height: 1.05;
    margin: 0;
}

.sid-event-card__schedule {
    display: grid;
    gap: 3px;
}

.sid-event-card__schedule strong {
    color: #f2f7ff;
    font-size: 15px;
}

.sid-event-card__schedule span,
.sid-event-card__location,
.sid-event-card__attendees {
    color: #9fb7d5;
    font-size: 13px;
}

.sid-event-card__description {
    color: #d7e7fb;
    font-size: 14px;
    line-height: 1.55;
    margin: 0;
}

.sid-event-card__footer {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-top: auto;
}

.sid-event-card__link {
    border: 1px solid rgba(107, 203, 255, 0.22);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    min-height: 34px;
    padding: 0 14px;
    align-items: center;
}

.sid-event-card__link:hover,
.sid-event-card__link:focus {
    background: rgba(107, 203, 255, 0.08);
    border-color: rgba(107, 203, 255, 0.38);
    color: #9ed8ff;
}

@media (max-width: 1080px) {
    .sid-owner-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sid-owner-bottom {
        align-items: stretch;
        flex-direction: column;
    }

    .sid-owner-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .sid-connect-card {
        border-radius: 16px;
        padding: 18px;
    }

    .sid-owner-panel {
        border-radius: 18px;
        margin-top: 12px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .sid-owner-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .sid-owner-stat {
        border-radius: 14px;
        padding: 9px 12px;
    }

    .sid-owner-label {
        letter-spacing: 0.14em;
        margin-bottom: 5px;
    }

    .sid-owner-bottom {
        gap: 10px;
        margin-top: 8px;
    }

    .sid-owner-sync-message {
        border-radius: 12px;
        font-size: 11px;
        padding: 8px 10px;
    }

    .sid-owner-actions {
        align-items: stretch;
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .sid-owner-actions .mmp-submit {
        justify-content: center;
        min-height: 32px;
        width: 100%;
    }

    .sid-owner-help {
        max-width: none;
    }

    .sid-events-feed {
        padding-bottom: 124px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .sid-events-feed__grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .sid-event-card {
        border-radius: 18px;
    }

    .sid-event-card__body {
        gap: 12px;
        padding: 14px;
    }

    .sid-event-card__footer {
        align-items: flex-start;
        flex-direction: column;
    }
}
