/* Rucksacks & Ridgebacks — Community (shared) */
:root {
    --red: #B91C1C;
    --blue: #1E3A8A;
    --navy: #111827;
    --white: #f7f5f2;
    --slate: #64748b;
    --card: #faf8f5;
    --bg: #efece8;
    --gold: #ca8a04;
    --exclusive: #7c3aed;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    line-height: 1.6;
    color: #333;
    background:
        radial-gradient(900px 420px at 0% 0%, rgba(30, 58, 138, 0.08), transparent 55%),
        radial-gradient(700px 380px at 100% 10%, rgba(185, 28, 28, 0.06), transparent 50%),
        var(--bg);
    min-height: 100vh;
}
a { color: var(--blue); }
header {
    background: rgba(17, 24, 39, 0.97);
    color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
nav {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.85rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.logo {
    font-size: 1.25rem;
    font-weight: 800;
    color: white;
    text-decoration: none;
    white-space: nowrap;
}
.logo span { color: var(--red); }
.nav-links {
    display: flex;
    gap: 1.1rem;
    list-style: none;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
}
.nav-links a:hover, .nav-links a.active { color: #fca5a5; }
.btn {
    display: inline-block;
    padding: 10px 20px;
    background: var(--red);
    color: white !important;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 700;
    border: 2px solid white;
    cursor: pointer;
    font-size: 0.95rem;
    font-family: inherit;
}
.btn:hover { background: #991B1B; }
.btn-blue { background: var(--blue); }
.btn-blue:hover { background: #1e40af; }
.btn-ghost {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.5);
}
.btn-ghost:hover { border-color: white; background: rgba(255,255,255,0.08); }
.btn-gold {
    background: linear-gradient(135deg, #a16207, #ca8a04);
    border-color: #fde68a;
}
.btn-purple {
    background: linear-gradient(135deg, #6d28d9, #7c3aed);
    border-color: #ddd6fe;
}
.btn-sm { padding: 7px 14px; font-size: 0.85rem; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.community-hero {
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.55), rgba(30, 58, 138, 0.88) 40%, rgba(185, 28, 28, 0.9)),
        radial-gradient(circle at 20% 20%, rgba(255,255,255,0.12), transparent 40%);
    color: white;
    padding: 2.75rem 1.25rem 2.25rem;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.community-hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    margin-bottom: 0.5rem;
}
.community-hero p { max-width: 640px; margin: 0 auto 1.25rem; opacity: 0.95; }
.hero-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

.layout {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 3rem;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 1.25rem;
    align-items: start;
}
@media (max-width: 860px) {
    .layout { grid-template-columns: 1fr; }
    .sidebar { order: 2; }
    .main-col { order: 1; }
}

.card {
    background: var(--card);
    border-radius: 16px;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.07);
    border: 1px solid rgba(226, 232, 240, 0.9);
    padding: 1.2rem 1.3rem;
    margin-bottom: 1rem;
}
.card h2, .card h3 {
    color: var(--navy);
    margin-bottom: 0.65rem;
    font-size: 1.15rem;
}
.card h2 { font-size: 1.35rem; }
.muted { color: var(--slate); font-size: 0.9rem; }
.sidebar .card { position: sticky; top: 76px; }

.user-chip {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}
/* —— Call of Duty–style rank avatars & level badges —— */
.avatar-cod {
    position: relative;
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    display: inline-block;
}
.avatar-cod.sm { width: 44px; height: 44px; }
.avatar-cod.lg { width: 72px; height: 72px; }
.avatar-cod .avatar-plate {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    background:
        radial-gradient(circle at 30% 25%, rgba(255,255,255,0.22), transparent 45%),
        linear-gradient(145deg, #1e293b 0%, #0f172a 55%, #1e3a8a 100%);
    color: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    box-shadow:
        0 0 0 2px #0f172a,
        0 0 0 3px #94a3b8,
        0 0 0 5px #334155,
        0 6px 14px rgba(0,0,0,0.35);
    clip-path: polygon(18% 0, 82% 0, 100% 18%, 100% 82%, 82% 100%, 18% 100%, 0 82%, 0 18%);
    text-shadow: 0 1px 2px rgba(0,0,0,0.6);
    overflow: hidden;
    background-size: cover;
    background-position: center top;
}
.avatar-cod .avatar-plate.has-photo {
    background-color: #0f172a;
    background-size: cover !important;
    background-position: center 22% !important;
    background-repeat: no-repeat !important;
    color: transparent;
    text-shadow: none;
    font-size: 0;
}
.avatar-cod .avatar-plate.has-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(15,23,42,0.35) 100%);
    pointer-events: none;
}
.avatar-cod { isolation: isolate; }
.avatar-cod .avatar-plate { position: relative; }
.avatar-cod.sm .avatar-plate { font-size: 0.88rem; border-radius: 8px; }
.avatar-cod.lg .avatar-plate { font-size: 1.35rem; }
/* Level border colors — gradients only when NO photo (photo must never be wiped) */
.avatar-cod.lvl-guest .avatar-plate { box-shadow: 0 0 0 2px #0f172a, 0 0 0 3px #64748b, 0 0 0 5px #334155, 0 6px 14px rgba(0,0,0,0.3); }
.avatar-cod.lvl-free .avatar-plate { box-shadow: 0 0 0 2px #0f172a, 0 0 0 3px #22c55e, 0 0 0 5px #14532d, 0 6px 14px rgba(0,0,0,0.3); }
.avatar-cod.lvl-exclusive .avatar-plate:not(.has-photo) {
    background: radial-gradient(circle at 30% 25%, rgba(255,255,255,0.2), transparent 45%), linear-gradient(145deg, #2e1065, #4c1d95 50%, #7c3aed);
}
.avatar-cod.lvl-exclusive .avatar-plate {
    box-shadow: 0 0 0 2px #1e1b4b, 0 0 0 3px #c4b5fd, 0 0 0 5px #5b21b6, 0 6px 14px rgba(0,0,0,0.35);
}
.avatar-cod.lvl-trainer .avatar-plate:not(.has-photo) {
    background: radial-gradient(circle at 30% 25%, rgba(255,255,255,0.2), transparent 45%), linear-gradient(145deg, #064e3b, #059669);
}
.avatar-cod.lvl-trainer .avatar-plate {
    box-shadow: 0 0 0 2px #022c22, 0 0 0 3px #6ee7b7, 0 0 0 5px #065f46, 0 6px 14px rgba(0,0,0,0.3);
}
.avatar-cod.lvl-veteran .avatar-plate:not(.has-photo) {
    background: radial-gradient(circle at 30% 25%, rgba(255,255,255,0.25), transparent 45%), linear-gradient(145deg, #1e3a8a, #7f1d1d);
}
.avatar-cod.lvl-veteran .avatar-plate {
    box-shadow: 0 0 0 2px #0f172a, 0 0 0 3px #fbbf24, 0 0 0 5px #92400e, 0 6px 16px rgba(0,0,0,0.4);
}
.avatar-cod.lvl-general .avatar-plate:not(.has-photo),
.avatar-cod.lvl-owner .avatar-plate:not(.has-photo) {
    background:
        radial-gradient(circle at 28% 22%, rgba(255,255,255,0.35), transparent 40%),
        linear-gradient(150deg, #422006 0%, #b45309 35%, #fbbf24 55%, #7f1d1d 100%);
}
.avatar-cod.lvl-general .avatar-plate,
.avatar-cod.lvl-owner .avatar-plate {
    box-shadow:
        0 0 0 2px #1c1917,
        0 0 0 3px #fde68a,
        0 0 0 5px #a16207,
        0 0 18px rgba(251, 191, 36, 0.45),
        0 8px 18px rgba(0,0,0,0.45);
}
/* Owner/General photo always wins over gold rank plate */
.avatar-cod.lvl-general .avatar-plate.has-photo,
.avatar-cod.lvl-owner .avatar-plate.has-photo {
    background-size: cover !important;
    background-position: center 18% !important;
    background-repeat: no-repeat !important;
}

/* Mini rank icons on avatar (COD emblem corners) */
.avatar-cod .rank-pip {
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.55rem;
    font-weight: 900;
    color: #0f172a;
    background: linear-gradient(180deg, #fef3c7, #d97706);
    border: 1px solid #fde68a;
    box-shadow: 0 2px 4px rgba(0,0,0,0.45);
    line-height: 1;
    z-index: 2;
}
.avatar-cod.sm .rank-pip { width: 15px; height: 15px; font-size: 0.48rem; }
.avatar-cod .rank-pip.owner {
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    min-width: 22px;
    padding: 0 3px;
    height: 16px;
    background: linear-gradient(180deg, #fef9c3, #ca8a04 40%, #854d0e);
    color: #1c1917;
    border-color: #fde68a;
    font-size: 0.5rem;
    letter-spacing: 0.04em;
}
.avatar-cod .rank-pip.veteran {
    bottom: -3px;
    right: -3px;
    background: linear-gradient(180deg, #dbeafe, #1e40af 55%, #7f1d1d);
    color: #fff;
    border-color: #93c5fd;
    font-size: 0.62rem;
}
.avatar-cod .rank-pip.stars {
    bottom: -3px;
    left: -3px;
    background: linear-gradient(180deg, #fef3c7, #b45309);
    color: #1c1917;
    font-size: 0.45rem;
    letter-spacing: -0.05em;
    width: 22px;
}
.avatar-cod.sm .rank-pip.owner { height: 14px; font-size: 0.42rem; }
.avatar-cod.sm .rank-pip.stars { width: 18px; font-size: 0.38rem; }

/* Legacy plain avatar fallback */
.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue), var(--red));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.avatar.sm { width: 40px; height: 40px; font-size: 0.95rem; }

.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.25rem;
    align-items: center;
}
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.18rem 0.48rem;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    vertical-align: middle;
    border: 1px solid transparent;
    box-shadow: 0 1px 2px rgba(0,0,0,0.12);
    clip-path: polygon(4px 0, calc(100% - 4px) 0, 100% 50%, calc(100% - 4px) 100%, 4px 100%, 0 50%);
    padding-left: 0.55rem;
    padding-right: 0.55rem;
}
.badge-vet {
    background: linear-gradient(135deg, #1e3a8a, #b91c1c);
    color: white;
    border-color: #fca5a5;
}
.badge-vet-verified {
    background: linear-gradient(135deg, #0f172a, #1e3a8a 45%, #b91c1c);
    color: #fde68a;
    border-color: #fbbf24;
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.25);
}
.badge-trainer {
    background: #ecfdf5;
    color: #065f46;
    border-color: #6ee7b7;
}
.badge-lover {
    background: #eff6ff;
    color: #1e40af;
    border-color: #93c5fd;
}
.badge-exclusive {
    background: linear-gradient(135deg, #6d28d9, #a855f7);
    color: white;
}
.badge-vip {
    background: linear-gradient(135deg, #4c1d95 0%, #7c3aed 35%, #fbbf24 70%, #f59e0b 100%);
    color: #1c1917;
    border-color: #fde68a;
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.45), 0 0 0 1px rgba(124, 58, 237, 0.35);
    font-size: 0.68rem;
    letter-spacing: 0.05em;
}
.avatar-cod.lvl-vip .avatar-plate:not(.has-photo) {
    background:
        radial-gradient(circle at 30% 25%, rgba(255,255,255,0.35), transparent 42%),
        linear-gradient(145deg, #4c1d95, #7c3aed 40%, #fbbf24 75%, #b45309);
}
.avatar-cod.lvl-vip .avatar-plate {
    box-shadow:
        0 0 0 2px #1e1b4b,
        0 0 0 3px #fde68a,
        0 0 0 5px #7c3aed,
        0 0 16px rgba(251, 191, 36, 0.4),
        0 6px 14px rgba(0,0,0,0.35);
}
.badge-pending {
    background: #fff7ed;
    color: #9a3412;
    border-color: #fdba74;
}
.badge-owner, .badge-general {
    background: linear-gradient(135deg, #78350f, #ca8a04 40%, #fbbf24 70%, #b45309);
    color: #1c1917;
    border-color: #fde68a;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.35);
    font-size: 0.68rem;
}
.badge-shitpost {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
    color: #1c1917;
    background: linear-gradient(145deg, #fde68a 0%, #fbbf24 45%, #ea580c 100%);
    border: 2px solid #78350f;
    box-shadow: 0 0 0 1px #fef3c7, 0 2px 0 #92400e;
}
.badge-admin {
    background: linear-gradient(135deg, #7f1d1d, #1e3a8a);
    color: #fff;
    border-color: #fca5a5;
}
.badge-level {
    background: #0f172a;
    color: #e2e8f0;
    border-color: #475569;
}
.service-line {
    font-size: 0.75rem;
    color: #475569;
    font-weight: 600;
    margin-top: 0.15rem;
}
.service-line strong { color: #1e3a8a; }

.stack { display: flex; flex-direction: column; gap: 0.55rem; }
.stack .btn { text-align: center; width: 100%; }

label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    color: var(--navy);
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font: inherit;
    margin-bottom: 0.65rem;
    background: var(--card);
}
textarea { min-height: 100px; resize: vertical; }
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
}
@media (max-width: 560px) {
    .form-row { grid-template-columns: 1fr; }
}

.status-msg {
    font-size: 0.9rem;
    margin-top: 0.5rem;
    min-height: 1.2em;
}
.status-msg.ok { color: #166534; }
.status-msg.err { color: #b91c1c; }

.composer-tabs {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}
.composer-tabs button {
    border: 1px solid #e2e8f0;
    background: #f7f5f2;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    font-family: inherit;
}
.composer-tabs button.active {
    background: var(--navy);
    color: white;
    border-color: var(--navy);
}

.feed-filters {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.feed-filters button {
    border: none;
    background: var(--card);
    padding: 0.45rem 0.85rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    font-family: inherit;
}
.feed-filters button.active {
    background: var(--red);
    color: white;
}

/* —— Portal mode (post-login social media landing) —— */
body.portal-mode .community-hero {
    padding-bottom: 1rem;
}
body.portal-mode .checkin-panel {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin: 0;
    padding: 0;
    border: none;
    transition: max-height 0.4s ease, opacity 0.35s ease, margin 0.35s;
}
body.portal-mode #composer-card {
    position: sticky;
    top: 68px;
    z-index: 40;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
    border: 1px solid #bfdbfe;
}
body.portal-mode .social-feed .post {
    border-radius: 18px;
}
.portal-welcome {
    background: linear-gradient(135deg, #0f172a, #1e3a8a 55%, #7f1d1d);
    color: #f8fafc;
    border-radius: 14px;
    padding: 0.9rem 1.1rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15);
    animation: postPop 0.55s ease both;
}
.portal-welcome.hidden { display: none; }
.portal-welcome strong { color: #fde68a; }

/* —— Organic social feed —— */
.social-heading {
    font-size: 1.15rem;
    margin-bottom: 0.15rem;
}
.social-sub { margin-bottom: 0.85rem; font-size: 0.9rem; }
.social-composer-card {
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 8px 28px rgba(15,23,42,0.06);
}
.social-composer .composer-row {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}
.social-composer .composer-avatar {
    flex-shrink: 0;
    padding-top: 0.15rem;
}
.social-composer .composer-main { flex: 1; min-width: 0; }
.social-composer textarea {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 0.85rem 1rem;
    font: inherit;
    resize: vertical;
    min-height: 72px;
    background: #faf8f5;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.social-composer textarea:focus {
    outline: none;
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.12);
    background: #fff;
}
.composer-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.65rem;
}
.composer-footer select {
    flex: 1;
    min-width: 140px;
    padding: 0.55rem 0.7rem;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    font: inherit;
    background: #faf8f5;
}
.btn-post {
    border-radius: 999px !important;
    padding-left: 1.4rem !important;
    padding-right: 1.4rem !important;
    min-width: 110px;
}
.photo-upload-btn, .photo-attach-label {
    display: inline-block;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--blue);
    background: #eff6ff;
    border: 1px dashed #93c5fd;
    border-radius: 10px;
    padding: 0.45rem 0.7rem;
    margin: 0.35rem 0;
}
.photo-upload-btn:hover, .photo-attach-label:hover {
    background: #dbeafe;
}
.profile-photo-upload {
    margin: 0.35rem 0 0.75rem;
}
.post-image-preview {
    margin-top: 0.5rem;
    border-radius: 14px;
    overflow: hidden;
    max-height: 220px;
    border: 1px solid #e2e8f0;
}
.post-image-preview img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 220px;
    object-fit: cover;
}
.post-image-preview.hidden { display: none; }

.social-feed {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.post {
    background: var(--card);
    border-radius: 16px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.05);
    padding: 1.05rem 1.15rem;
    margin-bottom: 0;
    border: 1px solid rgba(226, 232, 240, 0.9);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    opacity: 1;
    transform: translateY(0) scale(1);
}
.post:hover {
    box-shadow: 0 10px 28px rgba(15,23,42,0.08);
}
/* Entrance animation for feed threads */
@keyframes postIn {
    0% {
        opacity: 0;
        transform: translateY(28px) scale(0.96);
        filter: blur(2px);
    }
    60% {
        opacity: 1;
        filter: blur(0);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}
@keyframes postPop {
    0% {
        opacity: 0;
        transform: translateY(-12px) scale(0.92);
        box-shadow: 0 0 0 rgba(185, 28, 28, 0);
    }
    40% {
        transform: translateY(2px) scale(1.02);
        box-shadow: 0 12px 32px rgba(30, 58, 138, 0.18);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        box-shadow: 0 4px 18px rgba(0,0,0,0.05);
    }
}
@keyframes commentIn {
    0% {
        opacity: 0;
        transform: translateX(-10px);
        max-height: 0;
    }
    100% {
        opacity: 1;
        transform: translateX(0);
        max-height: 200px;
    }
}
@keyframes heartBurst {
    0% { transform: scale(1); }
    40% { transform: scale(1.35); color: #b91c1c; }
    100% { transform: scale(1); }
}
.post.post-enter {
    animation: postIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.post.post-new {
    animation: postPop 0.65s cubic-bezier(0.34, 1.4, 0.64, 1) both;
    border-color: #93c5fd;
}
.post .comment.comment-enter {
    animation: commentIn 0.35s ease both;
}
.post-actions .like-btn.liked-burst {
    animation: heartBurst 0.45s ease;
    color: #b91c1c;
}
.post-head {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    margin-bottom: 0.65rem;
}
.post-meta { flex: 1; min-width: 0; }
.post-meta .name {
    font-weight: 800;
    color: var(--navy);
}
.post-meta .when {
    font-size: 0.8rem;
    color: var(--slate);
}
.post-body {
    white-space: pre-wrap;
    word-break: break-word;
    margin-bottom: 0.75rem;
    line-height: 1.55;
    font-size: 1.02rem;
}
.post-photo {
    margin: 0.35rem 0 0.85rem;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: #0f172a;
    max-height: 420px;
}
.post-photo img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: cover;
}
.comments {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #f1f5f9;
}
.comment {
    background: #f8fafc;
    border-radius: 12px;
    padding: 0.45rem 0.7rem;
    margin: 0.35rem 0;
    font-size: 0.92rem;
}
.comment-form {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.5rem;
}
.comment-form input {
    flex: 1;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    padding: 0.5rem 0.85rem;
    font: inherit;
}
.thread-pulse {
    position: relative;
}
.thread-pulse::before {
    content: "";
    position: absolute;
    left: -6px;
    top: 0;
    bottom: 0;
    width: 3px;
    border-radius: 3px;
    background: linear-gradient(180deg, #1e3a8a, #b91c1c);
    opacity: 0;
    animation: threadGlow 1.2s ease 1;
}
@keyframes threadGlow {
    0% { opacity: 0; transform: scaleY(0.3); }
    40% { opacity: 1; transform: scaleY(1); }
    100% { opacity: 0.35; }
}
.post-video {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    background: #0f172a;
    margin-bottom: 0.75rem;
}
.post-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.post-actions {
    display: flex;
    gap: 0.75rem;
    border-top: 1px solid #f1f5f9;
    padding-top: 0.65rem;
}
.post-actions button {
    background: none;
    border: none;
    color: var(--slate);
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
}
.post-actions button:hover { color: var(--red); }
.tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    background: #efece8;
    color: var(--blue);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    margin-right: 0.35rem;
}

.gate {
    text-align: center;
    padding: 2rem 1rem;
}
.gate h2 { color: var(--navy); margin-bottom: 0.5rem; }

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.modal-backdrop.open { display: flex; }
.modal {
    background: var(--card);
    border-radius: 14px;
    max-width: 440px;
    width: 100%;
    max-height: 90vh;
    overflow: auto;
    padding: 1.5rem;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}
.modal h2 { color: var(--navy); margin-bottom: 0.75rem; }
.modal-close {
    float: right;
    border: none;
    background: #efece8;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
}

.paywall {
    background: linear-gradient(160deg, #1e1b4b, #4c1d95 50%, #7c3aed);
    color: white;
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: center;
    margin-bottom: 1.25rem;
}
.paywall h2 { color: white; font-size: 1.75rem; margin-bottom: 0.5rem; }
.paywall .price {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0.75rem 0;
}
.paywall .price span { font-size: 1rem; font-weight: 600; opacity: 0.85; }
.paywall ul {
    list-style: none;
    text-align: left;
    max-width: 360px;
    margin: 1rem auto 1.5rem;
}
.paywall ul li {
    padding: 0.35rem 0;
    padding-left: 1.4rem;
    position: relative;
}
.paywall ul li::before {
    content: "★";
    position: absolute;
    left: 0;
    color: #fde68a;
}

.live-panel {
    background: #0f172a;
    color: white;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 1rem;
}
.live-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1rem;
    background: #1e293b;
}
.live-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ef4444;
    margin-right: 0.4rem;
    animation: pulse 1.4s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}
.live-stage {
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.75rem;
    padding: 2rem 1rem;
    background: radial-gradient(circle at center, #1e3a8a 0%, #0f172a 70%);
}
.live-stage iframe {
    width: 100%;
    min-height: 320px;
    border: 0;
}

.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.topic-card {
    background: var(--card);
    border-radius: 10px;
    padding: 1rem;
    border-left: 4px solid var(--exclusive);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    cursor: pointer;
    transition: transform 0.15s;
}
.topic-card:hover { transform: translateY(-2px); }
.topic-card h4 { color: var(--navy); margin-bottom: 0.25rem; }
.topic-card p { font-size: 0.85rem; color: var(--slate); }

.comments {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dashed #e2e8f0;
}
.comment {
    font-size: 0.9rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid #f8fafc;
}
.comment strong { color: var(--navy); }
.comment-form {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.5rem;
}
.comment-form input { margin: 0; flex: 1; }

footer.site-footer {
    background: var(--navy);
    color: #cbd5e1;
    padding: 2rem 1.25rem;
    text-align: center;
    font-size: 0.9rem;
}
footer.site-footer a { color: #93c5fd; }

.hidden { display: none !important; }
.alert-banner {
    background: #fff7ed;
    border: 1px solid #fdba74;
    color: #9a3412;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}
.feature-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    margin: 1.25rem 0;
}
.feature-list .item {
    background: rgba(255,255,255,0.12);
    border-radius: 10px;
    padding: 0.85rem;
    text-align: left;
    font-size: 0.9rem;
}

/* 3 C's — Community · Camaraderie · Companionship */
.three-cs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.85rem;
    max-width: 920px;
    margin: 1.5rem auto 0;
    text-align: left;
}
@media (max-width: 720px) {
    .three-cs { grid-template-columns: 1fr; }
}
.three-c-card {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 12px;
    padding: 1.1rem 1rem;
    backdrop-filter: blur(4px);
}
.three-c-card .c-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--card);
    color: var(--red);
    font-weight: 900;
    font-size: 1.15rem;
    margin-bottom: 0.55rem;
}
.three-c-card h3 {
    color: white;
    font-size: 1.05rem;
    margin-bottom: 0.35rem;
    letter-spacing: 0.02em;
}
.three-c-card p {
    font-size: 0.88rem;
    opacity: 0.92;
    line-height: 1.45;
    margin: 0;
}
.three-c-tagline {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}
.three-cs-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin: 0.75rem 0 0;
}
.three-cs-bar span {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}
.pillars-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.65rem;
    margin-bottom: 1rem;
}
.pillar-chip {
    border-radius: 10px;
    padding: 0.75rem;
    text-align: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: white;
}
.pillar-chip small {
    display: block;
    font-weight: 500;
    font-size: 0.75rem;
    opacity: 0.9;
    margin-top: 0.2rem;
}
.pillar-community { background: linear-gradient(135deg, #1e3a8a, #2563eb); }
.pillar-camaraderie { background: linear-gradient(135deg, #b91c1c, #dc2626); }
.pillar-companionship { background: linear-gradient(135deg, #0f766e, #14b8a6); }

/* —— Veteran Check-In Status Box —— */
.checkin-panel {
    background: linear-gradient(160deg, #0f172a 0%, #1e3a8a 55%, #7f1d1d 100%);
    color: white;
    border-radius: 16px;
    padding: 1.35rem 1.25rem 1.5rem;
    margin-bottom: 1.15rem;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.25);
}
.checkin-panel h2 {
    color: white;
    font-size: 1.35rem;
    margin-bottom: 0.35rem;
}
.checkin-panel .sub {
    opacity: 0.9;
    font-size: 0.92rem;
    margin-bottom: 1rem;
    max-width: 52rem;
}
.crisis-bar {
    background: #450a0a;
    border: 1px solid #fca5a5;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.45;
}
.crisis-bar a {
    color: #fde68a;
    font-weight: 800;
}
.checkin-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.55rem;
    margin-bottom: 1rem;
}
.checkin-status-btn {
    border: 2px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.08);
    color: white;
    border-radius: 10px;
    padding: 0.85rem 0.6rem;
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.88rem;
    text-align: center;
    transition: transform 0.12s, background 0.12s, border-color 0.12s;
}
.checkin-status-btn:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,0.16);
}
.checkin-status-btn.selected {
    border-color: #fde68a;
    background: rgba(253, 230, 138, 0.2);
    box-shadow: 0 0 0 1px #fde68a;
}
.checkin-status-btn .emoji {
    display: block;
    font-size: 1.4rem;
    margin-bottom: 0.25rem;
}
.checkin-status-btn.ok { border-left: 4px solid #4ade80; }
.checkin-status-btn.buddy { border-left: 4px solid #fbbf24; }
.checkin-status-btn.need { border-left: 4px solid #fb923c; }
.checkin-status-btn.mental { border-left: 4px solid #f87171; }

.checkin-board {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.checkin-card {
    background: var(--card);
    color: #1e293b;
    border-radius: 12px;
    padding: 0.9rem 1rem;
    border-left: 5px solid #94a3b8;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
.checkin-card.status-ok { border-left-color: #16a34a; }
.checkin-card.status-buddy { border-left-color: #d97706; }
.checkin-card.status-need { border-left-color: #ea580c; }
.checkin-card.status-mental { border-left-color: #dc2626; background: #fff7ed; }
.checkin-card .ci-head {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 0.35rem;
}
.checkin-card .ci-name {
    font-weight: 800;
    color: var(--navy);
}
.checkin-card .ci-status-label {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: #efece8;
}
.checkin-card.status-ok .ci-status-label { background: #dcfce7; color: #166534; }
.checkin-card.status-buddy .ci-status-label { background: #fef3c7; color: #92400e; }
.checkin-card.status-need .ci-status-label { background: #ffedd5; color: #9a3412; }
.checkin-card.status-mental .ci-status-label { background: #fee2e2; color: #991b1b; }
.checkin-card .ci-meta {
    font-size: 0.8rem;
    color: var(--slate);
    margin-bottom: 0.35rem;
}
.checkin-card .ci-msg {
    font-size: 0.95rem;
    white-space: pre-wrap;
    word-break: break-word;
}
.checkin-card .ci-actions {
    margin-top: 0.55rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.checkin-empty {
    text-align: center;
    padding: 1.25rem;
    opacity: 0.85;
    font-size: 0.95rem;
}
.checkin-panel label { color: #e2e8f0; }
.checkin-panel input,
.checkin-panel select,
.checkin-panel textarea {
    background: rgba(255,255,255,0.95);
}
.checkin-panel .btn-ghost {
    color: white;
}
.vet-free-banner {
    background: rgba(74, 222, 128, 0.15);
    border: 1px solid rgba(74, 222, 128, 0.45);
    border-radius: 10px;
    padding: 0.65rem 0.85rem;
    font-size: 0.88rem;
    margin-bottom: 0.85rem;
}
