:root {
    --bg: #fbf7f0;
    --bg-soft: #f4ede1;
    --surface: rgba(255, 252, 247, 0.92);
    --ink: #613600;
    --muted: #8b6f4e;
    --primary: #9a5b0a;
    --primary-2: #e1ab58;
    --accent: #d7a148;
    --danger: #dc2626;
    --success: #15803d;
    --border: #ead7bd;
    --surface-strong: #fffdf9;
    --shadow-soft: 0 20px 45px rgba(122, 82, 28, 0.09);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Avenir Next", "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 0% 50%, rgba(232, 243, 239, 0.92), transparent 26%),
        radial-gradient(circle at 100% 0%, rgba(234, 209, 166, 0.42), transparent 18%),
        linear-gradient(180deg, #fcfbf8, var(--bg));
    color: var(--ink);
    min-height: 100vh;
}

.bg-deco {
    position: fixed;
    right: -220px;
    top: -180px;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(225, 171, 88, .16), rgba(225, 171, 88, 0) 68%);
    filter: blur(10px);
    pointer-events: none;
    z-index: 0;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: linear-gradient(180deg, rgba(255, 251, 246, 0.98), rgba(247, 238, 225, 0.96));
    border-right: 1px solid var(--border);
    padding: 14px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: auto;
    transition: width .2s ease;
    z-index: 20;
    box-shadow: inset -1px 0 0 rgba(176, 130, 67, 0.05);
}

.sidebar.collapsed {
    width: 84px;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.sidebar-toggle {
    width: auto;
    padding: 8px 10px;
    margin: 0;
}

.sidebar-profile {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
    padding: 10px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255, 248, 239, 0.95), rgba(246, 236, 220, 0.95));
    border: 1px solid var(--border);
}

.branding-stack {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.branding-logo {
    width: 100%;
    max-height: 56px;
    object-fit: contain;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fffdf8;
    padding: 6px;
}

.branding-logo.company {
    max-height: 52px;
    background: #faf4ea;
}

.profile-name {
    margin: 0;
    font-weight: 700;
}

.avatar-fallback {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #7a4200);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
}

.sidebar-nav {
    display: grid;
    gap: 8px;
}

.sidebar-sections {
    display: grid;
    gap: 12px;
}

.nav-section {
    display: grid;
    gap: 8px;
}

.nav-section-toggle {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 2px 4px;
    text-align: left;
    margin: 0;
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 700;
    cursor: pointer;
    position: relative;
}

.nav-section-toggle::after {
    content: '▾';
    position: absolute;
    right: 2px;
    top: 0;
    font-size: 12px;
}

.nav-section.collapsed-section .nav-section-toggle::after {
    content: '▸';
}

.nav-section.collapsed-section .sidebar-nav {
    display: none;
}

.sidebar-nav a {
    background: rgba(255, 252, 248, 0.95);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 9px 11px;
    color: var(--ink);
    font-size: 14px;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.sidebar-nav a.active {
    background: linear-gradient(135deg, rgba(255, 244, 226, 1), rgba(247, 230, 199, 1));
    border-color: #d8b17a;
    color: #7a4200;
    font-weight: 700;
    box-shadow: 0 10px 22px rgba(166, 117, 43, 0.14);
}

.sidebar-nav a:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(139, 100, 39, 0.08);
}

.notif-badge {
    display: inline-grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-left: 6px;
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

.logout-form { margin-top: 12px; }

.mobile-menu-btn {
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 30;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    padding: 0;
    margin: 0;
    display: none;
    box-shadow: 0 10px 22px rgba(0, 0, 0, .2);
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.28);
    z-index: 19;
    display: none;
}

.sidebar-backdrop.is-open {
    display: block;
}

.main-panel {
    flex: 1;
    min-width: 0;
}

.container {
    max-width: 980px;
    margin: 20px auto;
    padding: 0 16px 24px;
}

.sidebar.collapsed .sidebar-brand strong,
.sidebar.collapsed .sidebar-profile div,
.sidebar.collapsed .sidebar-nav a {
    overflow: hidden;
    white-space: nowrap;
}

.sidebar.collapsed .sidebar-brand strong { width: 0; }
.sidebar.collapsed .sidebar-profile { justify-content: center; }

.sidebar.collapsed .sidebar-profile .avatar-lg,
.sidebar.collapsed .sidebar-profile .avatar-fallback {
    width: 36px;
    height: 36px;
}

.sidebar.collapsed .sidebar-nav a {
    font-size: 0;
    height: 38px;
    position: relative;
}

.sidebar.collapsed .sidebar-nav a::before {
    content: '•';
    font-size: 18px;
    color: var(--primary);
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
}

.sidebar.collapsed .nav-section-toggle {
    display: none;
}

.sidebar.collapsed .branding-stack {
    display: none;
}

.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: linear-gradient(135deg, #fffaf3, #f6ead8);
    color: var(--ink);
    border: 1px solid #e4c89c;
    border-radius: 20px;
    padding: 22px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-soft);
}

.hero h1 { margin: 0 0 8px; font-size: 1.5rem; }
.hero p { margin: 0; opacity: .92; color: var(--muted); }

.card {
    background: var(--surface);
    border-radius: 22px;
    padding: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    margin-bottom: 14px;
    backdrop-filter: blur(8px);
}

.auth-branding {
    margin-bottom: 10px;
}

.auth-brand-logo {
    width: 100%;
    max-height: 72px;
    object-fit: contain;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #fffdf9;
    padding: 8px;
}

.login-shell {
    min-height: calc(100vh - 40px);
    position: relative;
    display: grid;
    grid-template-rows: auto auto 1fr;
    align-items: start;
    padding-top: 6px;
}

.login-shell::before,
.login-shell::after {
    content: "";
    position: absolute;
    inset: auto auto 16% -8%;
    width: 44%;
    height: 320px;
    border-radius: 999px;
    background: rgba(214, 195, 163, 0.11);
    transform: rotate(18deg);
    pointer-events: none;
}

.login-shell::after {
    inset: auto -10% 8% auto;
    width: 52%;
    height: 300px;
    transform: rotate(-14deg);
}

.login-top-brand {
    display: flex;
    justify-content: center;
    margin: 8px 0 18px;
}

.login-top-logo {
    width: min(340px, 70vw);
    display: block;
    object-fit: contain;
}

.login-card-wrap {
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.login-card-panel {
    width: min(760px, 92vw);
    padding: 12px 12px 16px;
    border-radius: 12px;
    background: rgba(247, 240, 233, 0.96);
    border: 2px solid #e5a353;
    box-shadow: 0 14px 34px rgba(154, 91, 10, 0.10);
}

.login-card-header {
    text-align: center;
    margin-bottom: 8px;
}

.login-card-header h1 {
    margin: 0;
    color: #8b4600;
    font-size: 1.7rem;
    font-weight: 800;
}

.login-card-header p {
    margin: 2px 0 0;
    color: #a05d12;
    font-size: 1rem;
}

.login-form-grid {
    display: grid;
    gap: 2px;
}

.login-form-grid label {
    color: #cb8c6d;
    font-weight: 700;
    margin-top: 6px;
}

.login-people-stage {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: end;
    margin-top: 14px;
}

.login-people-image {
    width: min(1080px, 96vw);
    display: block;
    object-fit: contain;
}

.timeline-wrap { display: grid; gap: 14px; }
.timeline-card {
    border-top: 6px solid var(--primary);
    border-radius: 16px;
}

.page-hero {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #fff8ed, #f4e5cf);
    color: var(--ink);
    border: 1px solid #e2c69d;
    border-radius: 20px;
    padding: 14px 16px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-soft);
}

.page-hero img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.85);
    padding: 4px;
    border: 1px solid #ecd7b5;
}

.page-hero h2,
.page-hero h3,
.page-hero p {
    margin: 0;
    color: var(--ink);
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.kpi-card {
    background: linear-gradient(180deg, #fffdf9, #f8efe2);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 10px;
}

.kpi-card .label {
    font-size: 12px;
    color: var(--muted);
}

.kpi-card .value {
    font-size: 22px;
    font-weight: 800;
}

.list-modern {
    display: grid;
    gap: 8px;
}

.list-row {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 9px 10px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 253, 249, 0.95);
}

.list-row .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 6px;
    background: var(--primary);
    flex: 0 0 auto;
}

.challenge-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.challenge-admin-card {
    border-top: 4px solid #89d0c1;
}

.reward-card .media-preview img {
    height: 220px;
    object-fit: cover;
}
.timeline-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}
.timeline-kicker { letter-spacing: .2px; margin-bottom: 4px; }

.points-chip {
    background: #d9f3ef;
    color: #0b5f59;
    border: 1px solid #b6e5dd;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.filter-bar { margin-bottom: 10px; }
.filters-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.filter-field {
    flex: 1 1 240px;
}

.filter-field label {
    margin-bottom: 6px;
    font-weight: 700;
    color: var(--muted);
    font-size: 13px;
}

.social-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0;
}
.stat-pill {
    background: #fbf1dd;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    color: #7a4200;
}

.challenge-thread {
    margin-top: 0;
    background: transparent;
    border: 0;
    border-radius: 12px;
    padding: 0;
}
.challenge-thread summary { cursor: pointer; font-weight: 600; }

.composer-box {
    margin-top: 12px;
    border: 1px solid #e4cda8;
    border-radius: 18px;
    padding: 12px;
    background: linear-gradient(180deg, #fffdf8, #f7ecdb);
}
.composer-box summary { cursor: pointer; font-weight: 700; }

.challenge-cta-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
    align-items: stretch;
}

.cta-box {
    margin-top: 0;
    min-width: 0;
}

.cta-summary,
.thread-summary {
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 999px;
    border: 1px solid #e4bf88;
    background: linear-gradient(180deg, #fff4de, #f7e0b6);
    color: #7a4200;
    font-weight: 800;
}

.publish-launch {
    width: 100%;
    margin: 0;
    cursor: pointer;
    justify-content: center;
    min-height: 52px;
}

.thread-summary {
    width: 100%;
    justify-content: center;
    min-height: 52px;
}

.challenge-thread[open] {
    grid-column: 1 / -1;
    border: 1px solid var(--border);
    background: #fffaf3;
    padding: 10px;
}

.challenge-thread[open] .thread-summary {
    margin-bottom: 8px;
}

.cta-summary::-webkit-details-marker,
.thread-summary::-webkit-details-marker {
    display: none;
}

.cta-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #f3debc;
}

.cta-gif {
    width: 22px;
    height: 22px;
    object-fit: contain;
    border-radius: 50%;
}

.challenge-submit-modern {
    display: grid;
    gap: 10px;
}

.challenge-submit-modern .hint {
    font-size: 12px;
    color: var(--muted);
    margin: 0;
}

.challenge-submit-modern .file-input-modern {
    border: 1px dashed #d4ac73;
    background: #fffdf9;
    border-radius: 12px;
    padding: 10px;
}

.submit-preview {
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: #fffdf9;
}

.submit-preview-img {
    width: 100%;
    max-height: 280px;
    object-fit: cover;
    display: block;
}

.submission-card {
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(255, 252, 248, 0.96);
    padding: 12px;
    margin-top: 10px;
}
.submission-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

.actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
.inline-form { margin: 0; width: auto; }
.action-btn { width: auto; padding: 8px 12px; margin: 0; }

.media-preview {
    margin: 8px 0 10px;
    border-radius: 12px;
    overflow: hidden;
    background: #f4ede4;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 240px;
}
.media-preview img,
.media-preview video,
.media-preview iframe {
    width: 100%;
    height: clamp(240px, 42vw, 460px);
    display: block;
    border: 0;
    object-fit: contain;
    background: #f1eadf;
}
.media-hero img,
.media-hero video,
.media-hero iframe { height: clamp(280px, 48vw, 520px); }

.carousel {
    display: grid;
    grid-template-columns: 36px 1fr 36px;
    gap: 8px;
    align-items: center;
    margin: 10px 0;
}
.carousel-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    padding: 0;
    margin: 0;
}
.carousel-track-wrap {
    overflow: hidden;
}
.carousel-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(220px, 1fr);
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-slide {
    scroll-snap-align: center;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: #fffdf9;
}
.carousel-slide img,
.carousel-slide video,
.carousel-slide iframe {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border: 0;
    display: block;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 14px;
    z-index: 1200;
}
.modal-overlay.is-open { display: flex; }
.modal-card {
    width: min(640px, 100%);
    max-height: 90vh;
    overflow: auto;
    background: #fffdf9;
    border-radius: 18px;
    border: 1px solid var(--border);
    box-shadow: 0 24px 54px rgba(93, 58, 19, .18);
}
.modal-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
}
.modal-head h4 { margin: 0; }
.modal-close { width: auto; padding: 8px 12px; margin: 0; }
.modal-content { padding: 12px 14px; }

.publish-modal .modal-card {
    width: min(720px, 100%);
}

@media (max-width: 720px) {
    .login-shell {
        min-height: auto;
        padding-top: 0;
    }

    .login-top-brand {
        margin: 6px 0 14px;
    }

    .login-top-logo {
        width: min(240px, 64vw);
    }

    .login-card-panel {
        width: min(96vw, 760px);
        padding: 12px;
    }

    .login-card-header h1 {
        font-size: 1.35rem;
    }

    .login-card-header p {
        font-size: .92rem;
    }

    .login-people-stage {
        margin-top: 8px;
    }

    .login-people-image {
        width: min(100%, 720px);
    }

    .publish-modal {
        padding: 0;
    }

    .publish-modal .modal-card {
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        border: 0;
    }

    .publish-modal .modal-content {
        max-height: calc(100vh - 64px);
        overflow: auto;
        padding-bottom: 24px;
    }
}

.load-more-wrap {
    display: flex;
    justify-content: center;
    margin: 10px 0 20px;
}

.avatar-wrap { margin-bottom: 10px; }
.avatar-lg {
    width: 96px;
    height: 96px;
    border-radius: 999px;
    object-fit: cover;
    border: 2px solid var(--border);
}

input, textarea, select, button {
    width: 100%;
    padding: 10px;
    margin: 6px 0 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fffdf9;
    color: var(--ink);
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #d5a252;
    box-shadow: 0 0 0 4px rgba(213, 162, 82, 0.14);
}

textarea { min-height: 80px; }

input[type="checkbox"],
input[type="radio"] {
    width: auto;
    margin: 0;
    padding: 0;
    accent-color: var(--primary);
}

button {
    background: linear-gradient(135deg, #e2a650, #ca7f21);
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: 700;
    box-shadow: 0 10px 20px rgba(182, 122, 36, 0.18);
}
button:hover { filter: brightness(1.03); transform: translateY(-1px); }

.btn-ghost {
    background: #fffaf3;
    color: var(--primary);
    border: 1px solid var(--primary);
    box-shadow: none;
}

a {
    color: var(--primary);
    text-decoration: none;
}

.flash {
    padding: 10px 12px;
    border-radius: 14px;
    margin-bottom: 12px;
    border: 1px solid transparent;
}
.flash.success {
    background: #f4fbef;
    border-color: #cae6a8;
    color: var(--success);
}
.flash.error {
    background: #fff4ef;
    border-color: #f0c4b3;
    color: var(--danger);
}

.small { font-size: 12px; color: var(--muted); }
.grid { display: grid; gap: 12px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 860px;
}

.admin-table th,
.admin-table td {
    border-bottom: 1px solid var(--border);
    text-align: left;
    padding: 10px 8px;
    font-size: 14px;
}

.admin-table th {
    color: var(--muted);
    font-weight: 700;
}

.btn-link {
    display: inline-block;
    text-decoration: none;
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 12px;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 600;
    background: #fffaf3;
}

.notif-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 14px;
    margin-bottom: 8px;
    background: #fffdf9;
}

.notif-item.is-unread {
    background: #fff8ee;
}

.notif-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--danger);
    flex: 0 0 auto;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.check-card {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fffaf4;
    padding: 8px 10px;
}

.check-card input[type="checkbox"] {
    width: auto;
    margin: 0;
    flex: 0 0 auto;
}

.check-card {
    font-size: 14px;
    line-height: 1.2;
}

.points-burst {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    pointer-events: none;
}

.points-burst.is-open {
    display: flex;
}

.points-card {
    width: min(280px, 92vw);
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, .16);
}

.points-star {
    font-size: 62px;
    display: inline-block;
    transform-origin: center;
    animation: spin-star 1.2s ease-out;
}

.points-spark {
    display: inline-block;
    font-size: 20px;
    animation: spark-pop 1.1s ease-out;
}

.points-value {
    margin-top: 8px;
    font-size: 30px;
    font-weight: 800;
    color: var(--primary);
}

@keyframes spin-star {
    0% { transform: scale(0.4) rotate(0deg); opacity: .2; }
    55% { transform: scale(1.25) rotate(620deg); opacity: 1; }
    100% { transform: scale(1) rotate(720deg); opacity: 1; }
}

@keyframes spark-pop {
    0% { transform: scale(0.2); opacity: 0; }
    40% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(1); opacity: .2; }
}

@media (max-width: 900px) {
    .app-shell { display: block; }
    .sidebar {
        width: min(84vw, 320px);
        height: 100vh;
        position: fixed;
        left: 0;
        top: 0;
        border-right: 1px solid var(--border);
        border-bottom: 0;
        transform: translateX(-105%);
        transition: transform .22s ease;
        box-shadow: 0 20px 40px rgba(0, 0, 0, .22);
    }
    .sidebar.is-open { transform: translateX(0); }
    .sidebar.collapsed { width: min(84vw, 320px); }
    .sidebar.collapsed .sidebar-brand strong { width: auto; }
    .sidebar.collapsed .sidebar-profile div,
    .sidebar.collapsed .sidebar-nav a { font-size: inherit; }
    .sidebar.collapsed .sidebar-nav a::before { content: none; }
    .mobile-menu-btn { display: inline-flex; align-items: center; justify-content: center; }
    .sidebar-toggle { display: inline-flex; }
    .main-panel { padding-top: 56px; }
}

@media (max-width: 720px) {
    .filters-form { flex-direction: column; align-items: stretch; }
    .filter-field { flex: 1 1 auto; }
    .hero { padding: 16px; }
    .container { padding: 0 12px 22px; }
    .timeline-head { flex-direction: column; }
    .carousel { grid-template-columns: 1fr; }
    .carousel-btn { display: none; }
    .challenge-cta-row { grid-template-columns: 1fr; }
    .challenge-thread[open] { grid-column: auto; }
    .media-preview { min-height: 200px; }
    .media-preview img,
    .media-preview video,
    .media-preview iframe { height: clamp(200px, 60vw, 360px); }
}
