/*
 * tribe-discussion.css  v2.0
 * FB-style group page: hero, header, nav tabs, compose widget, feed cards, sidebar.
 * Loaded ONLY on /tribe/{slug}/discussion/
 */

/* =========================================================
   0. LAYOUT OVERRIDES FOR THEME
   ========================================================= */
/* Force block layout on GeneratePress containers to prevent 50/50 flex splits */
body.single-pt_forum_topic .site-content,
body.single-pt_forum_topic .inside-article,
body.single-pt_forum_topic #primary {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* =========================================================
   HERO
   ========================================================= */
.pt-gh-hero {
    display: block !important;
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
    height: 300px;
    background: #1a1a1a center/cover no-repeat;
    position: relative;
    box-sizing: border-box;
}

.pt-gh-hero-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a1a 0%, #333 100%);
}

@media (max-width: 768px) {
    .pt-gh-hero { height: 180px; }
}

/* =========================================================
   GROUP HEADER WRAP
   ========================================================= */
.pt-gh-wrap {
    display: block !important;
    background: #f5f5f5;
    min-height: 60vh;
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
    box-sizing: border-box;
}

.pt-gh-header {
    background: #fff;
    padding: 20px 0 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
    position: relative;
    z-index: 10;
}

/* Inner container to constrain content inside the full-width wrapper */
.pt-gh-inner-container {
    max-width: 1250px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* =========================================================
   IDENTITY (avatar + title)
   ========================================================= */
.pt-gh-identity {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
}

.pt-gh-avatar,
.pt-gh-avatar-placeholder {
    width: 64px !important;
    height: 64px !important;
    border-radius: 50% !important;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    flex-shrink: 0;
    object-fit: cover;
    display: block;
}

.pt-gh-avatar-placeholder {
    background: #333;
}

.pt-gh-title-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}
.pt-gh-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.2;
}
.pt-gh-title-link {
    color: inherit;
    text-decoration: none;
}
.pt-gh-title-link:hover {
    text-decoration: underline;
    color: inherit;
}

@media (max-width: 600px) {
    .pt-gh-title { font-size: 1.15rem; }
}

/* =========================================================
   META ROW (badge + members + actions)
   ========================================================= */
.pt-gh-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}

.pt-gh-meta-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.pt-gh-meta-right {
    display: none; /* shown only at mobile breakpoint via JS move + media query */
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    margin-left: auto;
}
@media (max-width: 1100px) {
    .pt-gh-meta-right {
        display: flex;
        order: 2;
        margin-left: auto;
        flex-shrink: 0;
    }
    .pt-gh-meta-left  { flex: 1; order: 1; min-width: 0; }
    .pt-gh-actions    { order: 3; width: 100%; flex-wrap: wrap; gap: 6px; }
    .pt-gh-meta-row   { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
    /* Hide nav-extras in its original nav position when moved to meta-row */
    .pt-gh-nav-extras--moved {
        display: none !important;
    }
}

.pt-gh-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid #ddd;
    color: #555;
    background: #f5f5f5;
}

.pt-gh-badge--private { border-color: #c00; color: #c00; background: #fff5f5; }

.pt-gh-members-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
    text-decoration: none;
}
.pt-gh-members-link:hover { color: #555; text-decoration: underline; }

.pt-gh-post-count {
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
}

.pt-gh-copy-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    padding: 2px 6px;
    border-radius: 6px;
    cursor: pointer;
    color: #888;
    font-size: 0.78rem;
    font-weight: 500;
    transition: color 0.15s, background 0.15s;
    vertical-align: middle;
}
.pt-gh-copy-link:hover,
.pt-gh-copy-link:focus,
.pt-gh-copy-link:focus-visible { color: #333; background: #f5f5f5; outline: none; box-shadow: none; }
.pt-gh-copy-link.is-copied { color: #090; background: #f5f5f5; }

/* ── Copy toast ── */
.pt-copy-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    background: #222;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 20px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    z-index: 99999;
}
.pt-copy-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ── Actions ── */
.pt-gh-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pt-gh-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}

.pt-gh-btn--primary  { background: #c00; color: #fff; }
.pt-gh-btn--primary:hover,
.pt-gh-btn--primary:focus,
.pt-gh-btn--primary:focus-visible { background: #a00; color: #fff; outline: none; box-shadow: none; }

.pt-gh-btn--secondary { background: #f0f0f0; color: #1a1a1a; }
.pt-gh-btn--secondary:hover,
.pt-gh-btn--secondary:focus,
.pt-gh-btn--secondary:focus-visible { background: #e4e4e4; color: #1a1a1a; outline: none; box-shadow: none; }

.pt-gh-btn--joined { background: #e8f4e8; color: #2e7d32; border: 1px solid #c8e6c9; }
.pt-gh-btn--joined:hover,
.pt-gh-btn--joined:focus,
.pt-gh-btn--joined:focus-visible { background: #d4ebd4; color: #2e7d32; outline: none; box-shadow: none; }

/* ── Joined dropdown ── */
.pt-gh-joined-wrap { position: relative; }

.pt-gh-joined-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    min-width: 200px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 300;
    overflow: hidden;
    padding: 6px 0;
}
.pt-gh-joined-menu.is-open { display: block; }

.pt-gh-joined-section {
    font-size: 0.7rem;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 16px 4px;
}

.pt-gh-joined-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 16px;
    font-size: 0.85rem;
    color: #1a1a1a;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
}
.pt-gh-joined-item:hover,
.pt-gh-joined-item:focus,
.pt-gh-joined-item:focus-visible { background: #f5f5f5; color: #1a1a1a; outline: none; box-shadow: none; }
.pt-gh-joined-item.is-active { font-weight: 700; }
.pt-gh-check { color: #2e7d32; font-weight: 900; }
.pt-gh-leave-btn { color: #c00; }
.pt-gh-leave-btn:hover,
.pt-gh-leave-btn:focus,
.pt-gh-leave-btn:focus-visible { color: #c00; }
.pt-gh-joined-divider { border-top: 1px solid #eee; margin: 4px 0; }
.pt-gh-joined-create-cta { color: #E8650A !important; font-weight: 700; gap: 6px; }
.pt-gh-joined-create-cta:hover,
.pt-gh-joined-create-cta:focus { background: rgba(232,101,10,0.07) !important; color: #E8650A !important; outline: none; }

/* =========================================================
   NAV TABS
   ========================================================= */
.pt-gh-nav {
    display: flex;
    align-items: center;
    background: #fff;
    border-top: 1px solid #eee;
    margin-top: 4px;
    overflow-x: auto;
    scrollbar-width: none;
}
.pt-gh-nav::-webkit-scrollbar { display: none; }

.pt-gh-nav-item {
    display: inline-block;
    padding: 14px 18px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #666;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
}
.pt-gh-nav-item:hover { color: #1a1a1a; }
.pt-gh-nav-item.is-active { color: #1a1a1a; border-bottom-color: #1a1a1a; }

/* =========================================================
   FEED GRID (2-col with sidebar)
   ========================================================= */
.pt-gf-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
    max-width: 1250px;
    margin: 0 auto;
    padding: 0 20px 40px 20px;
}

.pt-gf-feed-col { min-width: 0; }

.pt-gf-sidebar-col {
    /* align-self: stretch (grid default) is intentional — lets position:sticky work inside */
}

.pt-sticky-sidebar-part.is-fixed {
    position: fixed;
    z-index: 100;
}

@media (max-width: 960px) {
    .pt-gf-grid { grid-template-columns: 1fr; }
    .pt-gf-sidebar-col { display: none; }
}

/* =========================================================
   COMPOSE BAR (Write Something trigger)
   ========================================================= */
.pt-gf-compose-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 0;
    padding: 12px 16px;
    cursor: pointer;
    margin-bottom: 16px;
    transition: border-color 0.2s;
}
.pt-gf-compose-bar:hover { border-color: #bbb; }

.pt-gf-compose-avatar {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    flex-shrink: 0;
}

.pt-gf-compose-input-face {
    flex: 1;
    background: #f5f5f5;
    border-radius: 20px;
    padding: 9px 16px;
    font-size: 0.88rem;
    color: #aaa;
}

/* ── Expanded compose ── */
.pt-gf-compose-expanded {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
}

.pt-gf-compose-hdr {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px 10px;
}

.pt-gf-compose-hdr strong {
    display: block;
    font-size: 0.9rem;
    color: #1a1a1a;
    line-height: 1.2;
}

.pt-gf-compose-scope {
    font-size: 0.72rem;
    color: #888;
}

.pt-gf-textarea-wrap {
    position: relative;
}
.pt-gf-compose-textarea {
    width: 100%;
    border: none;
    padding: 4px 16px 36px;
    font-size: 0.95rem;
    line-height: 1.6;
    resize: none;
    font-family: inherit;
    color: #1a1a1a;
    outline: none;
    min-height: 80px;
    box-sizing: border-box;
}
.pt-gf-compose-textarea::placeholder { color: #aaa; }
.pt-gf-textarea-inline-tools {
    position: absolute;
    bottom: 8px;
    left: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    pointer-events: none;
}
.pt-gf-inline-tool {
    pointer-events: all;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, background 0.15s;
}
.pt-gf-inline-tool:hover {
    color: #444;
    background: #f3f4f6;
}
.pt-gf-gif-label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: currentColor;
    line-height: 1;
}

.pt-gf-compose-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-top: 1px solid #f0f0f0;
}

.pt-gf-compose-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #888;
}

.pt-gf-compose-tools { display: flex; gap: 4px; }

.pt-gf-tool {
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.pt-gf-tool:hover,
.pt-gf-tool.is-active { background: #f5f5f5; }
.pt-gf-tool:focus,
.pt-gf-tool:focus-visible { outline: none; box-shadow: none; background: #f5f5f5; }

.pt-gf-extra-panel { padding: 10px 16px; border-top: 1px solid #f0f0f0; }
.pt-gf-extra-input {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.88rem;
    font-family: inherit;
    margin-bottom: 6px;
    box-sizing: border-box;
}
.pt-gf-extra-input:focus { outline: none; border-color: #bbb; }

.pt-gf-compose-preview { padding: 0 16px 12px; }

.pt-gf-compose-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 16px;
    border-top: 1px solid #f0f0f0;
}

.pt-gf-cancel-btn {
    background: none;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 0.85rem;
    cursor: pointer;
    color: #555;
}
.pt-gf-cancel-btn:hover,
.pt-gf-cancel-btn:focus,
.pt-gf-cancel-btn:focus-visible { background: #f0f0f0; color: #222; outline: none; box-shadow: none; }

.pt-gf-post-btn {
    background: #c00;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 20px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}
.pt-gf-post-btn:hover,
.pt-gf-post-btn:focus,
.pt-gf-post-btn:focus-visible { background: #a00; outline: none; box-shadow: none; }
.pt-gf-post-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* =========================================================
   UPCOMING EVENTS STRIP (discussion tab)
   ========================================================= */
.pt-disc-events-strip {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
}
.pt-disc-events-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
}
.pt-disc-events-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #555;
    display: flex;
    align-items: center;
    gap: 5px;
}
.pt-disc-events-viewall {
    font-size: 0.78rem;
    font-weight: 600;
    color: #888;
    text-decoration: none;
}
.pt-disc-events-viewall:hover { color: #111; }

.pt-disc-events-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 280px;
    overflow-y: auto;
}
.pt-disc-ev-row {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    padding: 10px 14px;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.1s;
    list-style: none !important;
    margin: 0 !important;
}
.pt-disc-ev-row:last-child { border-bottom: none; }
.pt-disc-ev-row:hover { background: #f9f9f9; }

.pt-disc-ev-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    background: #111;
    color: #fff;
    border-radius: 6px;
    padding: 4px 7px;
    flex-shrink: 0;
    text-align: center;
}
.pt-disc-ev-mon { font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; line-height: 1; }
.pt-disc-ev-day { font-size: 1.1rem; font-weight: 800; line-height: 1.1; }

.pt-disc-ev-info { flex: 1; min-width: 0; }
.pt-disc-ev-title {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    color: #111;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}
.pt-disc-ev-title:hover { color: #d00; }
/* Stretch the title link to cover the whole row */
.pt-disc-ev-title::after {
    content: '';
    position: absolute;
    inset: 0;
}
.pt-disc-ev-meta {
    font-size: 0.75rem;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =========================================================
   FEED EMPTY STATE
   ========================================================= */
.pt-gf-empty {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 48px 24px;
    text-align: center;
    color: #888;
    font-size: 0.95rem;
}
.pt-gf-empty-icon {
    font-size: 2.4rem;
    margin-bottom: 12px;
}
.pt-gf-empty p {
    margin: 0 0 18px;
}
.pt-gf-empty-cta {
    display: inline-block;
    padding: 9px 22px;
    background: #dd0000;
    color: #fff;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.15s;
}
.pt-gf-empty-cta:hover,
.pt-gf-empty-cta:focus,
.pt-gf-empty-cta:active { background: #c0392b; color: #fff !important; text-decoration: none; }
.pt-feed-loading {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 20px 0;
}
.pt-feed-loading span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    animation: pt-feed-bounce 0.9s infinite ease-in-out both;
}
.pt-feed-loading span:nth-child(1) { animation-delay: 0s; }
.pt-feed-loading span:nth-child(2) { animation-delay: 0.15s; }
.pt-feed-loading span:nth-child(3) { animation-delay: 0.3s; }
@keyframes pt-feed-bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40%            { transform: scale(1);   opacity: 1; }
}

/* =========================================================
   FEED CARD
   ========================================================= */
.pt-gf-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 0;
    margin-bottom: 16px;
    overflow: visible; /* must be visible so hover card isn't clipped */
    position: relative;
}

.pt-gf-card.is-pinned { border-color: #c00; }

.pt-gf-pin-flag {
    font-size: 0.78rem;
    font-weight: 700;
    color: #c00;
    padding: 8px 16px 0;
}

/* ── Card header ── */
.pt-gf-card-hdr {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 14px 16px 8px;
}

.pt-gf-card-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pt-gf-card-avatar {
    width: 42px !important;
    height: 42px !important;
    border-radius: 50% !important;
    flex-shrink: 0;
}

.pt-gf-card-author-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    line-height: 1.3;
}

.pt-gf-card-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1a1a1a;
    text-decoration: none;
}
.pt-gf-card-name:hover { text-decoration: underline; }

.pt-gf-card-badge {
    font-size: 0.72rem;
    font-weight: 600;
    color: #888;
    background: #f5f5f5;
    border-radius: 10px;
    padding: 2px 7px;
    position: relative;
}

.pt-gf-card-rep {
    position: relative;
}

.pt-gf-card-badge::after,
.pt-gf-card-rep::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 15, 15, 0.88);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 500;
    padding: 4px 9px;
    border-radius: 5px;
    width: max-content;
    max-width: min(480px, 75vw);
    text-align: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 30;
    line-height: 1.4;
}

.pt-gf-card-badge:hover::after,
.pt-gf-card-rep:hover::after {
    opacity: 1;
}

/* Flip tooltip below when near viewport top */
.pt-gf-card-badge.pt-tooltip-below::after,
.pt-gf-card-rep.pt-tooltip-below::after {
    bottom: auto;
    top: calc(100% + 6px);
}

.pt-gf-card-time {
    font-size: 0.75rem;
    color: #aaa;
}

/* ── Content ── */
.pt-gf-card-content {
    padding: 4px 16px 12px;
    font-size: 0.92rem;
    color: #1a1a1a;
    line-height: 1.55;
}
.pt-gf-card-content p:last-child { margin-bottom: 0; }
img.pt-gif-embed {
    display: block;
    max-width: 320px;
    border-radius: 6px;
    margin: 6px 0;
}
.pt-gf-reply-text img.pt-gif-embed { max-width: 240px; }

/* ── Media ── */
.pt-gf-card-media {
    overflow: hidden;
    border-radius: 0; /* card border-radius handles corners */
}
.pt-gf-card-media img {
    width: 100%;
    display: block;
    max-height: 480px;
    object-fit: cover;
}

.pt-gf-card-yt {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}
.pt-gf-card-yt iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: 0;
}

/* ── Poll ── */
.pt-feed-poll {
    margin: 0 16px 12px;
    padding: 14px 16px;
    border: 1px solid #eee;
    border-radius: 12px;
    background: #fafafa;
}
.pt-poll-question {
    font-size: 0.92rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 10px;
}
.pt-poll-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.pt-poll-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s, background 0.15s;
}
.pt-poll-option:hover { border-color: #aaa; background: #f5f5f5; }
.pt-poll-option:hover .pt-poll-label,
.pt-poll-option:focus .pt-poll-label,
.pt-poll-option:focus-visible .pt-poll-label { color: #1a1a1a; }
.pt-poll-option.is-my-vote { border-color: #1a1a1a; background: #f0f0f0; }
.pt-poll-option.is-my-vote:hover { background: #e8e8e8; }
.pt-feed-poll.pt-poll-loading .pt-poll-option { opacity: 0.6; pointer-events: none; }
.pt-poll-label { flex: 0 0 auto; min-width: 60px; color: #1a1a1a; }
.pt-poll-bar {
    flex: 1;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    display: none;
}
.is-voted .pt-poll-bar { display: block; }
.pt-poll-bar span {
    display: block;
    height: 100%;
    background: #555;
    border-radius: 3px;
    transition: width 0.4s ease;
}
.pt-poll-option.is-my-vote .pt-poll-bar span { background: #1a1a1a; }
.pt-poll-pct {
    flex: 0 0 36px;
    font-size: 0.75rem;
    color: #888;
    text-align: right;
    display: none;
}
.is-voted .pt-poll-pct { display: block; }
.pt-poll-total {
    font-size: 0.75rem;
    color: #aaa;
    margin: 8px 0 0;
}
.pt-poll-opt-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}
.pt-poll-opt-row .pt-gf-extra-input { flex: 1; margin-bottom: 0; }
.pt-poll-remove-opt {
    flex-shrink: 0;
    width: 24px; height: 24px;
    border: none; background: none;
    font-size: 1.1rem; line-height: 1;
    color: #aaa; cursor: pointer;
    border-radius: 50%;
    padding: 0;
}
.pt-poll-remove-opt:hover { color: #c00; }
.pt-poll-add-btn {
    font-size: 0.82rem;
    font-weight: 600;
    color: #555;
    background: none;
    border: 1px dashed #ccc;
    border-radius: 8px;
    padding: 6px 12px;
    cursor: pointer;
    width: 100%;
    margin-top: 2px;
}
.pt-poll-add-btn:hover,
.pt-poll-add-btn:focus,
.pt-poll-add-btn:focus-visible { border-color: #888; color: #222; background: none; outline: none; box-shadow: none; }

/* Suppress focus backgrounds on all poll interactive elements */
.pt-poll-option:focus,
.pt-poll-option:focus-visible,
.pt-poll-remove-opt:focus,
.pt-poll-remove-opt:focus-visible { outline: none; box-shadow: none; background: inherit; }

/* Edit post form */
.pt-feed-edit-form { padding: 0 16px 12px; }
.pt-feed-edit-textarea {
    width: 100%;
    min-height: 80px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.93rem;
    font-family: inherit;
    color: #1a1a1a;
    resize: vertical;
    box-sizing: border-box;
}
.pt-feed-edit-textarea:focus { outline: none; border-color: #aaa; }
.pt-feed-edit-actions { display: flex; flex-direction: row-reverse; gap: 8px; margin-top: 8px; }
.pt-feed-edit-save,
.pt-feed-edit-cancel {
    font-size: 0.82rem;
    font-weight: 700;
    border-radius: 6px;
    padding: 6px 14px;
    cursor: pointer;
    border: none;
}
.pt-feed-edit-save { background: #c0392b; color: #fff; }
.pt-feed-edit-save:hover { background: #922b21; }
.pt-feed-edit-cancel { background: #f0f0f0; color: #555; }
.pt-feed-edit-cancel:hover { background: #e0e0e0; }

/* ── Stats row ── */
.pt-gf-card-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    font-size: 0.8rem;
    color: #888;
    border-top: 1px solid #f5f5f5;
}

/* ── Action bar ── */
.pt-gf-card-actions {
    display: flex;
    border-top: 1px solid #eee;
    padding: 4px;
}

.pt-gf-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px;
    margin: 2px;
    background: none;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: color 0.08s;
}
.pt-gf-action-btn:hover,
.pt-gf-action-btn:focus,
.pt-gf-action-btn:focus-visible {
    color: #111;
    outline: none;
    background: none !important;
    box-shadow: none;
}
.pt-gf-action-btn.is-liked { color: #c00; }
.pt-gf-action-btn.pt-comment-like-btn.is-liked svg { fill: currentColor; }
.pt-gf-reply-action.is-liked { color: #c00; }

/* ── Replies section ── */
.pt-gf-card-replies {
    background: #f9f9f9;
    border-top: 1px solid #eee;
    padding: 10px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pt-gf-view-more {
    font-size: 0.82rem;
    font-weight: 700;
    color: #050505;
    text-decoration: none;
    display: block;
    padding-left: 40px; /* indent to align with reply bubbles (avatar 32px + gap 8px) */
    margin-bottom: 2px;
}
.pt-gf-view-more:hover { color: #555; text-decoration: underline; }

/* ── Comment thread wrapper ── */
.pt-gf-comment-thread {
    display: flex;
    flex-direction: column;
    position: relative;
    margin-bottom: 8px;
}

/*
 * Bridge line: runs from below the parent avatar to the bottom of .pt-gf-reply,
 * filling the gap between the avatar and where .pt-gf-nested-replies begins.
 * Left: 16px = center of 32px avatar. Top: 34px = just below avatar.
 */
.pt-gf-comment-thread.has-replies > .pt-gf-reply {
    position: relative;
}
.pt-gf-comment-thread.has-replies > .pt-gf-reply::after {
    content: '';
    position: absolute;
    left: 16px;
    top: 34px;
    bottom: 0;
    width: 2px;
    background: #dde1e5;
    z-index: 0;
}

/* ── Nested replies section ──
 * border-left IS the vertical spine, aligned with parent avatar center.
 * margin-left: 16px shifts the border to left: 16px of the thread.
 * margin-top: 0 so it starts immediately after the parent reply,
 * connecting seamlessly with the bridge line above.
 */
.pt-gf-nested-replies {
    margin-left: 16px;
    border-left: 2px solid #dde1e5;
    padding-left: 24px;
    padding-top: 6px;
    padding-bottom: 4px;
    margin-top: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
}
/* L3 grandchild container — spine sits under the L2 meta actions area */
.pt-gf-nested-replies[data-parent] {
    margin-left: 56px;
}
/* Remove bottom stem on L2: mask the border-left below the last reply's arm */
.pt-gf-nested-replies:not([data-parent]) .pt-gf-reply--sub:last-child::after {
    content: '';
    position: absolute;
    left: -27px;
    top: 16px;
    width: 6px;
    bottom: -8px;
    background: #fff;
}

/* "View all X replies" link — with horizontal arm from spine */
.pt-gf-view-replies {
    font-size: 0.8rem;
    font-weight: 700;
    color: #555;
    text-decoration: none;
    display: block;
    padding: 2px 0;
    position: relative;
}
.pt-gf-view-replies::before {
    content: '';
    position: absolute;
    left: -25px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 2px;
    background: #dde1e5;
}
.pt-gf-view-replies:hover { color: #555; text-decoration: underline; }

/* Sub-replies list */
.pt-gf-replies-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* ── Reply row ── */
.pt-gf-reply {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    position: relative;
}
.pt-gf-reply.has-open-menu { z-index: 100; }

.pt-gf-reply-avatar {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    flex-shrink: 0;
}

/* Sub-reply uses smaller avatar */
.pt-gf-reply-avatar--sub {
    width: 28px !important;
    height: 28px !important;
}

.pt-gf-reply-bubble {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
}

.pt-gf-reply-bubble-inner {
    background: #fff;
    border-radius: 18px;
    padding: 8px 12px;
    display: inline-block;
    max-width: 100%;
}

.pt-gf-reply-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: #1a1a1a;
    text-decoration: none;
    display: block;
    margin-bottom: 2px;
}
.pt-gf-reply-name:hover { text-decoration: underline; }

.pt-gf-reply-text { font-size: 0.88rem; color: #1a1a1a; }

.pt-gf-reply-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 6px 0;
}

.pt-gf-reply-action {
    font-size: 0.75rem;
    font-weight: 700;
    color: #888;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}
.pt-gf-reply-action:hover,
.pt-gf-reply-action:focus,
.pt-gf-reply-action:focus-visible {
    color: #555;
    text-decoration: underline;
    background: none !important;
    outline: none;
    box-shadow: none;
}
.pt-gf-reply-action.is-liked { color: #c00; }

.pt-gf-reply-time {
    font-size: 0.72rem;
    color: #bbb;
}

/* ── Reply input row ── */
.pt-gf-reply-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.pt-gf-reply-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 4px 10px;
    gap: 6px;
}
.pt-gf-reply-input-wrap:focus-within { border-color: #bbb; }

.pt-gf-reply-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 0.85rem;
    line-height: 1.6;
    font-family: inherit;
    background: transparent;
    color: #1a1a1a;
    min-width: 0;
    padding: 4px 10px;
    border-radius: 20px !important;
}
.pt-gf-reply-input::placeholder { color: #bbb; }

.pt-gf-reply-input-tools {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.pt-gf-reply-tool {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    color: #aaa;
    padding: 2px 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    transition: color 0.15s;
}
.pt-gf-reply-tool:hover,
.pt-gf-reply-tool:focus,
.pt-gf-reply-tool:focus-visible { color: #555; background: #f5f5f5; outline: none; box-shadow: none; }
.pt-gf-reply-submit { color: #c00; }
.pt-gf-reply-submit:hover,
.pt-gf-reply-submit:focus,
.pt-gf-reply-submit:focus-visible { color: #a00; background: #f5f5f5; outline: none; box-shadow: none; }
.pt-gf-inline-cancel-btn { color: #bbb; font-size: 0.75rem; }
.pt-gf-inline-cancel-btn:hover { color: #888; }
.pt-gf-inline-reply-row { margin-top: 4px; }
.pt-gf-reply-to-reply.is-replying { color: #555; }

/* =========================================================
   NESTED REPLIES — sub-reply horizontal arm connectors
   ========================================================= */

/* Each sub-reply gets a horizontal arm from the spine to its avatar */
.pt-gf-reply--sub {
    position: relative;
}
.pt-gf-reply--sub::before {
    content: '';
    position: absolute;
    left: -25px;   /* from content edge back to the border-left spine */
    top: 13px;     /* center of 28px sub-avatar */
    width: 18px;
    height: 2px;
    background: #dde1e5;
}

/* =========================================================
   THREE-DOT MENU
   ========================================================= */
.pt-sp-three-dot { position: relative; }

.pt-sp-dots-btn {
    background: none;
    border: none;
    font-size: 1.1rem;
    color: #bbb;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    border-radius: 4px;
}
.pt-sp-dots-btn:hover { color: #333; background: #f5f5f5; }

.pt-sp-dots-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: #1a1a1a;
    min-width: 180px;
    z-index: 200;
    box-shadow: 0 4px 20px rgba(0,0,0,0.35);
    border-radius: 8px;
    overflow: hidden;
}
.pt-sp-dots-menu.is-open { display: block; }

.pt-dots-item {
    display: block;
    width: 100%;
    padding: 11px 16px;
    color: #eee;
    font-size: 0.85rem;
    text-decoration: none;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.pt-dots-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.pt-dots-danger { color: #ff6b6b !important; }

/* ── Attachment edit overlays (shown when post enters edit mode) ── */
.pt-gf-card-media,
.pt-gf-card-yt,
.pt-feed-poll,
.pt-feed-mp-listings { position: relative; }

.pt-attach-overlay {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 6px;
    z-index: 10;
}

.pt-attach-remove-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.pt-attach-remove-btn:hover { background: rgba(200,30,30,0.85); }

.pt-attach-replace-btn {
    border: none;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 0 12px;
    height: 28px;
    border-radius: 14px;
    cursor: pointer;
    white-space: nowrap;
}
.pt-attach-replace-btn:hover { background: rgba(232,101,10,0.9); }

/* Staged removal state */
.pt-attach-will-remove {
    opacity: 0.3;
    transition: opacity 0.2s;
}
.pt-attach-will-remove .pt-attach-overlay {
    opacity: 1;  /* keep buttons visible */
}

/* Listings staged-replace placeholder */
.pt-attach-listings-pending {
    padding: 16px;
    font-size: 13px;
    color: #E8650A;
    font-weight: 600;
    background: rgba(232,101,10,0.06);
    border: 1px dashed rgba(232,101,10,0.4);
    border-radius: 8px;
    text-align: center;
}

/* =========================================================
   SIDEBAR WIDGETS
   ========================================================= */
.pt-swb {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 0;
    overflow: hidden;
    margin-bottom: 16px;
}

.pt-swb-head {
    background: #1a1a1a;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 10px 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pt-swb-body { padding: 16px; }

.pt-swb-about-text {
    font-size: 0.85rem;
    color: #555;
    line-height: 1.5;
    margin: 0 0 10px;
}

.pt-swb-stats-row {
    font-size: 0.82rem;
    color: #777;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.pt-swb-rules {
    font-size: 0.85rem;
    color: #444;
    line-height: 1.55;
}
.pt-swb-rules p { margin: 0 0 8px; }

.pt-swb-mod-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.pt-swb-mod-row:last-child { margin-bottom: 0; }
.pt-swb-mod-avatar { border-radius: 50% !important; }

.pt-swb-mod-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: #1a1a1a;
    text-decoration: none;
    display: block;
}
.pt-swb-mod-name:hover { color: #1a1a1a; text-decoration: underline; }
.pt-swb-mod-role { font-size: 0.75rem; color: #888; }

/* =========================================================
   HOVER CARDS & POST STATS
   ========================================================= */
.pt-hover-card-wrap { position: relative; display: inline-block; }
.pt-hover-card {
    display: none; position: absolute; top: 100%; left: 0; z-index: 1000;
    background: #fff; border: 1px solid #eee; border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15); width: 280px; padding: 20px;
    cursor: default; text-align: left;
}
.pt-hover-card-wrap:hover .pt-hover-card { display: block; }
.pt-hc-header { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; border-bottom: 1px solid #f5f5f5; padding-bottom: 12px; }
.pt-hc-avatar { width: 50px !important; height: 50px !important; border-radius: 50% !important; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.1); flex-shrink: 0; }
.pt-hc-name { font-weight: 800; font-size: 1.05rem; color: #111; display: block; margin-bottom: 4px; line-height: 1.1; }
.pt-hc-rank { font-size: 0.75rem; color: #c00; font-weight: 700; text-transform: uppercase; }
.pt-hc-stats { font-size: 0.8rem; color: #666; margin-bottom: 16px; line-height: 1.6; }
.pt-hc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pt-hc-btn { flex: 1; text-align: center; padding: 8px 0; font-size: 0.8rem; font-weight: 700; border-radius: 6px; cursor: pointer; text-decoration: none; border: 1px solid transparent; line-height: 1; }
.pt-hc-follow { background: #000; color: #fff; border-color: #000; }
.pt-hc-msg { background: #f5f5f5; color: #111; border-color: #ddd; }
.pt-hc-follow:hover { background: #333; color: #fff; }
.pt-hc-msg:hover { background: #e0e0e0; }

.pt-gf-card-rep {
    font-size: 0.72rem; font-weight: 700; color: #d00;
    background: #fff5f5; border-radius: 4px; padding: 2px 6px; margin-left: 6px;
}

.pt-click-post { cursor: pointer; transition: opacity 0.15s; }
.pt-click-post:hover { opacity: 0.7; }

/* =========================================================
   MODALS
   ========================================================= */
.pt-modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 9999;
    display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px);
}
.pt-modal-box {
    background: #fff;
    border-radius: 12px !important;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 30px !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    text-align: left !important;
}
.pt-modal-close {
    position: absolute !important;
    top: 14px !important;
    right: 16px !important;
    background: none !important;
    border: none !important;
    font-size: 1.5rem !important;
    cursor: pointer;
    color: #aaa !important;
    transition: color 0.15s;
    line-height: 1;
    padding: 4px !important;
    border-radius: 6px;
    z-index: 10;
}
.pt-modal-close:hover,
.pt-modal-close:focus,
.pt-modal-close:focus-visible { color: #333 !important; background: none !important; outline: none !important; box-shadow: none !important; }

/* =========================================================
   HOVER CARD ON AUTHOR NAME
   — uses position:fixed via JS so no parent overflow can clip it
   ========================================================= */
.pt-gf-hc-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}
.pt-gf-hc-wrap .pt-gf-card-avatar { cursor: pointer; }

/* Reply: avatar hc-wrap stays tight (hovercard is position:fixed so out of flow) */
.pt-gf-reply .pt-gf-hc-wrap {
    gap: 0;
    flex-shrink: 0;
}
/* Reply avatar link/span: no extra layout */
.pt-gf-reply-avatar-link {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
/* Name wrap inside reply bubble: inline so it flows naturally with the text */
.pt-gf-reply-name-wrap {
    display: inline;
}
/* Trigger elements get pointer cursor */
.pt-gf-hc-trigger { cursor: pointer; }

.pt-gf-hover-card {
    display: none;
    position: fixed;
    z-index: 99999;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    width: 290px;
    padding: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.16);
    box-sizing: border-box;
    pointer-events: none;
}
.pt-gf-hover-card.is-visible {
    display: flex;
    flex-direction: column;
    pointer-events: auto;
}

/* ── Top row: avatar + name/badge/rep ── */
.pt-hc-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.pt-hc-avatar-ring {
    flex-shrink: 0;
}
.pt-hc-avatar {
    width: 52px !important;
    height: 52px !important;
    border-radius: 50% !important;
    display: block;
}
.pt-hc-top-info { flex: 1; min-width: 0; }

.pt-hc-name {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
}
a.pt-hc-name:hover { color: #1a1a1a; text-decoration: underline; }
.pt-hc-avatar-ring a { display: block; border-radius: 50%; }
.pt-hc-avatar-ring a:hover .pt-hc-avatar { opacity: 0.85; }
.pt-hc-badge {
    display: inline-block;
    font-size: 0.7rem;
    background: #f5f5f5;
    border-radius: 10px;
    padding: 2px 7px;
    margin-right: 4px;
    vertical-align: middle;
}
.pt-hc-rep-pill {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    color: #c00;
    background: #fff5f5;
    border-radius: 10px;
    padding: 2px 7px;
    vertical-align: middle;
}

/* ── Meta rows ── */
.pt-hc-active-row,
.pt-hc-loc-row {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 3px;
}
.pt-hc-active-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4caf50;
    flex-shrink: 0;
}
.pt-hc-member-since {
    font-size: 0.75rem;
    color: #aaa;
    margin-bottom: 0;
}

/* ── Divider before actions ── */
.pt-hc-divider {
    display: none; /* Replaced by border-top on .pt-hc-actions for robustness */
}

/* ── Action buttons ── */
.pt-hc-actions {
    display: flex;
    gap: 8px;
    width: 100%;
    margin-top: auto; /* Pushes to the bottom of the flex container */
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}
.pt-hc-btn {
    flex: 1;
    padding: 8px 10px;
    border-radius: 7px;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
    background: #f5f5f5;
    color: #1a1a1a;
    border: 1px solid #e0e0e0;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* Follow — primary (dark fill) */
.pt-hc-btn--follow {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}
.pt-hc-btn--follow:hover { background: #333; border-color: #333; color: #fff; }
.pt-hc-btn--follow.is-following {
    background: #e8f5e9;
    color: #2e7d32;
    border-color: #a5d6a7;
    font-weight: 600;
}
.pt-hc-btn--follow.is-following:hover { background: #fff5f5; color: #c00; border-color: #c00; }
/* Message — secondary (outlined) */
.pt-hc-btn--msg {
    background: #fff;
    color: #1a1a1a;
    border-color: #ccc;
}
.pt-hc-btn--msg:hover { background: #f5f5f5; border-color: #999; color: #1a1a1a; }

/* ── Card meta row (badge + rep + time) ── */
.pt-gf-card-meta-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 1px;
}

/* Override the existing .pt-gf-card-rep to match new context */
.pt-gf-card-meta-row .pt-gf-card-rep {
    font-size: 0.72rem;
    color: #c00;
    font-weight: 700;
    background: #fff5f5;
    border-radius: 10px;
    padding: 2px 7px;
    margin-left: 0;
}

/* =========================================================
   ONLINE DOT
   ========================================================= */
.pt-online-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4CAF50;
    margin-right: 2px;
    vertical-align: middle;
}

.pt-swb-stat-row {
    font-size: 0.85rem;
    color: #555;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.pt-swb-stat-row:last-child { margin-bottom: 0; }

/* =========================================================
   CREATE TRIBE CTA
   ========================================================= */
.pt-swb-create-cta .pt-swb-body {
    text-align: center;
    padding: 20px 16px;
}

.pt-cta-eyebrow {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #aaa;
    margin: 0 0 4px;
}

.pt-cta-text {
    font-size: 0.85rem;
    color: #555;
    margin: 0 0 14px;
    line-height: 1.4;
}

.pt-cta-btn {
    display: inline-block;
    background: #1a1a1a;
    color: #fff;
    border-radius: 6px;
    padding: 9px 18px;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.15s;
}
.pt-cta-btn:hover { background: #333; color: #fff; }

/* =========================================================
   ABOUT TAB
   ========================================================= */
.pt-about-split-grid {
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
    align-items: stretch;
}
.pt-about-split-grid .pt-about-section {
    margin-bottom: 0;
    height: 100%;
    box-sizing: border-box;
}

.pt-about-section { background: #fff; border: 1px solid #eee; border-radius: 12px; padding: 24px; margin-bottom: 16px; }
.pt-about-section h2 { font-size: 1.1rem; font-weight: 800; margin: 0 0 12px; color: #1a1a1a; }
.pt-about-section h3 { font-size: 0.95rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; margin: 0 0 14px; color: #1a1a1a; }
.pt-about-desc { font-size: 0.92rem; color: #444; line-height: 1.6; margin: 0; }

.pt-about-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.pt-about-stat {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 12px 14px;
}
.pt-about-stat-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; color: #aaa; display: block; margin-bottom: 4px; }
.pt-about-stat-value { font-size: 1rem; font-weight: 800; color: #1a1a1a; display: block; }

/* =========================================================
   MEMBERS TAB
   ========================================================= */
.pt-gf-members-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.pt-members-search-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.88rem;
    font-family: inherit;
    min-width: 0;
}
.pt-members-search-input:focus { outline: none; border-color: #bbb; }

.pt-members-sort-tabs { display: flex; gap: 6px; flex-shrink: 0; }
.pt-msort-btn {
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    border: 1px solid #ddd;
    background: #fff;
    color: #555;
    cursor: pointer;
    transition: all 0.15s;
}
.pt-msort-btn.is-active { background: #1a1a1a; color: #fff; border-color: #1a1a1a; }

.pt-member-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    margin-bottom: 8px;
    transition: border-color 0.15s;
}
.pt-member-row:hover { border-color: #ddd; }

.pt-member-avatar { border-radius: 50% !important; flex-shrink: 0; }

.pt-member-info { flex: 1; min-width: 0; }
.pt-member-name { font-size: 0.9rem; font-weight: 700; color: #1a1a1a; text-decoration: none; display: block; }
.pt-member-name:hover { color: #1a1a1a; text-decoration: underline; }
.pt-member-badge { font-size: 0.72rem; color: #888; margin-right: 6px; }
.pt-member-rep { font-size: 0.72rem; color: #c00; font-weight: 700; }

.pt-member-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.pt-member-label { font-size: 0.75rem; font-weight: 700; color: #888; }

.pt-member-follow-btn {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    border: 1px solid #ddd;
    background: #f5f5f5;
    color: #333;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.pt-member-follow-btn:hover { background: #333; color: #fff; border-color: #333; }
.pt-member-follow-btn.is-following { background: #e8f4e8; color: #2e7d32; border-color: #c8e6c9; }

/* ── Online stat link (sidebar) ─────────────────────────────────────────── */
.pt-online-stat-link {
    display: flex;
    align-items: center;
    gap: 4px;
    color: inherit;
    text-decoration: none;
}
.pt-online-stat-link:hover { text-decoration: underline; color: inherit; }

/* ── Online Now section (members tab) ────────────────────────────────────── */
.pt-online-section {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 16px;
}
.pt-online-section-hdr {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    color: #1a1a1a;
    margin-bottom: 12px;
}
.pt-online-section-hdr strong { flex: 1; }
.pt-online-toggle {
    font-size: 0.75rem;
    color: #888;
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background 0.1s;
}
.pt-online-toggle:hover { background: #f5f5f5; color: #333; }

.pt-online-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.pt-online-member {
    display: flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    color: #1a1a1a;
    font-size: 0.83rem;
    font-weight: 600;
    padding: 5px 10px 5px 5px;
    border-radius: 20px;
    border: 1px solid #eee;
    background: #fafafa;
    transition: border-color 0.12s, background 0.12s;
}
.pt-online-member:hover { border-color: #ccc; background: #f5f5f5; color: #1a1a1a; }
.pt-online-avatar-wrap { position: relative; flex-shrink: 0; }
.pt-online-avatar { border-radius: 50% !important; display: block; }
.pt-online-pip {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #4CAF50;
    border: 2px solid #fafafa;
}
.pt-online-name { white-space: nowrap; }
.pt-online-empty { font-size: 0.82rem; color: #aaa; margin: 0; }

/* ── Rules widget ────────────────────────────────────────────────────────── */
.pt-swb-body--rules { background: #fffbeb; }

.pt-swb-head--rules {
    background: #fffbeb;
    color: #92400e;
    border-bottom: 1px solid #fde68a;
    display: flex;
    align-items: center;
    gap: 7px;
}

/* Amber border on the whole widget when rules head is present */
.pt-swb:has(.pt-swb-head--rules) { border-color: #fde68a; }

/* =========================================================
   MEDIA TAB
   ========================================================= */
.pt-media-tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.pt-media-tab-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    border: 1px solid #ddd;
    background: #fff;
    color: #555;
    cursor: pointer;
    transition: all 0.15s;
}
.pt-media-tab-btn.is-active { background: #1a1a1a; color: #fff; border-color: #1a1a1a; }

.pt-media-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
@media (max-width: 600px) { .pt-media-grid { grid-template-columns: repeat(2, 1fr); } }

.pt-media-item {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    background: #f5f5f5;
}
.pt-media-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity 0.2s; }
.pt-media-item:hover img { opacity: 0.85; }

.pt-media-item-type {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

/* =========================================================
   VIEW MORE MODAL
   ========================================================= */
.pt-vmore-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 9000;
    align-items: center;
    justify-content: center;
}
.pt-vmore-overlay.is-open { display: flex; }

.pt-vmore-modal {
    background: #fff;
    border-radius: 0;
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    margin: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.pt-vmore-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}
.pt-vmore-hdr h3 { margin: 0; font-size: 1rem; }

.pt-vmore-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: #888;
    line-height: 1;
    padding: 0 4px;
}
.pt-vmore-close:hover,
.pt-vmore-close:focus,
.pt-vmore-close:focus-visible { color: #333; background: none; outline: none; box-shadow: none; }

.pt-vmore-body { overflow-y: auto; flex: 1; min-height: 0; padding: 0; }

/* ── Thread modal content ── */
.pt-thread-wrap { display: flex; flex-direction: column; }

.pt-thread-parent {
    padding: 16px 20px 12px;
    border-bottom: 1px solid #eee;
}
.pt-thread-author-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.pt-thread-avatar {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    flex-shrink: 0;
}
.pt-thread-avatar--sm {
    width: 32px !important;
    height: 32px !important;
}
.pt-thread-author-info { display: flex; flex-direction: column; gap: 1px; }
.pt-thread-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: #1a1a1a;
    text-decoration: none;
    display: block;
}
.pt-thread-name:hover { text-decoration: underline; }
.pt-thread-time { font-size: 0.72rem; color: #aaa; }
.pt-thread-content {
    font-size: 0.92rem;
    color: #1a1a1a;
    line-height: 1.5;
    padding-left: 50px; /* indent under avatar */
}
.pt-thread-likes-row {
    font-size: 0.78rem;
    color: #888;
    padding-left: 50px;
    margin-top: 6px;
}

.pt-thread-replies {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
}
.pt-thread-reply {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 20px;
    border-bottom: 1px solid #f5f5f5;
}
.pt-thread-reply:last-child { border-bottom: none; }
.pt-thread-reply-body { flex: 1; min-width: 0; }
.pt-thread-reply-bubble {
    background: #f5f5f5;
    border-radius: 14px;
    padding: 8px 12px;
    display: inline-block;
    max-width: 100%;
}
.pt-thread-reply-bubble .pt-thread-name { margin-bottom: 2px; }
.pt-thread-text { font-size: 0.88rem; color: #1a1a1a; display: block; }
.pt-thread-reply-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 4px 0;
}
.pt-thread-likes-count { font-size: 0.75rem; color: #888; }
.pt-thread-sub-count   { font-size: 0.75rem; color: #aaa; }
.pt-thread-badge       { font-size: 0.7rem; color: #888; background: #f5f5f5; border-radius: 10px; padding: 1px 6px; }

/* ── Full post modal extras (.pt-gf-view-more) ── */
.pt-fpm-post {
    padding: 16px 16px 12px;
    border-bottom: 1px solid #eee;
    margin-bottom: 8px;
}
.pt-fpm-author-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}
.pt-fpm-avatar { width: 42px; height: 42px; border-radius: 50%; }
.pt-fpm-author-info { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.pt-fpm-name { font-weight: 600; font-size: 0.88rem; color: #1a1a1a; text-decoration: none; }
.pt-fpm-name:hover { text-decoration: underline; }
.pt-fpm-badge { font-size: 0.72rem; font-weight: 600; color: #888; background: #f5f5f5; border-radius: 10px; padding: 2px 7px; }
.pt-fpm-rep { font-size: 0.72rem; font-weight: 700; color: #d00; background: #fff5f5; border-radius: 4px; padding: 2px 6px; }
.pt-fpm-time { font-size: 0.72rem; color: #bbb; }
.pt-fpm-time--short { display: none; }
@media (max-width: 768px) {
    .pt-fpm-time--long { display: none; }
    .pt-fpm-time--short { display: inline; }
}
.pt-fpm-content {
    font-size: 0.93rem;
    color: #1a1a1a;
    line-height: 1.55;
    padding: 0 0 8px 52px; /* indent under 42px avatar + 10px gap */
    white-space: pre-wrap;
    word-break: break-word;
}
.pt-fpm-media { margin: 0 0 8px; border-radius: 8px; overflow: hidden; }
.pt-fpm-media img { width: 100%; display: block; max-height: 400px; object-fit: cover; }
.pt-fpm-yt { position: relative; padding-bottom: 56.25%; height: 0; }
.pt-fpm-yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pt-fpm-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    color: #888;
    padding: 8px 16px 0;
    border-top: 1px solid #f5f5f5;
    margin-top: 8px;
}

.pt-fpm-stats-comments { margin-left: auto; }

/* Modal: feed-class comments get side padding so they aren't flush against the modal edge */
#pt-vmore-body .pt-gf-comment-thread { padding: 4px 16px; }
/* Thread modal (view-replies): outer thread needs top padding */
#pt-vmore-body > .pt-gf-comment-thread { padding-top: 12px; }
/* Bubble background in modal */
#pt-vmore-body .pt-gf-reply-bubble-inner { background: #f9f9f9; }
/* Reply input pinned to the bottom of the modal */
#pt-vmore-body .pt-gf-reply-input-row {
    padding: 10px 16px 14px;
    border-top: 1px solid #eee;
    margin-top: 6px;
    position: sticky;
    bottom: 0;
    background: #fff;
}
/* Thread modal reply input indented to align with sub-replies */
#pt-vmore-body .pt-gf-reply-input-row--thread { padding-left: 16px; }

/* =========================================================
   INVITE MODAL
   ========================================================= */
.pt-invite-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 9000;
    align-items: center;
    justify-content: center;
}
.pt-invite-overlay.is-open { display: flex; }

.pt-invite-modal {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 480px;
    max-height: 80vh;
    margin: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.pt-invite-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}
.pt-invite-hdr h3 { margin: 0; font-size: 1rem; }

.pt-invite-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: #888;
}
.pt-invite-close:hover,
.pt-invite-close:focus,
.pt-invite-close:focus-visible { color: #333; background: none; outline: none; box-shadow: none; }

.pt-invite-search-wrap { padding: 12px 16px; border-bottom: 1px solid #eee; flex-shrink: 0; }
.pt-invite-search {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 9px 14px;
    font-size: 0.88rem;
    font-family: inherit;
    box-sizing: border-box;
}
.pt-invite-search:focus { outline: none; border-color: #bbb; }

.pt-invite-list { overflow-y: auto; flex: 1; padding: 8px 0; }

.pt-invite-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    transition: background 0.1s;
}
.pt-invite-row:hover { background: #f9f9f9; }

.pt-invite-avatar { border-radius: 50% !important; flex-shrink: 0; }
.pt-invite-info { flex: 1; min-width: 0; }
.pt-invite-name { font-size: 0.88rem; font-weight: 700; color: #1a1a1a; display: block; }
.pt-invite-badge { font-size: 0.72rem; color: #888; }
.pt-invite-already { font-size: 0.72rem; color: #2e7d32; font-weight: 700; display: block; }

.pt-invite-check-label { flex-shrink: 0; cursor: pointer; }
.pt-invite-checkbox { width: 18px; height: 18px; cursor: pointer; accent-color: #c00; }
.pt-invite-checkbox:disabled { opacity: 0.4; cursor: not-allowed; }

.pt-invite-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-top: 1px solid #eee;
    flex-shrink: 0;
}

#pt-invite-count { font-size: 0.82rem; color: #888; flex: 1; }

.pt-invite-deselect {
    background: none;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 7px 12px;
    font-size: 0.8rem;
    cursor: pointer;
    color: #555;
}
.pt-invite-deselect:hover { background: #f5f5f5; }

.pt-invite-send {
    background: #c00;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 18px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
}
.pt-invite-send:hover { background: #333; }
.pt-invite-send:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── Reply input border radius match ── */
.pt-gf-reply-input { border-radius: 20px; }

/* ── Body scroll lock when modal open ── */
html.pt-modal-open,
body.pt-modal-open { overflow: hidden; }

/* =========================================================
   HOME / LANDING TAB
   ========================================================= */
.pt-home-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
}

.pt-home-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0 0 10px;
}

.pt-home-desc {
    font-size: 0.92rem;
    color: #444;
    line-height: 1.6;
    margin: 0 0 14px;
}

.pt-home-meta-strip {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 0.82rem;
    color: #777;
    margin-bottom: 18px;
}

.pt-th-about-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.pt-th-about-heading h2 {
    margin: 0;
}

.pt-home-cta-btn {
    display: inline-block;
    background: #c00;
    color: #fff;
    border-radius: 6px;
    padding: 10px 22px;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.15s;
    margin-top: 20px;
}
.pt-home-cta-btn:hover,
.pt-home-cta-btn:focus,
.pt-home-cta-btn:active { background: #333; color: #fff !important; }

.pt-home-nav-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.pt-home-nav-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 18px 16px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: border-color 0.15s;
}
.pt-home-nav-card:hover { border-color: #bbb; }

.pt-home-nav-icon { font-size: 1.5rem; line-height: 1; }
.pt-home-nav-label { font-size: 0.9rem; font-weight: 700; color: #1a1a1a; }
.pt-home-nav-sub   { font-size: 0.78rem; color: #888; }

.pt-home-recent { }

.pt-home-section-title {
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
    margin: 0 0 14px;
}

.pt-home-recent-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-top: 1px solid #f5f5f5;
}

.pt-home-recent-avatar {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    flex-shrink: 0;
}

.pt-home-recent-body { flex: 1; min-width: 0; }
.pt-home-recent-name { font-size: 0.82rem; font-weight: 700; color: #1a1a1a; display: block; margin-bottom: 2px; }
.pt-home-recent-text { font-size: 0.82rem; color: #555; margin: 0; line-height: 1.4; }

.pt-home-recent-link {
    font-size: 0.78rem;
    font-weight: 700;
    color: #555;
    text-decoration: none;
    flex-shrink: 0;
    margin-top: 2px;
}
.pt-home-recent-link:hover { text-decoration: underline; }

.pt-home-see-all {
    display: block;
    text-align: center;
    margin-top: 12px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #555;
    text-decoration: none;
}
.pt-home-see-all:hover { color: #1a1a1a; text-decoration: underline; }

/* =========================================================
   NAV EXTRAS (search + dots in nav bar)
   ========================================================= */
.pt-gh-nav-extras {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    background: transparent;
    padding: 0 4px;
}
.pt-gh-nav-icon-btn {
    width: 34px;
    height: 34px;
    border: none;
    background: transparent !important;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: background 0.12s, color 0.12s;
    padding: 0;
    line-height: 1;
}
.pt-gh-nav-icon-btn:hover { background: rgba(0,0,0,0.06) !important; color: #111; }

.pt-gh-nav-extras,
.pt-gh-nav-dots-wrap { position: relative; overflow: visible !important; }

.pt-gh-nav-dots-menu {
    display: none;
    position: absolute;
    z-index: 9999;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.12);
    padding: 6px;
    min-width: 200px;
    white-space: nowrap;
}
.pt-gh-nav-dots-menu.is-open { display: block; }

.pt-nav-dots-item {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 9px 12px;
    font-size: 0.84rem;
    font-weight: 600;
    color: #222;
    background: none;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    text-align: left;
    transition: background 0.12s;
}
.pt-nav-dots-item:hover,
.pt-nav-dots-item:focus { background: #f5f5f5; color: #222; outline: none; }
.pt-nav-dots-item--danger { color: #c00; }
.pt-nav-dots-item--danger:hover,
.pt-nav-dots-item--danger:focus { background: #fff5f5; color: #c00; outline: none; }
.pt-nav-dots-item--create { color: #E8650A; font-weight: 700; }
.pt-nav-dots-item--create:hover,
.pt-nav-dots-item--create:focus { background: rgba(232,101,10,0.07); color: #E8650A; outline: none; }

/* =========================================================
   REPLY THREE-DOT MENU
   ========================================================= */
/* Dots wrap: flex sibling of .pt-gf-reply-bubble, sits to its right */
.pt-reply-dot-wrap {
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 5px;
    position: relative;
}
.pt-reply-dots-btn {
    width: 26px;
    height: 26px;
    border: none;
    background: transparent !important;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    opacity: 0;
    transition: opacity 0.12s, background 0.12s, color 0.12s;
    padding: 0;
    box-shadow: none;
}
.pt-gf-reply:hover .pt-reply-dots-btn,
.pt-reply-dots-btn:focus { opacity: 1; }
.pt-reply-dots-btn:hover { background: #f0f0f0 !important; color: #444; }

.pt-reply-dots-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    z-index: 700;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 9px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.11);
    padding: 5px;
    min-width: 180px;
    white-space: nowrap;
}
.pt-reply-dots-menu.is-open { display: block; }

.pt-reply-dots-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 11px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #222;
    background: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    transition: background 0.1s;
}
.pt-reply-dots-item:hover { background: #f5f5f5; color: #222; }
.pt-reply-dots-item--danger { color: #c00; }
.pt-reply-dots-item--danger:hover { background: #fff5f5; color: #c00; }

/* =========================================================
   SHARE POPUP
   ========================================================= */
.pt-share-popup {
    display: none;
    position: fixed;
    z-index: 900;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.13);
    padding: 6px;
    min-width: 185px;
}
.pt-share-popup.is-open { display: block; }
.pt-share-option {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 9px 12px;
    font-size: 0.84rem;
    font-weight: 600;
    color: #222;
    background: none;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.12s;
    text-align: left;
    box-sizing: border-box;
}
.pt-share-option:hover { background: #f5f5f5; color: #111; }
.pt-share-copy { border-bottom: 1px solid #f0f0f0; padding-bottom: 12px; margin-bottom: 4px; }

/* =========================================================
   EMOJI PICKER
   ========================================================= */
.pt-emoji-picker {
    display: none;
    position: absolute;
    z-index: 99999;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.14);
    width: 280px;
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
}
.pt-emoji-picker.is-open { display: block; }
.pt-emoji-section-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: #bbb;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 6px 2px 3px;
}
.pt-emoji-grid { display: flex; flex-wrap: wrap; gap: 1px; margin-bottom: 6px; }
.pt-emoji-item {
    background: none;
    border: none;
    font-size: 1.25rem;
    line-height: 1;
    width: 34px;
    height: 34px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.1s;
    padding: 0;
}
.pt-emoji-item:hover { background: #f0f0f0; }

/* =========================================================
   GIF PICKER
   ========================================================= */
.pt-gif-picker {
    display: none;
    position: absolute;
    z-index: 99999;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.14);
    width: 300px;
    padding: 10px;
    box-sizing: border-box;
}
.pt-gif-picker.is-open { display: block; }
.pt-gif-picker-hdr input {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.84rem;
    outline: none;
    margin-bottom: 8px;
}
.pt-gif-picker-hdr input:focus { border-color: #999; }
.pt-gif-results {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-height: 260px;
    overflow-y: auto;
}
.pt-gif-item {
    width: calc(33.3% - 3px);
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid #eee;
    transition: opacity 0.12s;
}
.pt-gif-item:hover { opacity: 0.82; }
.pt-gif-hint,
.pt-gif-loading { font-size: 0.8rem; color: #aaa; padding: 20px 0; text-align: center; width: 100%; }
#pt-gif-load-more {
    width: 100%;
    margin-top: 6px;
    padding: 7px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 7px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}

/* =========================================================
   MOBILE — FORUM / TRIBE PAGE
   ========================================================= */
@media (max-width: 768px) {

    /* Header identity: tighten gap */
    .pt-gh-identity { gap: 10px; }

    /* Meta row: row 1 = badge+members + search/dots; row 2 = actions */
    .pt-gh-meta-row {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px 10px;
    }
    .pt-gh-meta-left {
        flex: 1;
        order: 1;
        min-width: 0;
    }
    .pt-gh-meta-right {
        order: 2;
        margin-left: auto;
        flex-shrink: 0;
    }

    /* Actions row: full-width on its own line below */
    .pt-gh-actions {
        order: 3;
        width: 100%;
        flex-wrap: wrap;
        gap: 6px;
    }
    .pt-gh-actions .pt-gh-btn { flex: 1; justify-content: center; min-width: 80px; }
    .pt-gh-joined-wrap { flex: 1; }
    .pt-gh-joined-wrap .pt-gh-btn { width: 100%; justify-content: center; }

    /* Feed grid: add horizontal padding on mobile */
    .pt-gf-grid { padding: 0 12px 32px 12px; gap: 16px; }

    /* Compose: stack toolbar buttons */
    .pt-gf-compose-toolbar { flex-wrap: wrap; gap: 8px; }
    .pt-gf-compose-tools { flex-wrap: wrap; }

    /* Feed card: tighten padding */
    .pt-gf-card-hdr { padding: 10px 12px 6px; }
    .pt-gf-card-content { padding: 4px 12px 10px; }
    .pt-gf-card-replies { padding: 8px 12px; }
    .pt-gf-card-stats { padding: 6px 12px; }

    /* Action bar: smaller text */
    .pt-gf-action-btn { font-size: 0.78rem; padding: 8px 4px; }

    /* About split grid: stack columns */
    .pt-about-split-grid { grid-template-columns: 1fr; }
    .pt-about-split-grid .pt-about-section { height: auto; }

    /* About stats: single column */
    .pt-about-stats-grid { grid-template-columns: 1fr; }

    /* Members header: stack search and sort */
    .pt-gf-members-header { flex-direction: column; align-items: stretch; }
    .pt-members-sort-tabs { justify-content: flex-start; }

    /* Home nav grid: single column on very small screens */
    .pt-home-meta-strip { gap: 8px; flex-direction: column; }

    /* Inner container padding */
    .pt-gh-inner-container { padding: 0 14px; }
}

@media (max-width: 480px) {
    .pt-gh-title { font-size: 1rem; }
    .pt-gh-avatar,
    .pt-gh-avatar-placeholder { width: 48px !important; height: 48px !important; }

    /* Actions: each button full width */
    .pt-gh-actions .pt-gh-btn { font-size: 0.78rem; padding: 7px 10px; }

    /* Home nav: single column */
    .pt-home-nav-grid { grid-template-columns: 1fr; }

    /* Modal: full screen on small phones */
    .pt-vmore-modal,
    .pt-invite-modal { border-radius: 0; margin: 0; max-height: 100vh; border-radius: 0 !important; }
}

/* =========================================================
   TRIBE SEARCH OVERLAY
   ========================================================= */
.pt-tribe-search-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 100000;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    backdrop-filter: blur(3px);
}
.pt-tribe-search-overlay.is-open { display: flex; }

.pt-tribe-search-modal {
    background: #fff;
    border-radius: 0;
    width: 100%;
    max-width: 720px;
    max-height: 82vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 16px 48px rgba(0,0,0,0.2);
    overflow: hidden;
}

.pt-tribe-search-hdr {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
}

.pt-tribe-search-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #aaa;
}

.pt-tribe-search-input-wrap input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    font-family: inherit;
    color: #1a1a1a;
    background: transparent;
    padding: 4px 0;
}
.pt-tribe-search-input-wrap input::placeholder { color: #bbb; }

.pt-tribe-search-close {
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    transition: color 0.12s, background 0.12s;
}
.pt-tribe-search-close:hover { color: #333; background: #f5f5f5; }

.pt-tribe-search-results {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
    min-height: 0; /* needed for flex child to scroll */
}

.pt-tribe-search-hint {
    font-size: 0.85rem;
    color: #aaa;
    text-align: center;
    padding: 24px 16px;
    margin: 0;
}

.pt-tribe-search-result {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.1s;
    text-decoration: none;
    border-bottom: 1px solid #f5f5f5;
}
.pt-tribe-search-result:last-child { border-bottom: none; }
.pt-tribe-search-result:hover { background: #f9f9f9; }

.pt-tribe-search-result-avatar {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    flex-shrink: 0;
}

.pt-tribe-search-result-body { flex: 1; min-width: 0; }
.pt-tribe-search-result-author { font-size: 0.8rem; font-weight: 700; color: #888; display: block; margin-bottom: 2px; }
.pt-tribe-search-result-name { font-size: 0.82rem; font-weight: 700; color: #555; display: block; margin-bottom: 2px; }
.pt-tribe-search-result-text { font-size: 0.88rem; color: #1a1a1a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.pt-tribe-search-result-time { font-size: 0.75rem; color: #bbb; flex-shrink: 0; margin-top: 2px; }

.pt-search-result-media {
    flex-shrink: 0;
    position: relative;
    width: 64px;
    height: 48px;
    border-radius: 6px;
    overflow: hidden;
    background: #f0f0f0;
}
.pt-search-result-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.pt-search-result-media-badge {
    position: absolute;
    bottom: 3px;
    left: 3px;
    font-size: 0.6rem;
    font-weight: 700;
    background: rgba(0,0,0,0.55);
    color: #fff;
    padding: 1px 4px;
    border-radius: 3px;
    white-space: nowrap;
}

/* =========================================================
   YOUR CONTENT MODAL
   ========================================================= */
.pt-yc-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 9900;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
}
.pt-yc-overlay.is-open { display: flex; }

.pt-yc-modal {
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    margin: 16px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pt-yc-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}
.pt-yc-hdr h3 { margin: 0; font-size: 1.05rem; font-weight: 800; color: #1a1a1a; }

.pt-yc-close {
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: #aaa;
    line-height: 1;
    padding: 4px 6px;
    border-radius: 6px;
    transition: background 0.12s, color 0.12s;
    outline: none;
}
.pt-yc-close:hover,
.pt-yc-close:focus { background: #f5f5f5; color: #333; }

.pt-yc-tabs {
    display: flex;
    gap: 4px;
    padding: 12px 16px 0;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.pt-yc-tab {
    padding: 8px 14px;
    font-size: 0.82rem;
    font-weight: 700;
    border: none;
    background: none;
    color: #888;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.12s, border-color 0.12s;
    border-radius: 0;
}
.pt-yc-tab:hover,
.pt-yc-tab:focus { background: #f5f5f5; color: #1a1a1a; outline: none; border-radius: 6px 6px 0 0; }
.pt-yc-tab.is-active { color: #1a1a1a; border-bottom-color: #1a1a1a; }

.pt-yc-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px 0;
}

.pt-yc-loading {
    font-size: 0.88rem;
    color: #aaa;
    text-align: center;
    padding: 32px 16px;
}

.pt-gf-pending-notice {
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 10px;
    color: #7a5c00;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 14px 18px;
    margin-bottom: 12px;
    text-align: center;
}

.pt-yc-empty {
    font-size: 0.88rem;
    color: #aaa;
    text-align: center;
    padding: 32px 16px;
}

.pt-yc-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 20px;
    border-bottom: 1px solid #f5f5f5;
    cursor: default;
    transition: background 0.1s;
}
.pt-yc-row:last-child { border-bottom: none; }
.pt-yc-row[data-fp] { cursor: pointer; }
.pt-yc-row[data-fp]:hover { background: #f9f9f9; }
.pt-yc-row--pending,
.pt-yc-row--declined,
.pt-yc-row--removed { cursor: default; opacity: 0.85; }
.pt-yc-row--pending:hover,
.pt-yc-row--declined:hover,
.pt-yc-row--removed:hover { background: none; }

.pt-yc-row-body { flex: 1; min-width: 0; }
.pt-yc-row-text { font-size: 0.88rem; color: #1a1a1a; margin: 0 0 4px; line-height: 1.45; }
.pt-yc-row-meta { font-size: 0.75rem; color: #aaa; }

.pt-yc-row-thumb {
    flex-shrink: 0;
    width: 56px;
    height: 42px;
    border-radius: 6px;
    overflow: hidden;
    background: #f0f0f0;
    position: relative;
}
.pt-yc-row-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pt-yc-row-thumb-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
    pointer-events: none;
}

.pt-yc-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}
.pt-yc-badge--published  { background: #e8f4e8; color: #2e7d32; }
.pt-yc-badge--pending    { background: #fff8e1; color: #f57c00; }
.pt-yc-badge--declined   { background: #fff5f5; color: #c00; }
.pt-yc-badge--removed    { background: #f5f5f5; color: #888; }

@media (max-width: 600px) {
    .pt-tribe-search-overlay { padding: 12px; align-items: center; }
    .pt-tribe-search-modal { border-radius: 0; margin: 0; max-width: 100%; max-height: 85vh; }
    .pt-yc-modal { border-radius: 0; margin: 0; max-width: 100%; max-height: 85vh; align-self: center; }
    .pt-yc-overlay { align-items: center; padding: 12px; box-sizing: border-box; }
    .pt-tribe-search-overlay { padding: 0; }
    .pt-tribe-search-modal { border-radius: 0; margin: 0; max-width: 100%; max-height: 85vh; }
}

/* ── Report post modal ──────────────────────────────────────────────────── */
.pt-report-post-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}
.pt-report-post-overlay.is-open { display: flex; }

.pt-report-post-modal {
    background: #fff;
    border-radius: 0;
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pt-report-post-hdr {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}
.pt-report-post-hdr h3 {
    flex: 1;
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
}
.pt-report-post-back,
.pt-report-post-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    color: #555;
    line-height: 1;
    font-size: 1.3rem;
}
.pt-report-post-back:hover,
.pt-report-post-close:hover { background: #f0f0f0; color: #111; }

.pt-report-post-body {
    overflow-y: auto;
    padding: 16px;
}

.pt-report-intro {
    font-size: 0.85rem;
    color: #555;
    margin: 0 0 12px;
}
.pt-report-subtext {
    font-size: 0.8rem;
    color: #777;
    margin: -8px 0 12px;
}

/* Step 1 & 2b option/reason rows */
.pt-report-option-row,
.pt-report-reason-row,
.pt-report-tribe-reason-row {
    display: flex;
    align-items: center;
    width: 100%;
    background: none;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    padding: 12px 4px;
    cursor: pointer;
    text-align: left;
    font-size: 0.88rem;
    color: #222;
    gap: 8px;
    transition: background .15s;
}
.pt-report-option-row:last-child,
.pt-report-reason-row:last-child,
.pt-report-tribe-reason-row:last-child { border-bottom: none; }
.pt-report-option-row:hover,
.pt-report-reason-row:hover,
.pt-report-tribe-reason-row:hover { background: #f9f9f9; color: #222; }
.pt-report-option-row:hover .pt-report-option-text strong,
.pt-report-option-row:hover .pt-report-option-text span { color: inherit; }
.pt-report-option-row:disabled,
.pt-report-reason-row:disabled,
.pt-report-tribe-reason-row:disabled { opacity: .5; cursor: default; }

.pt-report-option-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.pt-report-option-text strong { font-size: 0.9rem; }
.pt-report-option-text span   { font-size: 0.78rem; color: #666; }

.pt-report-option-row svg,
.pt-report-reason-row svg { flex-shrink: 0; color: #aaa; }

/* Step 2a — textarea + submit */
.pt-report-textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 0.88rem;
    resize: vertical;
    margin-bottom: 12px;
    font-family: inherit;
    color: #222;
}
.pt-report-textarea:focus { outline: none; border-color: #999; }

.pt-report-submit-btn {
    display: block;
    width: 100%;
    padding: 10px;
    background: #222;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}
.pt-report-submit-btn:hover    { background: #000; }
.pt-report-submit-btn:disabled { opacity: .6; cursor: default; }

/* Step 3 — success */
.pt-report-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 24px 0 16px;
    text-align: center;
    color: #222;
}
.pt-report-success strong { font-size: 1rem; }
.pt-report-success span   { font-size: 0.85rem; color: #555; }

/* =========================================================
   MARKETPLACE PICKER MODAL
   ========================================================= */
.pt-mp-picker-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.55); z-index: 99999;
    align-items: center; justify-content: center;
}
.pt-mp-picker-overlay.is-open { display: flex; }

.pt-mp-picker-box {
    background: #fff; border-radius: 0px;
    width: 560px; max-width: calc(100vw - 32px);
    max-height: 82vh; display: flex; flex-direction: column;
    overflow: hidden;
}
.pt-mp-picker-hdr {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid #eee; flex-shrink: 0;
}
.pt-mp-picker-title { font-size: 1rem; font-weight: 700; margin: 0; }
.pt-mp-picker-close {
    background: none; border: none; font-size: 1.4rem; cursor: pointer;
    color: #999; line-height: 1; padding: 0 4px; border-radius: 4px;
    transition: background 0.12s, color 0.12s;
}
.pt-mp-picker-close:hover { background: #f0f0f0; color: #666; }

.pt-mp-picker-search-wrap { padding: 12px 20px 8px; flex-shrink: 0; }
.pt-mp-picker-search {
    width: 100%; box-sizing: border-box; border: 1px solid #e0e0e0;
    border-radius: 8px; padding: 8px 12px; font-size: 0.875rem;
}
.pt-mp-picker-search:focus { outline: none; border-color: #bbb; }

.pt-mp-picker-filter-wrap {
    display: flex; gap: 6px; padding: 0 20px 10px; flex-shrink: 0;
}
.pt-mp-filter-btn {
    background: none; border: 1px solid #e0e0e0; border-radius: 20px;
    padding: 4px 14px; font-size: 0.78rem; font-weight: 600;
    color: #666; cursor: pointer; transition: border-color 0.12s, color 0.12s, background 0.12s;
}
.pt-mp-filter-btn:hover { border-color: #e0e0e0; color: #444; background: #f5f5f5; }
.pt-mp-filter-btn.is-active { border-color: #E8650A; color: #E8650A; background: #fff8f4; }

.pt-mp-picker-body { flex: 1; overflow-y: auto; padding: 8px 16px 12px; }

.pt-mp-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}
.pt-mp-picker-card {
    display: flex; align-items: center; gap: 10px;
    border: 1.5px solid #eee; border-radius: 10px;
    padding: 10px; cursor: pointer; position: relative;
    transition: border-color 0.12s;
}
.pt-mp-picker-card:hover { border-color: #ccc; }
.pt-mp-picker-card.is-selected { border-color: #E8650A; background: #fff8f4; }
.pt-mp-picker-card.is-disabled { opacity: 0.42; pointer-events: none; }

.pt-mp-picker-card-thumb {
    width: 52px; height: 52px; border-radius: 7px;
    overflow: hidden; flex-shrink: 0; background: #f5f5f5;
}
.pt-mp-picker-card-thumb img { width: 100%; height: 100%; object-fit: contain !important; display: block; }
.pt-mp-picker-card-nothumb { width: 52px; height: 52px; border-radius: 7px; background: #eee; }

.pt-mp-picker-card-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pt-mp-picker-card-title {
    font-size: 0.82rem; font-weight: 600; color: #1a1a1a;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block;
}
.pt-mp-picker-card-price { font-size: 0.8rem; color: #444; font-weight: 700; }
.pt-mp-picker-card-status {
    font-size: 0.68rem; font-weight: 700; border-radius: 20px;
    padding: 2px 6px; display: inline-block; width: fit-content;
}
.pt-mp-status-active { background: #e8f5e9; color: #2e7d32; }
.pt-mp-status-sold   { background: #fce4ec; color: #c62828; }

.pt-mp-picker-card-check {
    position: absolute; top: 6px; right: 6px;
    background: #E8650A; border-radius: 50%;
    width: 20px; height: 20px; display: flex; align-items: center; justify-content: center;
}

.pt-mp-picker-loading { display: flex; gap: 6px; justify-content: center; padding: 32px 0; }
.pt-mp-picker-loading span {
    width: 8px; height: 8px; border-radius: 50%; background: #ddd;
    animation: pt-mp-bounce 1s infinite ease-in-out both;
}
.pt-mp-picker-loading span:nth-child(2) { animation-delay: 0.16s; }
.pt-mp-picker-loading span:nth-child(3) { animation-delay: 0.32s; }
@keyframes pt-mp-bounce { 0%,80%,100%{transform:scale(0)} 40%{transform:scale(1)} }

.pt-mp-picker-empty { text-align: center; color: #888; font-size: 0.875rem; padding: 32px 0; }

.pt-mp-picker-footer {
    display: flex; align-items: center; justify-content: flex-end; gap: 10px;
    padding: 12px 16px; border-top: 1px solid #eee; flex-shrink: 0;
}
.pt-mp-picker-limit-hint { font-size: 0.75rem; color: #bbb; margin-right: auto; }
.pt-mp-picker-cancel-btn {
    background: none; border: 1px solid #ddd; border-radius: 6px;
    padding: 8px 16px; font-size: 0.85rem; cursor: pointer; color: #555;
}
.pt-mp-picker-cancel-btn:hover { background: #f5f5f5; color: #555; }
.pt-mp-picker-add-btn {
    background: #E8650A; color: #fff; border: none; border-radius: 6px;
    padding: 8px 18px; font-size: 0.85rem; font-weight: 700; cursor: pointer;
    transition: background 0.15s;
}
.pt-mp-picker-add-btn:hover:not(:disabled) { background: #c9540a; color: #fff; }
.pt-mp-picker-add-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ── Compose preview chips ──────────────────────────────────────────── */
.pt-compose-mp-preview {
    display: flex; align-items: center; gap: 10px;
    border: 1px solid #eee; border-radius: 10px;
    padding: 8px 10px; margin-top: 8px; background: #fafafa;
}
.pt-compose-mp-preview-thumb {
    width: 44px; height: 44px; border-radius: 6px;
    object-fit: cover; flex-shrink: 0; background: #eee;
}
.pt-compose-mp-nothumb { width: 44px; height: 44px; border-radius: 6px; background: #eee; flex-shrink: 0; }
.pt-compose-mp-preview-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pt-compose-mp-preview-title {
    font-size: 0.82rem; font-weight: 600; color: #1a1a1a;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pt-compose-mp-preview-price { font-size: 0.78rem; color: #555; }
.pt-compose-mp-preview-remove {
    background: none; border: none; color: #aaa;
    font-size: 1.1rem; cursor: pointer; padding: 0 4px; flex-shrink: 0;
}
.pt-compose-mp-preview-remove:hover { color: #c00; }

/* ── Feed card listing section ──────────────────────────────────────── */
.pt-feed-mp-listings { display: flex; flex-wrap: wrap; gap: 10px; padding: 10px 16px 14px; }
.pt-feed-mp-card {
    display: flex; align-items: center; gap: 10px;
    border: 1px solid #eee; border-radius: 10px; padding: 10px 12px;
    text-decoration: none; color: inherit;
    flex: 1 1 220px; min-width: 180px; max-width: 100%;
    transition: border-color 0.15s;
}
.pt-feed-mp-card:hover { border-color: #ccc; }
.pt-feed-mp-card-thumb { width: 56px; height: 56px; border-radius: 8px; overflow: hidden; flex-shrink: 0; background: #f5f5f5; }
.pt-feed-mp-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pt-feed-mp-card-nothumb { width: 56px; height: 56px; border-radius: 8px; background: #eee; }
.pt-feed-mp-card-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pt-feed-mp-card-title {
    font-size: 0.85rem; font-weight: 600; color: #1a1a1a;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pt-feed-mp-card-price { font-size: 0.82rem; color: #444; font-weight: 700; }
.pt-feed-mp-card-status {
    font-size: 0.7rem; font-weight: 700; border-radius: 20px;
    padding: 2px 7px; display: inline-block; width: fit-content;
}
.pt-feed-mp-card-view-btn {
    font-size: 0.78rem; font-weight: 700; color: #E8650A;
    border: 1px solid #E8650A; border-radius: 6px;
    padding: 5px 10px; flex-shrink: 0; white-space: nowrap;
}

/* ── Toolbar button active state ────────────────────────────────────── */
.pt-gf-tool.is-active { background: #fff3ec; }

@media (max-width: 480px) {
    .pt-feed-mp-card { flex: 1 1 100%; }
    .pt-mp-picker-box { max-height: 90vh; }
}

/* ── Events Tab ─────────────────────────────────────────────────────────── */
.pt-event-create-box {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
}
.pt-event-create-toggle {
    display: flex;
    align-items: center;
    gap: 7px;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 9px 18px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}
.pt-event-create-toggle:hover { background: #333; }
.pt-event-form { margin-top: 16px; }
/* ── Edit event inline panel ─────────────────────────────────────────────── */
.pt-event-edit-inline {
    display: none; /* shown by JS */
    padding: 20px;
    border-top: 2px solid #111;
}
.pt-event-edit-box h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #111;
    margin: 0 0 16px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.pt-event-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.pt-event-field { display: flex; flex-direction: column; gap: 5px; grid-column: span 2; }
.pt-event-field--half { grid-column: span 1; }
.pt-event-field label { font-size: 0.8rem; font-weight: 600; color: #555; }
.pt-event-form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
}
.pt-event-cancel-btn {
    background: none;
    border: none;
    font-size: 0.85rem;
    color: #888;
    cursor: pointer;
    padding: 0;
}
.pt-event-cancel-btn:hover,
.pt-event-cancel-btn:focus,
.pt-event-cancel-btn:active { color: #111; background: none !important; outline: none; }
.pt-event-form-msg { font-size: 0.82rem; margin-top: 8px; }

/* In Person / Online type toggle */
.pt-event-type-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.pt-event-type-btn {
    flex: 1;
    padding: 9px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #f9f9f9;
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
    text-align: center;
}
.pt-event-type-btn:hover { border-color: #aaa; color: #111; background: #f0f0f0; }
.pt-event-type-btn.is-active { border-color: #111; background: #111; color: #fff; }
.pt-event-link { color: #c00; font-weight: 600; text-decoration: none; }
.pt-event-link:hover { text-decoration: underline; }

/* Event sections */
.pt-events-section { margin-bottom: 28px; }
.pt-events-section-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #999;
    margin: 0 0 10px;
}
.pt-events-section--past .pt-events-section-label { color: #bbb; }

/* Event sections */
.pt-events-section { margin-bottom: 28px; }
.pt-events-section-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #999;
    margin: 0 0 10px;
}
.pt-events-section--past .pt-events-section-label { color: #bbb; }

/* ── Event card (upcoming) ───────────────────────────────────────────────── */
.pt-event-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    position: relative;
}
/* Allow MMS panel to overflow card boundary when open */
.pt-event-card:has(.pt-mms.is-open) {
    overflow: visible;
}

/* Flyer banner */
.pt-event-flyer-banner {
    width: 100%;
    height: 180px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Main row: datebadge + info + icon actions */
.pt-event-card-main {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
}
.pt-event-card-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
}
/* Edit button — top-right of card main area */
.pt-event-edit-btn {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: #bbb;
    cursor: pointer;
    padding: 0;
    transition: color 0.15s;
}
.pt-event-edit-btn:hover,
.pt-event-edit-btn:focus,
.pt-event-edit-btn:active { color: #333; background: transparent !important; box-shadow: none; outline: none; }

/* Delete button — base styles (used in past cards too) */
.pt-event-delete-btn {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: #ccc;
    cursor: pointer;
    padding: 0;
    transition: color 0.15s;
}
.pt-event-delete-btn:hover,
.pt-event-delete-btn:focus { color: #c00; background: transparent; outline: none; }

/* Delete row — sits at bottom of card, flush right */
.pt-event-delete-row {
    display: flex;
    justify-content: flex-end;
    padding: 0 10px 8px;
}

/* Date badge */
.pt-event-datebadge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    background: #111;
    color: #fff;
    border-radius: 8px;
    padding: 6px 10px;
    text-align: center;
    flex-shrink: 0;
}
.pt-event-datebadge--past { background: #bbb; }
.pt-event-month { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.pt-event-day   { font-size: 1.4rem; font-weight: 800; line-height: 1; }
.pt-event-info  { flex: 1; min-width: 0; }
.pt-event-title { font-size: 0.95rem; font-weight: 700; margin: 0 0 6px; color: #111; }
.pt-event-meta  { display: flex; flex-wrap: wrap; gap: 10px; font-size: 0.78rem; color: #666; margin-bottom: 6px; }
.pt-event-desc  { font-size: 0.82rem; color: #555; margin: 0; line-height: 1.5; }

/* Past event card — flat row (no .pt-event-card-main wrapper) */
.pt-event-card--past {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    opacity: 0.65;
    overflow: visible;
}
.pt-event-card--past .pt-event-info { flex: 1; min-width: 0; }
.pt-event-card--past .pt-event-delete-btn { margin-left: auto; color: #ccc; }

/* ── RSVP row ────────────────────────────────────────────────────────────── */
.pt-event-rsvp {
    padding: 8px 16px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.pt-rsvp-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.pt-rsvp-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: #fafafa;
    font-size: 0.78rem;
    font-weight: 600;
    color: #444;
    cursor: pointer;
    transition: all 0.15s;
    line-height: 1;
}
.pt-rsvp-btn:hover { border-color: #999; color: #111; background: #f2f2f2; }
.pt-rsvp-btn.is-active[data-status="going"]      { background: #d00; border-color: #d00; color: #fff; }
.pt-rsvp-btn.is-active[data-status="interested"] { background: #f59e0b; border-color: #f59e0b; color: #fff; }
.pt-rsvp-btn.is-active[data-status="not_going"]  { background: #555; border-color: #555; color: #fff; }
.pt-rsvp-going {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-wrap: wrap;
}
.pt-rsvp-going-label { font-size: 0.75rem; color: #555; font-weight: 600; white-space: nowrap; }
.pt-rsvp-avatars { display: flex; align-items: center; }
.pt-rsvp-avatar-wrap {
    position: relative;
    display: inline-block;
    margin-left: -6px;
}
.pt-rsvp-avatar-wrap:first-child { margin-left: 0; }
.pt-rsvp-avatar-wrap img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #fff;
    object-fit: cover;
    display: block;
}
.pt-rsvp-avatar-wrap .pt-rsvp-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #111;
    color: #fff;
    font-size: 0.7rem;
    white-space: nowrap;
    padding: 4px 8px;
    border-radius: 4px;
    pointer-events: none;
    z-index: 10;
}
.pt-rsvp-avatar-wrap:hover .pt-rsvp-tooltip { display: block; }
.pt-rsvp-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #eee;
    border: 2px solid #fff;
    font-size: 0.65rem;
    font-weight: 700;
    color: #555;
    margin-left: -6px;
}

/* ── Calendar & Directions row ───────────────────────────────────────────── */
.pt-event-actions-row {
    padding: 8px 16px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.pt-event-cal-wrap { position: relative; }
.pt-event-cal-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fafafa;
    font-size: 0.78rem;
    font-weight: 600;
    color: #444;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
    line-height: 1.4;
}
.pt-event-cal-btn:hover { border-color: #999; color: #111; background: #f2f2f2; }
.pt-event-cal-dropdown {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    z-index: 200;
    min-width: 190px;
    overflow: hidden;
}
.pt-event-cal-dropdown.is-open { display: block; }
.pt-event-cal-dropdown a,
.pt-event-cal-dropdown button {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 10px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    text-decoration: none;
    background: none;
    border: none;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.1s;
    white-space: nowrap;
    text-align: left;
    box-sizing: border-box;
}
.pt-event-cal-dropdown a:last-child,
.pt-event-cal-dropdown button:last-child { border-bottom: none; }
.pt-event-cal-dropdown a:hover,
.pt-event-cal-dropdown button:hover { background: #f5f5f5; color: #111; }
.pt-event-directions-wrap { display: flex; gap: 6px; }
.pt-event-directions-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fafafa;
    font-size: 0.78rem;
    font-weight: 600;
    color: #444;
    text-decoration: none;
    transition: border-color 0.15s, color 0.15s;
    line-height: 1.4;
}
.pt-event-directions-btn:hover { border-color: #999; color: #111; background: #f2f2f2; }

/* ── Marketplace cross-promo ─────────────────────────────────────────────── */
.pt-event-marketplace {
    border-top: 1px solid #f0f0f0;
}
.pt-event-mp-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #999;
    text-align: left;
    transition: color 0.15s;
}
.pt-event-mp-toggle:hover,
.pt-event-mp-toggle:focus { color: #555; background: transparent !important; outline: none; }
.pt-event-mp-toggle .pt-mp-chevron { font-size: 0.7rem; transition: transform 0.2s; font-style: normal; }
.pt-event-marketplace.is-open .pt-mp-chevron { transform: rotate(180deg); }
.pt-event-mp-body {
    display: none;
    padding: 0 16px 14px;
}
.pt-event-marketplace.is-open .pt-event-mp-body { display: block; }
.pt-event-mp-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #999;
    margin-bottom: 8px;
}
.pt-event-mp-grid {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
}
.pt-event-mp-card {
    flex-shrink: 0;
    width: 110px;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s;
}
.pt-event-mp-card:hover { border-color: #bbb; }
.pt-event-mp-img {
    width: 100%;
    height: 70px;
    background-size: cover;
    background-position: center;
    background-color: #eee;
}
.pt-event-mp-img--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: #f5f5f5;
}
.pt-event-mp-info { padding: 6px 8px; }
.pt-event-mp-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: #111;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}
.pt-event-mp-price { font-size: 0.7rem; color: #d00; font-weight: 700; margin-top: 2px; display: block; }

/* ── Discussion pin row ──────────────────────────────────────────────────── */
.pt-event-disc-row {
    padding: 7px 16px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.pt-event-disc-link {
    font-size: 0.78rem;
    font-weight: 600;
    color: #555;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.pt-event-disc-link:hover { color: #111; }
.pt-event-pin-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fafafa;
    font-size: 0.75rem;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    transition: all 0.15s;
    line-height: 1.4;
}
.pt-event-pin-btn:hover   { border-color: #999; color: #111; }
.pt-event-pin-btn.is-pinned { background: #111; border-color: #111; color: #fff; }

/* ── Pre-meet toggle ─────────────────────────────────────────────────────── */
.pt-premeet-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #888;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 0;
    margin-bottom: 4px;
    transition: color 0.15s;
}
.pt-premeet-toggle:hover,
.pt-premeet-toggle:focus,
.pt-premeet-toggle:active { color: #111; background: none; outline: none; }
.pt-premeet-toggle .pt-premeet-toggle-icon { font-style: normal; font-size: 0.9rem; transition: transform 0.2s; }
.pt-premeet-toggle.is-open .pt-premeet-toggle-icon { transform: rotate(45deg); }
.pt-premeet-wrap { margin-top: 6px; }

@media (max-width: 600px) {
    .pt-event-form-grid { grid-template-columns: 1fr; }
    .pt-event-field--half { grid-column: span 1; }
    .pt-rsvp-going { margin-left: 0; }
    .pt-event-actions-row { gap: 6px; }
    .pt-event-cal-btn, .pt-event-directions-btn { font-size: 0.72rem; padding: 5px 9px; }
}

/* ── Location Autocomplete (events form) ────────────────────────────────── */
ul.pt-event-ac-list {
    display: none;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    width: 100% !important;
    background: #fff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 6px !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1) !important;
    z-index: 9999 !important;
    margin: 4px 0 0 !important;
    padding: 0 !important;
    list-style: none !important;
    max-height: 220px !important;
    overflow-y: auto !important;
    box-sizing: border-box !important;
}
ul.pt-event-ac-list li {
    padding: 10px 14px !important;
    cursor: pointer !important;
    font-size: 0.88rem !important;
    border-bottom: 1px solid #f5f5f5 !important;
    color: #111 !important;
    list-style: none !important;
    margin: 0 !important;
    background: #fff !important;
    line-height: 1.4 !important;
}
ul.pt-event-ac-list li:last-child { border-bottom: none !important; }
ul.pt-event-ac-list li:hover,
ul.pt-event-ac-list li.pt-ac-focused { background: #f5f5f5 !important; }
ul.pt-event-ac-list .pt-ac-main { font-weight: 700 !important; display: block !important; color: #111 !important; }
ul.pt-event-ac-list .pt-ac-sub  { display: block !important; font-size: 0.75rem !important; color: #888 !important; margin-top: 2px !important; }
ul.pt-event-ac-list .pt-ac-status { text-align: center !important; color: #999 !important; cursor: default !important; font-style: italic !important; }

/* ── Event Card: Flyer Banner ──────────────────────────────────────────── */
.pt-event-flyer {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    display: block;
    border-radius: 8px 8px 0 0;
    margin-bottom: 0;
}
.pt-event-card-main {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
}

/* (pt-event-edit-btn and pt-event-delete-btn defined in Event card section above) */

/* ── RSVP Section ──────────────────────────────────────────────────────── */
.pt-event-rsvp {
    padding: 10px 16px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.pt-rsvp-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: #fafafa;
    font-size: 0.8rem;
    font-weight: 600;
    color: #444;
    cursor: pointer;
    transition: all 0.15s;
    line-height: 1;
}
.pt-rsvp-btn:hover { border-color: #999; color: #111; background: #f2f2f2; }
.pt-rsvp-btn.is-active[data-status="going"]       { background: #d00; border-color: #d00; color: #fff; }
.pt-rsvp-btn.is-active[data-status="interested"]  { background: #f59e0b; border-color: #f59e0b; color: #fff; }
.pt-rsvp-btn.is-active[data-status="not_going"]   { background: #555; border-color: #555; color: #fff; }
.pt-rsvp-count { font-size: 0.75rem; font-weight: 700; }

.pt-rsvp-avatars {
    display: flex;
    align-items: center;
    margin-left: auto;
    gap: -6px; /* negative gap handled via negative margin */
}
.pt-rsvp-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #fff;
    object-fit: cover;
    margin-left: -6px;
    position: relative;
}
.pt-rsvp-avatar:first-child { margin-left: 0; }
.pt-rsvp-avatar-wrap {
    position: relative;
    display: inline-block;
    margin-left: -6px;
}
.pt-rsvp-avatar-wrap:first-child { margin-left: 0; }
.pt-rsvp-avatar-wrap .pt-rsvp-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #111;
    color: #fff;
    font-size: 0.7rem;
    white-space: nowrap;
    padding: 4px 8px;
    border-radius: 4px;
    pointer-events: none;
    z-index: 10;
}
.pt-rsvp-avatar-wrap:hover .pt-rsvp-tooltip { display: block; }

/* ── Calendar & Directions Row ─────────────────────────────────────────── */
.pt-event-utility-row {
    padding: 8px 16px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.pt-event-utility-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fafafa;
    font-size: 0.78rem;
    font-weight: 600;
    color: #444;
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.15s, color 0.15s;
    line-height: 1.4;
}
.pt-event-utility-btn:hover { border-color: #999; color: #111; background: #f2f2f2; }

.pt-calendar-dropdown {
    position: relative;
    display: inline-block;
}
.pt-calendar-options {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    z-index: 200;
    min-width: 170px;
    overflow: hidden;
}
.pt-calendar-dropdown.is-open .pt-calendar-options { display: block; }
.pt-cal-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    text-decoration: none;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.1s;
    white-space: nowrap;
}
.pt-cal-option:last-child { border-bottom: none; }
.pt-cal-option:hover { background: #f5f5f5; color: #111; }

/* ── Marketplace Cross-Promo ───────────────────────────────────────────── */
.pt-event-market {
    padding: 10px 16px 14px;
    border-top: 1px solid #f0f0f0;
}
.pt-event-market-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #999;
    margin-bottom: 8px;
}
.pt-event-market-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
}
.pt-event-market-card {
    flex-shrink: 0;
    width: 110px;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s;
}
.pt-event-market-card:hover { border-color: #bbb; }
.pt-event-market-card img {
    width: 100%;
    height: 70px;
    object-fit: cover;
    display: block;
}
.pt-event-market-card-body {
    padding: 6px 8px;
}
.pt-event-market-card-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: #111;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pt-event-market-card-price {
    font-size: 0.7rem;
    color: #d00;
    font-weight: 700;
    margin-top: 2px;
}

/* ── Flyer Upload Zone (create form) ───────────────────────────────────── */
.pt-event-flyer-zone {
    border: 2px dashed #ddd;
    border-radius: 6px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    position: relative;
    background: #fafafa;
    transition: border-color 0.15s, background 0.15s;
    font-size: 0.85rem;
    color: #888;
}
.pt-event-flyer-zone:hover { border-color: #999; background: #f5f5f5; }
.pt-event-flyer-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}
.pt-event-flyer-preview {
    width: 100%;
    max-height: 150px;
    object-fit: cover;
    border-radius: 4px;
    display: none;
    margin-top: 8px;
}

/* ── Edit Event Overlay ────────────────────────────────────────────────── */
.pt-edit-event-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.pt-edit-event-overlay.is-open { display: flex; }
.pt-edit-event-modal {
    background: #fff;
    border-radius: 10px;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px;
    position: relative;
}
.pt-edit-event-modal h3 {
    font-size: 1.1rem;
    font-weight: 800;
    margin: 0 0 20px;
    color: #111;
}
.pt-edit-event-close {
    position: absolute;
    top: 16px;
    right: 18px;
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: #888;
    line-height: 1;
    padding: 4px;
}
.pt-edit-event-close:hover { color: #111; }
.pt-edit-event-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}
.pt-edit-event-cancel {
    padding: 9px 18px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fafafa;
    font-size: 0.88rem;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    transition: border-color 0.15s;
}
.pt-edit-event-cancel:hover { border-color: #999; color: #111; }
.pt-edit-save-btn {
    padding: 9px 22px;
    border: none;
    border-radius: 4px;
    background: #d00;
    color: #fff;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}
.pt-edit-save-btn:hover { background: #b00; }

/* ── Mobile adjustments for event cards ───────────────────────────────── */
@media (max-width: 600px) {
    .pt-event-rsvp { gap: 7px; }
    .pt-rsvp-btn { padding: 5px 10px; font-size: 0.75rem; }
    .pt-event-utility-row { gap: 6px; }
    .pt-event-utility-btn { font-size: 0.72rem; padding: 5px 9px; }
    .pt-edit-event-modal { padding: 20px; }
}

/* ── Duration Row ──────────────────────────────────────────────────────── */
.pt-duration-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}
.pt-duration-row select { flex: 1; }
.pt-duration-row input[type="text"] { flex: 1; min-width: 0; }

/* ── Invite Toggle ─────────────────────────────────────────────────────── */
.pt-invite-toggle {
    display: inline-flex;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 0;
}
.pt-invite-btn {
    padding: 7px 16px;
    font-size: 0.82rem;
    font-weight: 600;
    background: #fafafa;
    border: none;
    cursor: pointer;
    color: #555;
    transition: background 0.15s, color 0.15s;
    border-right: 1px solid #ddd;
    line-height: 1.4;
}
.pt-invite-btn:last-child { border-right: none; }
.pt-invite-btn.is-active { background: #111; color: #fff; }
.pt-invite-btn:hover:not(.is-active) { background: #f0f0f0; color: #111; }

/* ── Member Picker ─────────────────────────────────────────────────────── */
.pt-member-picker {
    position: relative;
    border: 1px solid #ced0d4;
    border-radius: 6px;
    padding: 6px 8px;
    background: #f9f9f9;
    min-height: 42px;
    transition: border-color 0.2s;
}
.pt-member-picker:focus-within { border-color: #111; background: #fff; }
.pt-member-picker-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 4px;
}
.pt-member-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #111;
    color: #fff;
    border-radius: 20px;
    padding: 3px 10px 3px 5px;
    font-size: 0.78rem;
    font-weight: 600;
}
.pt-member-chip img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}
.pt-chip-remove {
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0;
    margin-left: 2px;
}
.pt-chip-remove:hover { color: #fff; }
.pt-member-picker-search {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 4px 4px !important;
    font-size: 0.85rem !important;
    width: 100% !important;
    outline: none;
}
.pt-member-picker-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    z-index: 500;
    margin-top: 4px;
    padding: 0;
    list-style: none;
    max-height: 200px;
    overflow-y: auto;
}
.pt-member-picker-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    font-size: 0.85rem;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
    list-style: none;
    margin: 0;
    transition: background 0.1s;
}
.pt-member-picker-list li:last-child { border-bottom: none; }
.pt-member-picker-list li:hover { background: #f5f5f5; }
.pt-member-picker-list li img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

/* ── Member Multi-select (.pt-mms) ─────────────────────────────────────── */
.pt-mms { position: relative; }

.pt-mms-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 12px;
    background: #f9f9f9;
    border: 1px solid #ced0d4;
    border-radius: 0;
    cursor: pointer;
    font-size: 0.88rem;
    color: #333;
    text-align: left;
    transition: border-color 0.15s, background 0.15s;
    font-family: inherit;
}
.pt-mms-trigger:hover,
.pt-mms.is-open .pt-mms-trigger { border-color: #111; background: #fff; color: #111; }
.pt-mms-chevron { font-style: normal; font-size: 0.7rem; color: #888; transition: transform 0.2s; flex-shrink: 0; }
.pt-mms.is-open .pt-mms-chevron { transform: rotate(180deg); }
.pt-mms-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pt-mms-panel {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #ced0d4;
    border-top: none;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    z-index: 300;
    overflow: hidden;
}
.pt-mms-search {
    display: block;
    width: 100%;
    padding: 8px 12px;
    border: none;
    border-bottom: 1px solid #eee;
    font-size: 0.85rem;
    background: #fafbfc;
    box-sizing: border-box;
    font-family: inherit;
}
.pt-mms-search:focus { outline: none; background: #fff; }

.pt-mms-list {
    max-height: 220px;
    overflow-y: auto;
    margin: 0;
    padding: 0;
    list-style: none;
}
.pt-mms-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.88rem;
    color: #111;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.1s;
    list-style: none !important;
    margin: 0 !important;
}
.pt-mms-list li:hover { background: #f0f2f5; }
.pt-mms-list li.is-selected { background: #f0f9f0; }
.pt-mms-list li img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
}
.pt-mms-list li span { flex: 1; }
.pt-mms-tick {
    font-style: normal;
    font-size: 0.85rem;
    font-weight: 700;
    color: #16a34a;
    opacity: 0;
    transition: opacity 0.1s;
    flex-shrink: 0;
}
.pt-mms-list li.is-selected .pt-mms-tick { opacity: 1; }

/* ── Invite-only badge on event cards ──────────────────────────────────── */
.pt-event-invite-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #111;
    color: #fff;
    border-radius: 3px;
    padding: 2px 6px;
    vertical-align: middle;
}
