/* ============================
   bydapeople – PHP Version
   Matching Node.js app exactly
   Mobile-first responsive CSS
   ============================ */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@500;700&family=Inter:wght@400;500;600;700&family=Orbitron:wght@700&display=swap');

:root {
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-brand: 'Instrument Sans', sans-serif;

    /* Accent palette – default is Civic Blue */
    --accent-violet: #2563eb;
    --accent-violet-dark: #1d4ed8;
    --accent-violet-light: #dbeafe;
    --accent-pink: #a78bfa;
    --accent-blue: #3b82f6;
    --accent-green: #10b981;

    /* Primary (slate/gray) */
    --primary-50: #f8fafc;
    --primary-100: #f1f5f9;
    --primary-200: #e2e8f0;
    --primary-300: #cbd5e1;
    --primary-400: #94a3b8;
    --primary-500: #64748b;
    --primary-600: #475569;
    --primary-700: #334155;
    --primary-800: #1e293b;
    --primary-900: #0f172a;

    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;

    --card-bg: white;

    --radius: 0.75rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ---- Hide Google Translate default UI ---- */
.goog-te-banner-frame, #goog-gt-tt, .goog-te-balloon-frame { display: none !important; }
.goog-te-gadget { font-size: 0 !important; }
.goog-te-combo { display: none !important; }
body { top: 0 !important; }
.skiptranslate { display: none !important; }
#google_translate_element { display: none !important; }

body {
    font-family: var(--font-sans);
    background: var(--primary-50);
    color: var(--primary-800);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    min-height: 100dvh;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior-y: contain;
}

a { color: var(--accent-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* ---- Layout ---- */
.container { max-width: 32rem; margin: 0 auto; padding: 0 1rem; }
.app-main { padding: 0 1rem 1rem; max-width: 32rem; margin: 0 auto; width: 100%; }

/* ---- Header (matches AppHeader.tsx) ---- */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--primary-200);
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.app-header .logo {
    text-decoration: none;
    line-height: 1;
}

.app-header .logo:hover { text-decoration: none; }

.logo-top {
    display: inline-flex;
    align-items: flex-start;
}

.logo-core {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-beta {
    font-family: var(--font-sans);
    font-size: 0.45em;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: currentColor;
    background-clip: unset;
    color: var(--primary-400);
    vertical-align: super;
    margin-left: 0.15em;
    opacity: 0.7;
}

.logo-brand {
    font-family: var(--font-brand);
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.01em;
    line-height: 1.1;
    background: linear-gradient(135deg, var(--primary-700) 30%, var(--accent-violet-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-tagline {
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 0.47rem;
    letter-spacing: 0.04em;
    background: linear-gradient(90deg, var(--accent-violet), var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.3;
}

.header-actions { display: flex; align-items: center; gap: 0.5rem; }

.header-back {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--primary-500);
    font-size: 0.85rem;
    padding: 0.25rem;
}

.header-back:hover { color: var(--primary-700); text-decoration: none; }

/* ---- Header nav items ---- */
.header-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.0625rem;
    padding: 0.1875rem 0.375rem;
    color: var(--primary-400);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    font-family: var(--font-sans);
    position: relative;
    transition: color 0.2s ease;
}

.header-nav-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.header-nav-item span {
    font-size: 0.55rem;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.header-nav-item.active {
    color: var(--accent-violet);
}

.header-nav-item:hover {
    color: var(--accent-violet);
    text-decoration: none;
}

.header-nav-item:active svg {
    transform: scale(0.88);
}

.header-nav-avatar {
    padding: 0.1875rem 0.25rem;
}

.header-nav-signin {
    color: var(--accent-violet);
    font-weight: 600;
}

/* ---- Home FAB ---- */
#home-fab:active {
    transform: scale(0.92);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    touch-action: manipulation;
    transition: all 0.15s;
    text-decoration: none;
    line-height: 1.4;
    font-family: var(--font-sans);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-violet), var(--accent-violet-dark));
    color: white;
}
.btn-primary:hover { opacity: 0.9; text-decoration: none; }

.btn-green {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
}
.btn-green:hover { opacity: 0.9; text-decoration: none; }

.btn-secondary {
    background: var(--primary-100);
    color: var(--primary-700);
    border: 1px solid var(--primary-300);
}
.btn-secondary:hover { background: var(--primary-200); text-decoration: none; }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { opacity: 0.9; text-decoration: none; }

.btn-outline {
    background: white;
    border: 1px solid var(--primary-300);
    color: var(--primary-700);
}
.btn-outline:hover { background: var(--primary-50); text-decoration: none; }

.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8rem; }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---- Cards ---- */
.card {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--primary-200);
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.card-body { padding: 0.875rem; }

/* ---- Issue Card (matches IssueCardWithActions.tsx) ---- */
.issue-card {
    border-left: 4px solid var(--primary-300);
    transition: transform 0.1s;
}

.issue-card .issue-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-900);
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.issue-card .issue-title a { color: var(--primary-900); }
.issue-card .issue-title a:hover { color: var(--accent-violet); text-decoration: none; }

.issue-card .issue-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--primary-500);
    align-items: center;
}

.issue-card .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.issue-card .issue-desc {
    font-size: 0.8rem;
    color: var(--primary-600);
    margin: 0.375rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.issue-card .issue-thumbs {
    display: flex;
    gap: 0.375rem;
    margin: 0.375rem 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.issue-card .issue-thumbs::-webkit-scrollbar { display: none; }

.issue-card .issue-thumbs img {
    width: 4rem;
    height: 3.25rem;
    object-fit: cover;
    border-radius: var(--radius);
    flex-shrink: 0;
    border: 1px solid var(--primary-200);
}

.issue-card .issue-location {
    font-size: 0.75rem;
    color: var(--primary-500);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin: 0.25rem 0;
}

.issue-card .issue-notice {
    font-size: 0.75rem;
    padding: 0.375rem 0.5rem;
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: var(--radius);
    color: #92400e;
    margin: 0.375rem 0;
}

.issue-card .card-footer {
    padding: 0.625rem 0.875rem;
    border-top: 1px solid var(--primary-100);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.375rem;
}

/* ---- Vote buttons (Fixed? Yes/No) ---- */
.vote-group {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8rem;
}

.vote-group .vote-label {
    font-weight: 600;
    color: var(--primary-600);
    font-size: 0.75rem;
}

.vote-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--primary-200);
    background: white;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    touch-action: manipulation;
    transition: all 0.15s;
    font-family: var(--font-sans);
}

.vote-btn:hover { border-color: var(--accent-violet); }

.action-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    touch-action: manipulation;
    border: none;
    text-decoration: none;
    line-height: 1.3;
}

.pill-violet { background: rgba(139,92,246,0.1); color: var(--accent-violet); }
.pill-blue { background: rgba(59,130,246,0.1); color: var(--accent-blue); }
.pill-green { background: rgba(34,197,94,0.1); color: #16a34a; }
.pill-amber { background: rgba(245,158,11,0.1); color: #b45309; }

/* ---- Category badge ---- */
.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.category-badge img {
    width: 1rem;
    height: 1rem;
    object-fit: contain;
}

/* ---- Status badges ---- */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 600;
}

.status-closed { background: #d1fae5; color: #065f46; }
.status-open { background: #dbeafe; color: #1e40af; }
.status-resolved { background: #d1fae5; color: #065f46; }

/* ---- Report form: map + address overlay ---- */
.report-map-wrap {
    position: relative;
    margin-bottom: 0.25rem;
}
.report-address-overlay {
    position: absolute;
    top: 3.75rem;
    left: 0.5rem;
    right: 0.5rem;
    z-index: 5;
    display: flex;
    gap: 0.375rem;
}
.report-address-overlay .form-input {
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    border: none;
    background: rgba(255,255,255,0.96);
}

/* ---- Category trigger button ---- */
.cat-trigger-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.7rem 0.875rem;
    border-radius: var(--radius);
    border: 2px solid var(--primary-200);
    background: white;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary-700);
    font-family: var(--font-sans);
    touch-action: manipulation;
    transition: border-color 0.15s;
}
.cat-trigger-btn:hover { border-color: var(--accent-violet); }
.cat-selected-pill {
    display: inline-block;
    padding: 0.2rem 0.625rem;
    border-radius: var(--radius-full);
    border: 2px solid;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ---- Category bottom sheet ---- */
.cat-sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 900;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}
.cat-sheet-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}
.cat-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 70vh;
    background: white;
    border-radius: 1rem 1rem 0 0;
    z-index: 901;
    padding: 0.5rem 1rem 1.5rem;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    box-shadow: 0 -4px 24px rgba(0,0,0,0.12);
    -webkit-overflow-scrolling: touch;
}
.cat-sheet.open {
    transform: translateY(0);
}
.cat-sheet-handle {
    width: 2.5rem;
    height: 0.25rem;
    background: var(--primary-300);
    border-radius: 9999px;
    margin: 0.25rem auto 0.75rem;
}

/* ---- Category grid inside sheet ---- */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}
.cat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    padding: 0.625rem 0.25rem;
    border-radius: var(--radius);
    border: 2px solid var(--primary-100);
    background: white;
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--primary-700);
    text-align: center;
    font-family: var(--font-sans);
    touch-action: manipulation;
    transition: all 0.15s;
    line-height: 1.2;
}
.cat-card img {
    width: 1.75rem;
    height: 1.75rem;
    object-fit: contain;
}
.cat-card:hover { border-color: var(--primary-300); }
.cat-card.selected { font-weight: 700; }

/* ---- Legacy category chips (kept for other pages) ---- */
.category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.category-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-full);
    border: 2px solid var(--primary-200);
    background: white;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--primary-700);
    touch-action: manipulation;
    transition: all 0.15s;
}

.category-chip img {
    width: 1.125rem;
    height: 1.125rem;
    object-fit: contain;
}

.category-chip:hover { border-color: var(--primary-400); }

.category-chip.selected {
    font-weight: 600;
}

/* ---- Forms ---- */
.form-group { margin-bottom: 1rem; }

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-700);
    margin-bottom: 0.375rem;
}

.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: 0.75rem 0.875rem;
    border: 1px solid var(--primary-300);
    border-radius: var(--radius);
    font-size: 1rem;
    background: white;
    transition: border-color 0.15s;
    font-family: var(--font-sans);
    color: var(--primary-800);
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
    outline: none;
    border-color: var(--accent-violet);
    box-shadow: 0 0 0 3px var(--accent-violet-light);
}

.form-textarea { resize: vertical; min-height: 80px; }
.form-hint { font-size: 0.75rem; color: var(--primary-500); margin-top: 0.25rem; }

/* ---- Map ---- */
.map-container {
    width: 100%;
    height: 280px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--primary-200);
    touch-action: none;
    margin-bottom: 0.75rem;
    background: var(--primary-100);
}

/* ---- What you can do (home) ---- */
.what-you-can-do {
    border: 1px solid var(--primary-200);
    background: rgba(248,250,252,0.5);
    border-radius: var(--radius-lg);
    padding: 0.875rem;
    margin-bottom: 1rem;
}

.what-you-can-do h2 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-800);
    margin-bottom: 0.5rem;
}

.what-you-can-do .wyd-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--primary-600);
    margin-bottom: 0.375rem;
}

.what-you-can-do .wyd-icon {
    flex-shrink: 0;
    font-size: 1rem;
    line-height: 1.2;
}

/* ---- Summary section (home) ---- */
.summary-section {
    border-left: 4px solid var(--accent-violet);
    border-radius: var(--radius-lg);
    border: 1px solid var(--primary-200);
    border-left: 4px solid var(--accent-violet);
    padding: 0.875rem;
    margin-bottom: 1rem;
    background: white;
}

/* ---- Summary: peek pill badges ---- */
.sum-peek-pill {
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.65rem;
}
.sum-peek-violet { background: #f3e8ff; color: var(--accent-violet); }
.sum-peek-green  { background: #d1fae5; color: #059669; }

/* ---- Summary: stat pill row ---- */
.sum-stat-row {
    display: flex;
    gap: 0.5rem;
}
.sum-stat-pill {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.5rem 0.5rem;
    border-radius: 0.75rem;
    background: var(--pill-bg);
    border: 1px solid color-mix(in srgb, var(--pill-color) 25%, transparent);
}
.sum-stat-icon { font-size: 0.85rem; flex-shrink: 0; }
.sum-stat-num  { font-size: 1rem; font-weight: 800; color: var(--pill-color); }
.sum-stat-label { font-size: 0.55rem; font-weight: 600; color: var(--pill-color); text-transform: uppercase; letter-spacing: 0.03em; line-height: 1.1; }

/* ---- Summary: section titles ---- */
.sum-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-500);
    margin-bottom: 0.375rem;
}

/* ---- Summary: hottest issues ---- */
.sum-hottest-list { display: flex; flex-direction: column; gap: 0.375rem; }
.sum-hot-card {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.625rem;
    border-radius: 0.625rem;
    background: white;
    border: 1px solid var(--primary-100);
    text-decoration: none;
    color: inherit;
    touch-action: manipulation;
    transition: background 0.15s;
}
.sum-hot-card:active { background: var(--primary-50); }
.sum-hot-icon { width: 1.5rem; height: 1.5rem; flex-shrink: 0; }
.sum-hot-info { flex: 1; min-width: 0; }
.sum-hot-title { font-size: 0.8rem; font-weight: 600; color: var(--primary-800); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sum-hot-meta { font-size: 0.65rem; color: var(--primary-400); }
.sum-hot-heat { font-size: 0.75rem; font-weight: 700; color: #d97706; flex-shrink: 0; }

/* ---- Summary: category chips ---- */
.sum-chip-wrap { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.sum-cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--primary-700);
    background: white;
    border: 1.5px solid var(--primary-200);
}
.sum-cat-chip img { width: 0.85rem; height: 0.85rem; }
.sum-cat-chip strong { color: var(--primary-500); font-weight: 700; font-size: 0.65rem; }

/* ---- Summary: stacked age bar ---- */
.sum-stacked-bar {
    display: flex;
    height: 0.625rem;
    border-radius: 999px;
    overflow: hidden;
    background: var(--primary-100);
}
.sum-bar-seg { height: 100%; transition: width 0.4s ease; min-width: 0; }
.sum-bar-legend {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

/* ---- Summary: action CTA ---- */
.sum-cta {
    margin-top: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.sum-cta-urgent { background: linear-gradient(135deg, #fef2f2, #fee2e2); border: 1px solid #fecaca; }
.sum-cta-good   { background: linear-gradient(135deg, #f0fdf4, #dcfce7); border: 1px solid #bbf7d0; }
.sum-cta-text   { flex: 1; font-size: 0.75rem; color: var(--primary-700); }
.sum-cta-urgent .sum-cta-text { color: #991b1b; }
.sum-cta-good .sum-cta-text   { color: #166534; }
.sum-cta-btn {
    flex-shrink: 0;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    touch-action: manipulation;
}
.sum-cta-urgent .sum-cta-btn { background: #dc2626; color: white; }
.sum-cta-good .sum-cta-btn   { background: #16a34a; color: white; }

/* ---- Summary bottom drawer ---- */
.summary-drawer {
    position: fixed;
    bottom: env(safe-area-inset-bottom, 0px);
    left: 0;
    right: 0;
    z-index: 90;
    background: #f3f1f5;
    border-radius: 1rem 1rem 0 0;
    box-shadow: 0 -2px 16px rgba(0,0,0,0.12);
    transition: max-height 0.35s cubic-bezier(0.4,0,0.2,1);
    max-height: 8rem;
    overflow: hidden;
    max-width: 36rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}
.summary-drawer.open {
    max-height: calc(100vh - 5.5rem - env(safe-area-inset-bottom, 0px));
}
.summary-drawer-handle {
    cursor: pointer;
    touch-action: manipulation;
    padding: 0.375rem 1rem 0.25rem;
}
.summary-drawer-grip {
    width: 2.5rem;
    height: 0.3rem;
    background: var(--primary-400);
    border-radius: 9999px;
    margin: 0 auto 0.375rem;
}
.summary-drawer-peek {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}
.summary-drawer-body {
    padding: 0 1rem 1.25rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    min-height: 0;
}

/* ---- Report hint label (between map and drawer peek) ---- */
.report-map-hint {
    position: fixed;
    bottom: calc(5rem + env(safe-area-inset-bottom, 0px) + 0.5rem);
    left: 0;
    right: 0;
    z-index: 91;
    text-align: center;
    pointer-events: none;
    animation: hintPulse 2s ease-in-out infinite;
}
.report-map-hint span {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    background: rgba(139,92,246,0.9);
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 2px 12px rgba(139,92,246,0.35);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
@keyframes hintPulse {
    0%, 100% { opacity: 1; transform: translateY(0); }
    50% { opacity: 0.8; transform: translateY(-3px); }
}

/* ---- Report bottom drawer ---- */
.report-drawer {
    position: fixed;
    bottom: env(safe-area-inset-bottom, 0px);
    left: 0;
    right: 0;
    z-index: 90;
    max-height: 5rem;
    background: #f3f1f5;
    border-radius: 1rem 1rem 0 0;
    box-shadow: 0 -2px 16px rgba(0,0,0,0.12);
    transition: max-height 0.35s cubic-bezier(0.4,0,0.2,1);
    overflow: hidden;
    max-width: 36rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}
.report-drawer.open {
    max-height: calc(100vh - 7.5rem - env(safe-area-inset-bottom, 0px));
}
.report-drawer-handle {
    cursor: pointer;
    touch-action: manipulation;
    padding: 0.375rem 1rem 0.25rem;
    flex-shrink: 0;
}
.report-drawer-peek {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}
.report-drawer-body {
    padding: 0 1rem 2.5rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    min-height: 0;
}

/* ---- Comments ---- */
.comment-rules {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: var(--radius);
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
    color: #92400e;
}

.comment-rules summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.comment-rules summary::-webkit-details-marker { display: none; }
.comment-rules summary::after { content: '▸'; font-size: 0.75rem; transition: transform 0.2s; }
.comment-rules[open] summary::after { transform: rotate(90deg); }
.comment-rules strong { font-size: 0.85rem; }

.comment {
    padding: 0.75rem;
    border-bottom: 1px solid var(--primary-100);
}

.comment:last-child { border-bottom: none; }

.comment-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.comment-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary-500);
    flex-shrink: 0;
    overflow: hidden;
}

.comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment-author { font-weight: 600; font-size: 0.8rem; color: var(--primary-700); }
.comment-time { font-size: 0.7rem; color: var(--primary-400); }
.comment-body { font-size: 0.85rem; color: var(--primary-700); line-height: 1.5; }

.comment-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.375rem;
}

.comment-vote-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary-400);
    font-size: 0.85rem;
    touch-action: manipulation;
    padding: 0.125rem;
}

.comment-vote-btn:hover { color: var(--accent-violet); }

/* ---- Share links (matches SocialShareLinks.tsx) ---- */
.share-links {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
}

.share-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
    color: white;
    touch-action: manipulation;
}

.share-link:hover { opacity: 0.9; text-decoration: none; color: white; }
.share-twitter { background: #1da1f2; }
.share-facebook { background: #1877f2; }
.share-linkedin { background: #0a66c2; }
.share-whatsapp { background: #25d366; }
.share-copy { background: var(--primary-600); }

/* ---- Auth page ---- */
.auth-container { max-width: 400px; margin: 2rem auto; padding: 0 1rem; }

.auth-tabs {
    display: flex;
    background: var(--primary-100);
    border-radius: var(--radius-full);
    padding: 0.25rem;
    margin-bottom: 1.25rem;
}

.auth-tab {
    flex: 1;
    padding: 0.5rem;
    text-align: center;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    color: var(--primary-500);
    border: none;
    font-family: var(--font-sans);
    touch-action: manipulation;
}

.auth-tab.active {
    background: white;
    color: var(--primary-900);
    box-shadow: var(--shadow);
}

.auth-divider {
    text-align: center;
    color: var(--primary-400);
    margin: 1rem 0;
    position: relative;
    font-size: 0.8rem;
}

.auth-divider::before, .auth-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 38%;
    height: 1px;
    background: var(--primary-200);
}
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--primary-300);
    border-radius: var(--radius-full);
    background: white;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
    color: var(--primary-700);
    font-family: var(--font-sans);
}

.google-btn:hover { background: var(--primary-50); text-decoration: none; }

.oauth-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border: 1px solid var(--primary-300);
    border-radius: var(--radius-full);
    background: white;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
    touch-action: manipulation;
}

.oauth-icon-btn:hover {
    background: var(--primary-50);
    box-shadow: var(--shadow);
    text-decoration: none;
}

.spinner-sm {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin-sm 0.6s linear infinite;
}
@keyframes spin-sm { to { transform: rotate(360deg); } }

#password-login-details summary { padding: 0.5rem; }
#password-login-details summary::-webkit-details-marker { display: none; }

/* FAB new-user tooltip */
.fab-tooltip {
    position: absolute;
    bottom: 4.25rem;
    right: 4.75rem;
    z-index: 51;
    background: linear-gradient(135deg, var(--accent-violet), var(--accent-pink));
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.45rem 0.85rem;
    border-radius: 0.6rem;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35);
    cursor: pointer;
    animation: fabTooltipPulse 2s ease-in-out infinite;
}
.fab-tooltip-arrow {
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 6px solid var(--accent-pink);
}
@keyframes fabTooltipPulse {
    0%, 100% { opacity: 1; transform: translateX(0); }
    50% { opacity: 0.85; transform: translateX(-3px); }
}

/* ---- Leaderboard ---- */
.leaderboard-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.875rem;
    border-bottom: 1px solid var(--primary-100);
}

.leaderboard-rank {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    background: var(--primary-100);
    color: var(--primary-500);
    flex-shrink: 0;
}

.leaderboard-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-violet-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--accent-violet);
    flex-shrink: 0;
    overflow: hidden;
}

.leaderboard-avatar img { width: 100%; height: 100%; object-fit: cover; }
.leaderboard-info { flex: 1; min-width: 0; }
.leaderboard-name { font-weight: 600; font-size: 0.875rem; color: var(--primary-800); display: flex; align-items: center; gap: 0.35rem; }
.leaderboard-location { font-size: 0.75rem; color: var(--accent-blue); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leaderboard-level { font-size: 0.7rem; color: #d97706; font-weight: 500; }
.leaderboard-points { font-weight: 700; color: #b45309; font-size: 1rem; }

.leaderboard-you {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-left: 3px solid var(--primary-500);
    border-radius: 0.5rem;
    margin: 0.25rem 0;
}
.leaderboard-you-badge {
    font-size: 0.6rem;
    font-weight: 700;
    background: var(--primary-500);
    color: #fff;
    padding: 0.05rem 0.35rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    flex-shrink: 0;
}

/* ---- Stats ---- */
.stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.625rem;
    margin-bottom: 0.75rem;
}

.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 0.75rem;
    text-align: center;
    border: 1px solid var(--primary-100);
}

.stat-value { font-size: 1.25rem; font-weight: 700; color: var(--accent-violet); }
.stat-label { font-size: 0.7rem; color: var(--primary-500); margin-top: 0.125rem; }

/* ---- Meetup ---- */
.meetup-card .meetup-date {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8rem;
    color: var(--accent-violet);
    font-weight: 600;
    margin-bottom: 0.375rem;
}

.meetup-card-green { border-left: 4px solid var(--accent-green); }

.attendee-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-top: 0.5rem;
}

.attendee-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    background: var(--primary-100);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
}

/* ---- Dashboard badges ---- */
.badge-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.badge-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.625rem;
    background: var(--primary-100);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
}

.badge-item.earned {
    background: #fef3c7;
    border: 1px solid #fcd34d;
}

/* ---- FAQ ---- */
.faq-item { margin-bottom: 1.25rem; }
.faq-question { font-weight: 600; font-size: 0.95rem; margin-bottom: 0.25rem; color: var(--primary-900); }
.faq-answer { color: var(--primary-600); font-size: 0.875rem; line-height: 1.6; }

.faq-flow {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1rem 0;
}

.faq-step {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.faq-step-num {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* ---- Grade stamp ---- */
.grade-stamp {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    border: 2px dashed var(--primary-400);
    background: rgba(255,255,255,0.95);
    color: var(--primary-700);
}

.grade-stamp.grade-bad {
    border-color: var(--danger);
    background: rgba(254,242,242,0.9);
    color: #b91c1c;
}

/* ---- Flash/Toast ---- */
.flash {
    padding: 0.625rem 0.875rem;
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    font-weight: 500;
}

.flash-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.flash-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.flash-info { background: var(--accent-violet-light); color: #5b21b6; border: 1px solid #c4b5fd; }

/* ---- Empty state ---- */
.empty-state {
    text-align: center;
    padding: 2.5rem 1rem;
    border: 2px dashed var(--primary-200);
    border-radius: var(--radius-lg);
    background: white;
}

.empty-state .empty-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
.empty-state h3 { color: var(--primary-600); margin-bottom: 0.375rem; font-size: 1rem; }
.empty-state p { color: var(--primary-400); font-size: 0.85rem; }

/* ---- Section titles ---- */
.page-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-900);
    margin: 1rem 0 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary-800);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

/* ---- Image gallery ---- */
.issue-images {
    display: flex;
    gap: 0.5rem;
    margin: 0.5rem 0;
    overflow-x: auto;
}

.issue-images img {
    max-height: 12rem;
    border-radius: var(--radius);
    flex-shrink: 0;
}

/* ---- Community photo overlays ---- */
.community-photo-wrap {
    position: relative;
    flex-shrink: 0;
}
.community-photo-wrap > img {
    max-height: 12rem;
    border-radius: var(--radius);
    display: block;
}
.community-photo-credit {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.375rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.55));
    border-radius: 0 0 var(--radius) var(--radius);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
}
.community-photo-avatar {
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
span.community-photo-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-300);
    font-size: 0.55rem;
    color: #fff;
}

/* ---- Photo upload ---- */
.photo-slots { display: flex; gap: 0.5rem; }

.photo-slot {
    width: 5rem;
    height: 5rem;
    border: 2px dashed var(--primary-300);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    font-size: 0.7rem;
    color: var(--primary-400);
    background: white;
}

.photo-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-slot .photo-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    cursor: pointer;
    border: none;
}


/* ---- Language option ---- */
.lang-option {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1rem;
    text-align: left;
    font-size: 0.9rem;
    border: none;
    background: none;
    cursor: pointer;
    touch-action: manipulation;
    color: var(--primary-800);
    font-family: var(--font-sans);
}

.lang-option:hover {
    background: var(--primary-50);
}

.lang-check {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent-violet);
}

/* ---- Utility ---- */
.text-center { text-align: center; }
.text-sm { font-size: 0.8rem; }
.text-xs { font-size: 0.7rem; }
.text-muted { color: var(--primary-500); }
.text-violet { color: var(--accent-violet); }
.text-green { color: var(--accent-green); }
.text-amber { color: #d97706; }
.text-danger { color: var(--danger); }
.font-bold { font-weight: 700; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 0.75rem; }
.mt-3 { margin-top: 1.25rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 0.75rem; }
.mb-3 { margin-bottom: 1.25rem; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-half { gap: 0.375rem; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 0.75rem; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ---- Small phones ---- */
@media (max-width: 374px) {
    .app-header { padding: 0.5rem 0.5rem; }
    .logo-brand { font-size: 0.95rem; }
    .logo-tagline { font-size: 0.39rem; }
    .header-nav { gap: 0.25rem; }
    .header-nav-item { padding: 0.125rem 0.25rem; }
    .header-nav-item svg { width: 16px; height: 16px; }
    .header-nav-item span { font-size: 0.5rem; }
}

/* ---- Tablet (768px+) ---- */
@media (min-width: 768px) {
    .container { max-width: 46rem; }
    .app-main { max-width: 46rem; padding: 0 1.5rem 1.5rem; }
    .map-container { height: 400px; }
    .app-header { padding: 0.75rem 1.5rem; }
    .logo-brand { font-size: 1.38rem; }
    .logo-tagline { font-size: 0.56rem; }
    .header-nav { gap: 0.5rem; }
    .header-nav-item { padding: 0.25rem 0.5rem; }
    .header-nav-item svg { width: 20px; height: 20px; }
    .header-nav-item span { font-size: 0.65rem; }
    .stat-grid { grid-template-columns: repeat(4, 1fr); }
    .card-body { padding: 1rem; }
    .issue-card { padding: 0.75rem; }

    .st-hero-main { gap: 3rem; }
    .st-ring { width: 8rem; height: 8rem; }
    .st-ring-inner { width: 6rem; height: 6rem; }
    .st-ring-num { font-size: 1.5rem; }
    .st-fix-value { font-size: 2.5rem; }
    .st-secondary { gap: 1.5rem; }
    .st-sec-num { font-size: 1.2rem; }
    .st-rankings-grid { grid-template-columns: 1fr 1fr; }

    .lb-podium { gap: 1rem; }
    .lb-podium-card { max-width: 9rem; }
    .lb-podium-avatar { border-width: 4px; }
    .lb-podium-name { max-width: 8rem; font-size: 0.8rem; }
    .lb-podium-pts { font-size: 0.85rem; }
    .lb-podium-stats { font-size: 0.75rem; gap: 0.4rem; }

    .db-hero-avatar { width: 4.5rem; height: 4.5rem; }
    .db-hero-name { font-size: 1.15rem; }
    .db-hero-pts-num { font-size: 1.75rem; }
    .db-badge-grid { gap: 0.5rem; }
    .db-photo-grid { grid-template-columns: repeat(4, 1fr); }

    .id-hero-img img { max-height: 22rem; }
    .id-thumb-item { width: 6.5rem; height: 6.5rem; }
    .id-stats-bar { gap: 0.5rem; }
    .id-stat { padding: 0.25rem 0.6rem; }
    .id-share-row { gap: 0.625rem; }
    .id-share-btn { padding: 0.5rem 0.75rem; font-size: 0.75rem; }

    .mt-stats-banner { padding: 1rem; }
    .mt-stat-num { font-size: 1.4rem; }
    .mt-rich-card { padding: 1rem; }

    /* Issues list: 2-column grid on tablet */
    #issues-open, #issues-closed { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
    .issue-card-wrap { margin-bottom: 0; }
    .issue-card-wrap .card { margin-bottom: 0; }
    .issue-card { height: 100%; }

    /* Leaderboard rows: 2 columns */
    .lb-rows-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }

    /* Meetup cards: 2 columns */
    .mt-cards-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
    .mt-rich-card { margin-bottom: 0; }

    /* Drawers: center & constrain width */
    .summary-drawer, .report-drawer { left: 50%; right: auto; transform: translateX(-50%); width: min(100%, 46rem); border-radius: 1rem 1rem 0 0; }
    #inline-report-drawer { left: 50%; right: auto; transform: translateX(-50%); width: min(100%, 46rem); }

    /* Home FAB: slightly larger on tablet */
    .report-map-hint { max-width: 44rem; margin-left: auto; margin-right: auto; }

    /* Comment section: wider */
    .comment-card { max-width: none; }

    /* Photo upload slots larger */
    .issue-thumbs img { width: 4rem; height: 4rem; }
}

/* ---- Laptop (1024px+) ---- */
@media (min-width: 1024px) {
    .container { max-width: 90%; }
    .app-main { max-width: 90%; padding: 0 2rem 2rem; }
    .app-header { padding: 0.75rem 2rem; }
    .header-nav { gap: 0.75rem; }
    .header-nav-item { flex-direction: row; gap: 0.25rem; padding: 0.375rem 0.625rem; }
    .header-nav-item svg { width: 18px; height: 18px; }
    .header-nav-item span { font-size: 0.75rem; }
    .stat-grid { grid-template-columns: repeat(4, 1fr); gap: 0.75rem; }
    .stat-card { padding: 1rem; }
    .stat-value { font-size: 1.5rem; }

    .st-hero { padding: 1.25rem 1.5rem; }
    .st-ring { width: 9rem; height: 9rem; }
    .st-ring-inner { width: 6.75rem; height: 6.75rem; }
    .st-ring-num { font-size: 1.75rem; }
    .st-stacked-bar { height: 2rem; font-size: 0.7rem; }
    .st-cat-left { min-width: 10rem; }
    .st-cat-bar-wrap { height: 8px; }

    .lb-user-card { padding: 1rem 1.25rem; }
    .lb-podium-card { max-width: 10rem; }

    .db-hero { padding: 1.25rem 1.5rem; }
    .db-quick-stats { padding-top: 0.75rem; }
    .db-qs-num { font-size: 1.15rem; }
    .db-section-card { padding: 1rem; }
    .db-photo-grid { grid-template-columns: repeat(5, 1fr); gap: 0.5rem; }

    .id-meta-row { font-size: 0.8rem; gap: 0.375rem 0.5rem; }
    .id-stats-bar { gap: 0.625rem; }
    .id-stat { padding: 0.3rem 0.75rem; }
    .id-stat-num { font-size: 0.8rem; }
    .id-stat-label { font-size: 0.6rem; }
    #issue-map { height: 240px !important; }

    .md-hero-banner { padding: 1rem 1.25rem; }
    .md-hero-title { font-size: 1.3rem; }
    .md-info-card { padding: 0.5rem 0; }
    .md-info-row { padding: 0.625rem 1rem; }
    .md-avatar-circle { width: 2.25rem; height: 2.25rem; }
    #meetup-detail-map { height: 260px !important; }

    .mt-rich-card { padding: 1rem 1.25rem; }

    /* Issues: still 2 columns but wider cards */
    #issues-open, #issues-closed { gap: 1rem; }

    /* Meetup cards: 2 columns with more room */
    .mt-cards-grid { gap: 1rem; }

    /* Drawers: match content width */
    .summary-drawer, .report-drawer { width: 90%; }
    #inline-report-drawer { width: 90%; }
    .report-map-hint { max-width: 56rem; }

    /* Leaderboard rows: still 2 col */
    .lb-rows-grid { gap: 1rem; }

    /* Comment form wider */
    .comment-form { max-width: 40rem; }
}

/* ---- Desktop (1280px+) ---- */
@media (min-width: 1280px) {
    .container { max-width: 90%; }
    .app-main { max-width: 90%; }
    .app-header { padding: 0.75rem 2.5rem; }
    .header-nav { gap: 1rem; }
    .header-nav-item span { font-size: 0.8rem; }

    .stat-grid { grid-template-columns: repeat(4, 1fr); gap: 1rem; }
    .stat-card { padding: 1.25rem; }
    .stat-value { font-size: 1.75rem; }

    .st-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding: 1.5rem 2rem; }
    .st-hero-main { margin-bottom: 0; }
    .st-secondary { border-top: none; border-left: 1px solid rgba(139,92,246,0.15); padding-top: 0; padding-left: 1rem; flex-direction: column; gap: 0.75rem; align-items: flex-start; }
    .st-sec-item { text-align: left; display: flex; align-items: center; gap: 0.5rem; }
    .st-sec-num { font-size: 1.25rem; }
    .st-sec-label { font-size: 0.6rem; }

    .lb-podium { gap: 1.5rem; }
    .lb-podium-card { max-width: 12rem; }
    .lb-podium-avatar { border-width: 4px; }
    .lb-podium-name { max-width: 10rem; font-size: 0.85rem; }

    .db-hero { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 0.5rem 1.5rem; }
    .db-hero-top { grid-column: 1; }
    .db-hero-progress { grid-column: 1; }
    .db-quick-stats { grid-column: 1 / -1; border-top: 1px solid rgba(139,92,246,0.15); }
    .db-photo-grid { grid-template-columns: repeat(6, 1fr); }

    .id-hero-img img { max-height: 28rem; }
    .id-thumb-item { width: 8rem; height: 8rem; }
    #issue-map { height: 300px !important; }
    #meetup-detail-map { height: 300px !important; }

    /* Issues: 3-column grid on desktop */
    #issues-open, #issues-closed { grid-template-columns: repeat(3, 1fr); gap: 1rem; }

    /* Meetup cards: 3 columns */
    .mt-cards-grid { grid-template-columns: repeat(3, 1fr); gap: 1rem; }

    /* Leaderboard rows: 3 columns */
    .lb-rows-grid { grid-template-columns: repeat(3, 1fr); gap: 1rem; }

    /* Drawers: match content width */
    .summary-drawer, .report-drawer { width: 90%; }
    #inline-report-drawer { width: 90%; }
    .report-map-hint { max-width: 64rem; }

    /* Badge grid: 5 columns */
    .db-badge-grid { grid-template-columns: repeat(6, 1fr); }
}

/* ---- Wide desktop (1536px+) ---- */
@media (min-width: 1536px) {
    .container { max-width: 92%; }
    .app-main { max-width: 92%; }
    .app-header { padding: 0.75rem 3rem; }
}

/* =============================================================
   LEADERBOARD — podium, user card, level badges, activity stats
   ============================================================= */

/* User rank + progress card */
.lb-user-card {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #fbbf24;
    border-radius: 1rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.25rem 0.5rem;
}
.lb-user-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.lb-user-rank {
    font-size: 1.1rem;
    font-weight: 800;
    color: #b45309;
    min-width: 2.25rem;
    text-align: center;
}
.lb-user-right {
    text-align: right;
    align-self: center;
}
.lb-user-progress-wrap {
    grid-column: 1 / -1;
    margin-top: 0.25rem;
}
.lb-progress-bar {
    height: 6px;
    background: rgba(251,191,36,0.2);
    border-radius: 3px;
    overflow: hidden;
}
.lb-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #d97706);
    border-radius: 3px;
    transition: width 0.6s ease;
}
.lb-progress-text {
    font-size: 0.6rem;
    color: #92400e;
    margin-top: 0.2rem;
}

/* Colored level badge pills */
.level-badge {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 9999px;
    background: var(--lb-bg, #f1f5f9);
    color: var(--lb-text, #64748b);
    border: 1px solid var(--lb-border, #94a3b8);
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.level-badge-sm {
    font-size: 0.5rem;
    padding: 0.1rem 0.35rem;
}

/* Activity micro-stats in leaderboard rows */
.lb-activity-stat {
    font-size: 0.8rem;
    color: var(--primary-400);
}

/* Top 3 podium */
.lb-podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-top: 0.5rem;
}
.lb-podium-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    max-width: 7rem;
    position: relative;
}
.lb-podium-you {
    filter: drop-shadow(0 0 6px rgba(251,191,36,0.5));
}
.lb-podium-medal {
    font-size: 1.25rem;
    margin-bottom: 0.15rem;
}
.lb-podium-avatar {
    border-radius: 50%;
    overflow: hidden;
    background: var(--primary-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--primary-500);
    font-size: 1rem;
    border: 3px solid #fbbf24;
    margin-bottom: 0.25rem;
}
.lb-podium-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.lb-podium-name {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary-700);
    text-align: center;
    max-width: 6rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 0.15rem;
}
.lb-podium-pts {
    font-size: 0.7rem;
    font-weight: 800;
    color: #b45309;
    margin-bottom: 0.15rem;
}
.lb-podium-stats {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    color: var(--primary-400);
    margin-bottom: 0.3rem;
    flex-wrap: wrap;
    justify-content: center;
}
.lb-podium-pedestal {
    width: 100%;
    border-radius: 0.5rem 0.5rem 0 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 0.5rem;
}
.lb-podium-card:nth-child(1) .lb-podium-pedestal { background: linear-gradient(180deg, #e5e7eb 0%, #d1d5db 100%); }
.lb-podium-card:nth-child(2) .lb-podium-pedestal { background: linear-gradient(180deg, #fef3c7 0%, #fbbf24 100%); }
.lb-podium-card:nth-child(3) .lb-podium-pedestal { background: linear-gradient(180deg, #ffedd5 0%, #f97316 40%, #ea580c 100%); }
.lb-pedestal-rank {
    font-size: 1.1rem;
    font-weight: 800;
    color: rgba(255,255,255,0.9);
    text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

/* =============================================================
   MEETUPS — stats banner, rich cards, impact
   ============================================================= */

.mt-stats-banner {
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid rgba(34,197,94,0.25);
    border-radius: 1rem;
    padding: 0.75rem 0.5rem;
    margin-bottom: 1rem;
}
.mt-stat-item { text-align: center; }
.mt-stat-num {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary-800);
    line-height: 1.1;
}
.mt-stat-label {
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary-400);
    font-weight: 600;
}
.mt-stat-divider {
    width: 1px;
    height: 2rem;
    background: rgba(34,197,94,0.2);
}

.mt-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* Rich meetup card */
.mt-rich-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: var(--card-bg);
    border-radius: 0.75rem;
    padding: 0.75rem;
    margin-bottom: 0.625rem;
    border: 1px solid var(--primary-200);
    transition: box-shadow 0.15s;
}
.mt-rich-card:active {
    box-shadow: 0 0 0 2px var(--accent-green);
}
.mt-rich-card-upcoming {
    border-left: 4px solid var(--accent-green);
}
.mt-rich-card-past {
    border-left: 4px solid var(--primary-300);
    opacity: 0.85;
}
.mt-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.35rem;
}
.mt-card-countdown {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--accent-green);
    background: rgba(34,197,94,0.1);
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
}
.mt-countdown-soon {
    color: #dc2626;
    background: rgba(220,38,38,0.1);
    animation: pulse-soft 2s infinite;
}
@keyframes pulse-soft {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}
.mt-card-type {
    font-size: 0.6rem;
    color: var(--primary-400);
    font-weight: 600;
}
.mt-card-title {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
    color: var(--primary-800);
}
.mt-card-issue {
    font-size: 0.65rem;
    color: var(--primary-500);
    margin-bottom: 0.3rem;
}
.mt-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.65rem;
    color: var(--primary-500);
    margin-bottom: 0.3rem;
}
.mt-card-bring {
    font-size: 0.6rem;
    color: var(--primary-400);
    margin-bottom: 0.3rem;
}
.mt-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.35rem;
}

/* Avatar stack */
.mt-card-avatars {
    display: flex;
    align-items: center;
}
.mt-card-avatar-img,
.mt-card-avatar-placeholder {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    border: 2px solid var(--card-bg);
    margin-left: -0.4rem;
    object-fit: cover;
}
.mt-card-avatar-img:first-child,
.mt-card-avatar-placeholder:first-child {
    margin-left: 0;
}
.mt-card-avatar-placeholder {
    background: var(--primary-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.55rem;
    font-weight: 700;
    color: var(--primary-500);
}

/* Capacity */
.mt-card-capacity-wrap { text-align: right; }
.mt-card-going {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--accent-green);
}
.mt-card-full { color: #dc2626; }
.mt-card-capacity-bar {
    width: 4rem;
    height: 4px;
    background: var(--primary-200);
    border-radius: 2px;
    margin-top: 0.15rem;
    overflow: hidden;
}
.mt-card-capacity-fill {
    height: 100%;
    background: var(--accent-green);
    border-radius: 2px;
    transition: width 0.3s;
}
.mt-capacity-full { background: #dc2626; }

.mt-card-organizer {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.6rem;
    color: var(--primary-400);
    margin-top: 0.35rem;
}
.mt-organizer-avatar {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    object-fit: cover;
}

/* Past card date */
.mt-card-date-past {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--primary-400);
}
.mt-resolved-badge {
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent-green);
    background: rgba(34,197,94,0.1);
    padding: 0.1rem 0.4rem;
    border-radius: 9999px;
}

/* Impact banner */
.mt-impact-banner {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.7rem;
    color: var(--primary-500);
    background: var(--primary-50);
    border-radius: 0.75rem;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
}
.mt-impact-item strong {
    font-weight: 800;
    color: var(--primary-700);
}

/* =============================================================
   ISSUE DETAIL — status banner, metadata, stats, gallery, share
   ============================================================= */

.id-status-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.75rem;
    border-radius: 0.75rem;
    background: var(--primary-50);
    border: 1px solid var(--primary-200);
    border-left: 4px solid var(--primary-400);
    margin-bottom: 0.5rem;
}
.id-banner-left {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}
.id-banner-icon {
    width: 1.25rem;
    height: 1.25rem;
}
.id-banner-cat {
    font-weight: 700;
    font-size: 0.8rem;
}
.id-banner-right {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}
.id-status-pill {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    letter-spacing: 0.03em;
}
.id-status-open {
    background: rgba(59,130,246,0.1);
    color: #2563eb;
}
.id-status-closed {
    background: rgba(34,197,94,0.15);
    color: #059669;
}
.id-status-urgent {
    background: rgba(245,158,11,0.15);
    color: #b45309;
    animation: pulse-soft 2s infinite;
}
.id-duration-badge {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--primary-400);
    background: var(--primary-100);
    padding: 0.1rem 0.35rem;
    border-radius: 0.25rem;
}

.id-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-900);
    margin-bottom: 0.375rem;
    line-height: 1.3;
}

.id-description {
    color: var(--primary-700);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

/* Compact metadata row */
.id-meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem 0.375rem;
    font-size: 0.75rem;
    color: var(--primary-500);
    margin-bottom: 0.5rem;
    padding: 0.5rem 0;
    border-top: 1px solid var(--primary-100);
    border-bottom: 1px solid var(--primary-100);
}
.id-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
.id-meta-avatar {
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    object-fit: cover;
}
.id-meta-avatar-placeholder {
    background: var(--primary-200);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.5rem;
    font-weight: 700;
    color: var(--primary-500);
}
.id-meta-sep {
    color: var(--primary-300);
}
.id-meta-location {
    max-width: 12rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Activity stats bar */
.id-stats-bar {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0;
    margin-bottom: 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.id-stat {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    background: var(--primary-50);
    border: 1px solid var(--primary-150, var(--primary-200));
    border-radius: 9999px;
    padding: 0.2rem 0.5rem;
    white-space: nowrap;
    flex-shrink: 0;
}
.id-stat-icon {
    font-size: 0.7rem;
}
.id-stat-num {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary-700);
}
.id-stat-label {
    font-size: 0.55rem;
    color: var(--primary-400);
    text-transform: uppercase;
}

/* Photo gallery */
.id-hero-img {
    position: relative;
    width: 100%;
    border-radius: 0.75rem;
    overflow: hidden;
    margin-bottom: 0.375rem;
}
.id-hero-img img {
    width: 100%;
    height: auto;
    max-height: 16rem;
    object-fit: cover;
    display: block;
    border-radius: 0.75rem;
}
.id-thumb-row {
    display: flex;
    gap: 0.375rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.25rem;
}
.id-thumb-item {
    position: relative;
    flex-shrink: 0;
    width: 5rem;
    height: 5rem;
    border-radius: 0.5rem;
    overflow: hidden;
}
.id-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.id-thumb-item .community-photo-credit {
    bottom: 0;
    font-size: 0.5rem;
    padding: 0.15rem 0.25rem;
}
.id-thumb-more {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 0.5rem;
}

/* Vote card */
.id-vote-card {
    background: var(--card-bg);
    border: 1px solid var(--primary-200);
    border-radius: 0.75rem;
    padding: 0.75rem;
    margin-top: 0.5rem;
}
.id-vote-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary-800);
}
.id-resolved-banner {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: #059669;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.25rem 0;
}
.id-autoclose-notice {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: var(--radius);
    font-size: 0.8rem;
    color: #92400e;
}

/* Meetup CTA */
.id-meetup-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    text-decoration: none;
    color: inherit;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #93c5fd;
    border-radius: 0.75rem;
    padding: 0.75rem;
    margin-top: 0.5rem;
    transition: box-shadow 0.15s;
}
.id-meetup-cta:active {
    box-shadow: 0 0 0 2px #3b82f6;
}
.id-meetup-cta-create {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: #86efac;
}
.id-meetup-cta-create:active {
    box-shadow: 0 0 0 2px var(--accent-green);
}
.id-meetup-cta-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}
.id-meetup-cta-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}
.id-meetup-cta-title {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--primary-800);
}
.id-meetup-cta-meta {
    font-size: 0.65rem;
    color: var(--primary-500);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}
.id-meetup-cta-countdown {
    font-size: 0.7rem;
    font-weight: 700;
    color: #2563eb;
    background: rgba(59,130,246,0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 9999px;
    flex-shrink: 0;
}

/* Share icon buttons */
.id-share-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.id-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.65rem;
    border-radius: 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--primary-200);
    background: var(--card-bg);
    color: var(--primary-600);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.id-share-btn:active {
    background: var(--primary-100);
}
.id-share-x { color: #000; }
.id-share-fb { color: #1877f2; }
.id-share-wa { color: #25d366; }
.id-share-copy { color: var(--primary-500); }

/* =============================================================
   MEETUP DETAIL — hero banner, info card, attendees, linked issue
   ============================================================= */

.md-hero-banner {
    border-radius: 0.75rem;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
}
.md-hero-upcoming {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid rgba(34,197,94,0.25);
}
.md-hero-past {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid var(--primary-200);
}
.md-hero-cancelled {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 1px solid #fca5a5;
}
.md-hero-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.35rem;
}
.md-type-badge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
}
.md-type-fix {
    background: rgba(22,163,74,0.1);
    color: #16a34a;
}
.md-type-protest {
    background: rgba(220,38,38,0.1);
    color: #dc2626;
}
.md-hero-status {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
}
.md-status-countdown {
    background: rgba(34,197,94,0.1);
    color: var(--accent-green);
}
.md-status-soon {
    background: rgba(220,38,38,0.1);
    color: #dc2626;
    animation: pulse-soft 2s infinite;
}
.md-status-past {
    background: var(--primary-200);
    color: var(--primary-500);
}
.md-status-cancelled {
    background: rgba(220,38,38,0.15);
    color: #dc2626;
    text-decoration: line-through;
}
.md-hero-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-900);
    margin: 0 0 0.25rem;
}
.md-hero-bottom {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    color: var(--primary-500);
    flex-wrap: wrap;
}
.md-hero-sep { color: var(--primary-300); }

/* Key info card */
.md-info-card {
    background: var(--card-bg);
    border: 1px solid var(--primary-200);
    border-radius: 0.75rem;
    padding: 0.5rem 0;
    margin-bottom: 0.5rem;
}
.md-info-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--primary-100);
}
.md-info-row:last-child {
    border-bottom: none;
}
.md-info-icon {
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}
.md-info-label {
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-400);
    font-weight: 600;
}
.md-info-value {
    font-size: 0.8rem;
    color: var(--primary-700);
    font-weight: 500;
}
.md-map-link {
    font-size: 0.65rem;
    color: var(--accent-blue);
    margin-left: 0.25rem;
}
.md-organizer-img {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    object-fit: cover;
}

/* Linked issue card */
.md-linked-issue {
    display: block;
    text-decoration: none;
    color: inherit;
    background: var(--card-bg);
    border: 1px solid var(--primary-200);
    border-left: 4px solid var(--primary-400);
    border-radius: 0.75rem;
    padding: 0.6rem 0.75rem;
    margin-top: 0.5rem;
    transition: box-shadow 0.15s;
}
.md-linked-issue:active {
    box-shadow: 0 0 0 2px var(--accent-violet);
}
.md-linked-issue-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}
.md-linked-issue-label {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--primary-400);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.md-linked-issue-body {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
}
.md-linked-issue-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}
.md-linked-issue-title {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--primary-800);
    line-height: 1.3;
}
.md-linked-issue-meta {
    font-size: 0.65rem;
    color: var(--primary-400);
    margin-top: 0.1rem;
}

/* Attendee section */
.md-attendee-section {
    background: var(--card-bg);
    border: 1px solid var(--primary-200);
    border-radius: 0.75rem;
    padding: 0.75rem;
    margin-top: 0.75rem;
}
.md-attendee-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}
.md-attendee-count {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-green);
}

/* Capacity bar */
.md-capacity-bar-wrap {
    margin-bottom: 0.5rem;
}
.md-capacity-bar {
    height: 6px;
    background: var(--primary-200);
    border-radius: 3px;
    overflow: hidden;
}
.md-capacity-fill {
    height: 100%;
    background: var(--accent-green);
    border-radius: 3px;
    transition: width 0.4s;
}
.md-capacity-full-bar {
    background: #dc2626;
}
.md-capacity-text {
    font-size: 0.6rem;
    color: var(--primary-400);
    margin-top: 0.15rem;
}

/* Avatar stack */
.md-avatar-stack {
    display: flex;
    align-items: center;
    margin-bottom: 0.25rem;
}
.md-avatar-circle {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: 2px solid var(--card-bg);
    margin-left: -0.5rem;
    object-fit: cover;
}
.md-avatar-circle:first-child {
    margin-left: 0;
}
.md-avatar-placeholder {
    background: var(--primary-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--primary-500);
}

/* Attendee list */
.md-attendee-list {
    margin-top: 0.75rem;
    border-top: 1px solid var(--primary-100);
    padding-top: 0.5rem;
}
.md-attendee-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0;
}
.md-attendee-row + .md-attendee-row {
    border-top: 1px solid var(--primary-50);
}
.md-attendee-avatar {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.md-attendee-avatar-ph {
    background: var(--primary-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.55rem;
    font-weight: 700;
    color: var(--primary-500);
}
.md-attendee-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.md-attendee-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-700);
}
.md-attendee-bringing {
    font-size: 0.65rem;
    color: var(--primary-400);
}

/* =============================================================
   STATS PAGE — hero, ring, bars, rankings, categories, locations
   ============================================================= */

/* Filter bar */
.st-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.st-filter-select {
    flex: 1;
    min-width: 0;
    padding: 0.5rem 0.625rem;
    border: 1px solid var(--primary-300);
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-family: var(--font-sans);
    color: var(--primary-700);
    background: white;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    padding-right: 1.75rem;
}
.st-filter-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.st-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-violet);
    background: color-mix(in srgb, var(--accent-violet) 8%, transparent);
    padding: 0.3rem 0.6rem;
    border-radius: 9999px;
    margin-bottom: 0.75rem;
}
.st-chip-dismiss {
    color: var(--primary-400);
    text-decoration: none;
    font-size: 0.7rem;
    padding: 0 0.15rem;
}
.st-chip-dismiss:hover { color: var(--primary-600); }

/* Hero scorecard */
.st-hero {
    background: linear-gradient(135deg, var(--accent-violet-light) 0%, color-mix(in srgb, var(--accent-violet-light) 60%, white) 100%);
    border: 1px solid color-mix(in srgb, var(--accent-violet) 20%, transparent);
    border-radius: 1rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
}
.st-hero-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 0.75rem;
}

/* Resolution ring (CSS conic-gradient) */
.st-ring-wrap {
    flex-shrink: 0;
}
.st-ring {
    width: 6.5rem;
    height: 6.5rem;
    border-radius: 50%;
    background: conic-gradient(
        #059669 0deg,
        #059669 calc(var(--ring-pct) * 3.6deg),
        #e2e8f0 calc(var(--ring-pct) * 3.6deg),
        #e2e8f0 360deg
    );
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.st-ring-inner {
    width: 4.75rem;
    height: 4.75rem;
    border-radius: 50%;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.st-ring-num {
    font-size: 1.25rem;
    font-weight: 800;
    color: #059669;
    line-height: 1;
}
.st-ring-label {
    font-size: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-400);
    font-weight: 600;
}

/* Avg fix time */
.st-fix-wrap {
    text-align: center;
}
.st-fix-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}
.st-fix-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-400);
    font-weight: 600;
    margin-top: 0.15rem;
}
.st-fix-hint {
    font-size: 0.6rem;
    color: var(--primary-400);
    margin-top: 0.25rem;
    font-style: italic;
}

/* Secondary stats row */
.st-secondary {
    display: flex;
    justify-content: space-around;
    border-top: 1px solid color-mix(in srgb, var(--accent-violet) 15%, transparent);
    padding-top: 0.625rem;
}
.st-sec-item { text-align: center; }
.st-sec-num {
    font-size: 1rem;
    font-weight: 800;
    color: var(--primary-800);
    line-height: 1.1;
}
.st-sec-label {
    font-size: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-400);
    font-weight: 600;
}

/* Open vs Resolved bar */
.st-bar-section {
    margin-bottom: 0.75rem;
}
.st-bar-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    margin-bottom: 0.25rem;
}
.st-stacked-bar {
    display: flex;
    height: 1.5rem;
    border-radius: 0.75rem;
    overflow: hidden;
    font-size: 0.6rem;
    font-weight: 700;
    color: white;
}
.st-bar-open {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
}
.st-bar-resolved {
    background: linear-gradient(90deg, #22c55e, #16a34a);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
}

/* Engagement score */
.st-engagement {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--card-bg);
    border: 1px solid var(--primary-200);
    border-left: 4px solid var(--primary-400);
    border-radius: 0.75rem;
    padding: 0.6rem 0.75rem;
    margin-bottom: 0.75rem;
}
.st-eng-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.st-eng-badge {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.2rem 0.5rem;
    border-radius: 9999px;
    letter-spacing: 0.03em;
}
.st-eng-text {
    font-size: 0.75rem;
    color: var(--primary-500);
    font-weight: 500;
}
.st-eng-score {
    font-size: 1.1rem;
    font-weight: 800;
}

/* Rankings grid */
.st-rankings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
@media (max-width: 480px) {
    .st-rankings-grid { grid-template-columns: 1fr; }
}
.st-rank-card {
    background: var(--card-bg);
    border: 1px solid var(--primary-200);
    border-radius: 0.75rem;
    overflow: hidden;
}
.st-rank-header {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.625rem;
    font-size: 1rem;
}
.st-rank-best {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border-bottom: 1px solid rgba(34,197,94,0.15);
}
.st-rank-alert {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border-bottom: 1px solid rgba(220,38,38,0.15);
}
.st-rank-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-800);
}
.st-rank-subtitle {
    font-size: 0.55rem;
    color: var(--primary-400);
}
.st-rank-row {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.4rem 0.625rem;
    border-bottom: 1px solid var(--primary-50);
}
.st-rank-row:last-child { border-bottom: none; }
.st-rank-num {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary-300);
    min-width: 1rem;
    text-align: center;
}
.st-rank-info {
    flex: 1;
    min-width: 0;
}
.st-rank-loc {
    font-size: 0.72rem;
    color: var(--primary-700);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}
.st-rank-bar-wrap {
    height: 3px;
    background: var(--primary-100);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 0.15rem;
}
.st-rank-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.4s;
}
.st-grade-badge {
    font-size: 0.55rem;
    font-weight: 800;
    padding: 0.1rem 0.35rem;
    border-radius: 0.25rem;
    flex-shrink: 0;
}
.st-rank-pct {
    font-size: 0.65rem;
    font-weight: 700;
    flex-shrink: 0;
    min-width: 2.5rem;
    text-align: right;
}

/* Section cards */
.st-section-card {
    background: var(--card-bg);
    border: 1px solid var(--primary-200);
    border-radius: 0.75rem;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
}
.st-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-800);
    margin-bottom: 0.5rem;
}

/* Category rows */
.st-cat-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--primary-50);
}
.st-cat-row:last-child { border-bottom: none; }
.st-cat-left {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    min-width: 6.5rem;
    flex-shrink: 0;
}
.st-cat-icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}
.st-cat-name {
    font-size: 0.72rem;
    color: var(--primary-700);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.st-cat-bar-wrap {
    flex: 1;
    height: 6px;
    background: var(--primary-100);
    border-radius: 3px;
    overflow: hidden;
}
.st-cat-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s;
}
.st-cat-right {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
    min-width: 3rem;
    justify-content: flex-end;
}
.st-cat-count {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-600);
}
.st-cat-pct {
    font-size: 0.55rem;
    color: var(--primary-400);
}

/* Location rows */
.st-loc-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--primary-50);
    text-decoration: none;
    color: inherit;
    transition: background 0.1s;
}
.st-loc-row:last-child { border-bottom: none; }
.st-loc-row:active { background: var(--primary-50); border-radius: 0.375rem; }
.st-loc-rank {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary-300);
    min-width: 1.25rem;
    text-align: center;
}
.st-loc-info {
    flex: 1;
    min-width: 0;
}
.st-loc-name {
    font-size: 0.78rem;
    color: var(--primary-700);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.st-loc-bar-wrap {
    height: 3px;
    background: var(--primary-100);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 0.15rem;
}
.st-loc-bar-fill {
    height: 100%;
    background: var(--accent-violet);
    border-radius: 2px;
    transition: width 0.3s;
}
.st-loc-count {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-violet);
    flex-shrink: 0;
}

/* ---------- Fade-slide entrance animation ---------- */
@keyframes stFadeSlideUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.st-anim {
    opacity: 0;
    transform: translateY(12px);
}
.st-anim.st-visible {
    animation: stFadeSlideUp 0.45s ease-out forwards;
}

/* ---------- Impact headline ---------- */
.st-impact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--accent-violet-light) 0%, rgba(255,255,255,0.6) 100%);
    border: 1px solid color-mix(in srgb, var(--accent-violet) 18%, transparent);
    border-radius: 0.75rem;
    padding: 0.6rem 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
    color: var(--primary-700);
    line-height: 1.4;
}
.st-impact-icon { font-size: 1.1rem; flex-shrink: 0; }
.st-impact-text strong {
    color: var(--accent-violet-dark);
    font-weight: 800;
}

/* ---------- Weekly activity pulse ---------- */
.st-pulse {
    background: var(--card-bg);
    border: 1px solid var(--primary-200);
    border-radius: 0.75rem;
    padding: 0.625rem 0.75rem;
    margin-bottom: 0.75rem;
}
.st-pulse-title {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary-400);
    margin-bottom: 0.5rem;
}
.st-pulse-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}
.st-pulse-item {
    text-align: center;
    padding: 0.375rem 0;
    border-radius: 0.5rem;
    background: var(--primary-50);
    transition: transform 0.15s;
}
.st-pulse-item:hover { transform: translateY(-2px); }
.st-pulse-icon { font-size: 0.9rem; display: block; margin-bottom: 0.15rem; }
.st-pulse-num {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary-800);
    line-height: 1;
}
.st-pulse-label {
    font-size: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--primary-400);
    font-weight: 600;
    margin-top: 0.1rem;
}
.st-pulse-delta {
    font-size: 0.6rem;
    font-weight: 700;
    margin-top: 0.15rem;
}
@media (max-width: 420px) {
    .st-pulse-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Recently resolved showcase ---------- */
.st-resolved-scroll {
    display: flex;
    gap: 0.625rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.25rem;
}
.st-resolved-scroll::-webkit-scrollbar { display: none; }
.st-resolved-card {
    flex: 0 0 min(72%, 14rem);
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.625rem;
    background: var(--primary-50);
    border-radius: 0.625rem;
    border-top: 3px solid var(--accent-violet);
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s, box-shadow 0.15s;
}
.st-resolved-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.st-resolved-cat {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
}
.st-resolved-cat-label {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--primary-500);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.st-resolved-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-800);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}
.st-resolved-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.65rem;
    color: var(--primary-400);
    font-weight: 500;
}

/* ---------- Top contributors ---------- */
.st-contrib-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--primary-100);
    transition: background 0.1s;
}
.st-contrib-row:last-child { border-bottom: none; }
.st-contrib-row:hover { background: var(--primary-50); border-radius: 0.375rem; }
.st-contrib-rank {
    width: 1.2rem;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--primary-400);
    text-align: center;
    flex-shrink: 0;
}
.st-contrib-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--primary-200);
}
.st-contrib-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-violet-light);
    color: var(--accent-violet-dark);
    font-size: 0.75rem;
    font-weight: 700;
}
.st-contrib-info { flex: 1; min-width: 0; }
.st-contrib-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.st-contrib-stats {
    font-size: 0.65rem;
    color: var(--primary-400);
    font-weight: 500;
}
.st-contrib-points {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent-violet);
    flex-shrink: 0;
    background: var(--accent-violet-light);
    padding: 0.15rem 0.4rem;
    border-radius: 9999px;
}

/* ---------- Hover lift on existing rows ---------- */
.st-rank-row:hover { background: var(--primary-50); border-radius: 0.375rem; }
.st-cat-row:hover { background: var(--primary-50); border-radius: 0.375rem; }

/* =============================================================
   DASHBOARD — hero, badges, timeline, issues, meetups, comments
   ============================================================= */

/* Profile hero */
.db-hero {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 50%, #e0e7ff 100%);
    border: 1px solid rgba(139,92,246,0.2);
    border-radius: 1rem;
    padding: 1rem;
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
}
.db-hero-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}
.db-hero-avatar {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #8b5cf6;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-200);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-500);
}
.db-hero-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.db-hero-info {
    flex: 1;
    min-width: 0;
}
.db-hero-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-900);
    margin-bottom: 0.15rem;
}
.db-hero-location {
    font-size: 0.65rem;
    color: var(--primary-400);
    margin-top: 0.15rem;
}
.db-hero-points {
    text-align: right;
    flex-shrink: 0;
}
.db-hero-pts-num {
    font-size: 1.5rem;
    font-weight: 800;
    color: #b45309;
    line-height: 1;
}
.db-hero-pts-label {
    font-size: 0.55rem;
    text-transform: uppercase;
    color: var(--primary-400);
    font-weight: 600;
}

/* Progress */
.db-hero-progress {
    margin-bottom: 0.625rem;
}
.db-progress-bar {
    height: 6px;
    background: rgba(255,255,255,0.6);
    border-radius: 3px;
    overflow: hidden;
}
.db-progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
}
.db-progress-text {
    font-size: 0.6rem;
    color: var(--primary-500);
    margin-top: 0.15rem;
}

/* Quick stats */
.db-quick-stats {
    display: flex;
    justify-content: space-around;
    border-top: 1px solid rgba(139,92,246,0.15);
    padding-top: 0.5rem;
}
.db-qs-item { text-align: center; }
.db-qs-num {
    font-size: 1rem;
    font-weight: 800;
    color: var(--primary-800);
    line-height: 1.1;
}
.db-qs-label {
    font-size: 0.45rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-400);
    font-weight: 600;
}

/* Section cards */
.db-section-card {
    background: var(--card-bg);
    border: 1px solid var(--primary-200);
    border-radius: 0.75rem;
    padding: 0.75rem;
    margin-bottom: 0.625rem;
}
.db-section-green {
    border-left: 4px solid var(--accent-green);
}
.db-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}
.db-section-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-800);
    margin: 0 0 0.375rem;
}
.db-section-count {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-violet);
    background: rgba(139,92,246,0.08);
    padding: 0.1rem 0.4rem;
    border-radius: 9999px;
}
.db-section-link {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--accent-violet);
    font-weight: 600;
    text-decoration: none;
}
.db-section-hint {
    font-size: 0.65rem;
    color: var(--primary-400);
    margin-top: 0.375rem;
}

/* Empty state */
.db-empty {
    text-align: center;
    padding: 1rem 0;
    color: var(--primary-400);
    font-size: 0.85rem;
}
.db-empty span { font-size: 1.5rem; display: block; margin-bottom: 0.25rem; }
.db-empty p { margin-bottom: 0.5rem; }

/* Badges grid */
.db-badge-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}
.db-badge-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.65rem;
    font-weight: 600;
    border: 1px solid var(--primary-200);
    background: var(--primary-50);
    color: var(--primary-400);
}
.db-badge-earned {
    background: linear-gradient(135deg, #fef3c7, #fffbeb);
    border-color: #fbbf24;
    color: #92400e;
}
.db-badge-icon { font-size: 0.8rem; }
.db-badge-name { white-space: nowrap; }
.db-badge-hint {
    font-size: 0.6rem;
    color: var(--primary-400);
    margin-top: 0.375rem;
    font-style: italic;
}

/* Activity timeline */
.db-timeline { }
.db-timeline-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0;
    border-bottom: 1px solid var(--primary-50);
}
.db-timeline-item:last-child { border-bottom: none; }
.db-timeline-dot {
    font-size: 0.75rem;
    flex-shrink: 0;
    width: 1.25rem;
    text-align: center;
}
.db-timeline-content {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.db-timeline-label {
    font-size: 0.78rem;
    color: var(--primary-600);
    font-weight: 500;
}
.db-timeline-time {
    font-size: 0.6rem;
    color: var(--primary-400);
}
.db-timeline-pts {
    font-size: 0.75rem;
    font-weight: 700;
    color: #059669;
    flex-shrink: 0;
}

/* Issue rows */
.db-issue-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--primary-50);
    border-left: 3px solid var(--primary-200);
    padding-left: 0.5rem;
    margin-bottom: 0.125rem;
    text-decoration: none;
    color: inherit;
    border-radius: 0.25rem;
}
.db-issue-row:last-child { border-bottom: none; }
.db-issue-row:active { background: var(--primary-50); }
.db-issue-main {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    min-width: 0;
    flex: 1;
}
.db-issue-icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}
.db-issue-info {
    min-width: 0;
}
.db-issue-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-700);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.db-issue-meta {
    font-size: 0.6rem;
    color: var(--primary-400);
    display: flex;
    align-items: center;
    gap: 0.15rem;
    flex-wrap: wrap;
}
.db-status-chip {
    font-size: 0.5rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.1rem 0.4rem;
    border-radius: 9999px;
    flex-shrink: 0;
}
.db-status-open {
    background: rgba(59,130,246,0.1);
    color: #2563eb;
}
.db-status-resolved {
    background: rgba(34,197,94,0.1);
    color: #059669;
}

/* Meetup rows */
.db-meetup-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--primary-50);
    text-decoration: none;
    color: inherit;
}
.db-meetup-row:last-child { border-bottom: none; }
.db-meetup-row:active { background: var(--primary-50); border-radius: 0.25rem; }
.db-meetup-main {
    min-width: 0;
    flex: 1;
}
.db-meetup-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-700);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.db-meetup-meta {
    font-size: 0.6rem;
    color: var(--primary-400);
}
.db-meetup-right {
    text-align: right;
    flex-shrink: 0;
}
.db-meetup-countdown {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--accent-green);
}
.db-meetup-going {
    font-size: 0.55rem;
    color: var(--primary-400);
}

/* Comment rows */
.db-comment-row {
    display: block;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--primary-50);
    text-decoration: none;
    color: inherit;
}
.db-comment-row:last-child { border-bottom: none; }
.db-comment-row:active { background: var(--primary-50); border-radius: 0.25rem; }
.db-comment-quote {
    font-size: 0.8rem;
    color: var(--primary-600);
    font-style: italic;
    line-height: 1.4;
    border-left: 2px solid var(--primary-200);
    padding-left: 0.5rem;
}
.db-comment-meta {
    font-size: 0.6rem;
    color: var(--primary-400);
    margin-top: 0.15rem;
    display: flex;
    align-items: center;
    gap: 0.2rem;
    flex-wrap: wrap;
}

/* Photo grid */
.db-photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.375rem;
}
.db-photo-item {
    position: relative;
    border-radius: 0.5rem;
    overflow: hidden;
    aspect-ratio: 1;
}
.db-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}
.db-photo-item:active img {
    transform: scale(1.05);
}

/* Deleted / cancelled rows */
.db-deleted-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.3rem 0;
    border-bottom: 1px solid var(--primary-50);
    font-size: 0.8rem;
}
.db-deleted-row:last-child { border-bottom: none; }
.db-deleted-title {
    color: var(--primary-500);
    text-decoration: line-through;
}
.db-deleted-time {
    font-size: 0.6rem;
    color: var(--primary-400);
    flex-shrink: 0;
}

/* Dashboard: Monthly Report card */
.db-mr-section { background: linear-gradient(135deg, color-mix(in srgb, var(--accent-violet) 4%, var(--surface)), color-mix(in srgb, var(--accent-blue) 3%, var(--surface))); border: 1px solid color-mix(in srgb, var(--accent-violet) 12%, transparent); }
.db-mr-empty { text-align: center; padding: 1.25rem 0.75rem; color: var(--primary-500); font-size: 0.85rem; }
.db-mr-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.db-mr-stat {
    text-align: center;
    padding: 0.5rem 0.25rem;
    background: color-mix(in srgb, var(--accent-violet) 5%, var(--surface));
    border-radius: 0.5rem;
}
.db-mr-stat-val { font-size: 1.25rem; font-weight: 800; color: var(--accent-violet); line-height: 1; }
.db-mr-stat-lbl { font-size: 0.6rem; color: var(--primary-400); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 0.125rem; font-weight: 600; }

.db-mr-pills { display: flex; gap: 0.5rem; justify-content: center; margin-bottom: 0.75rem; }
.db-mr-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.db-mr-pill-open { background: rgba(59,130,246,0.1); color: #3b82f6; }
.db-mr-pill-resolved { background: rgba(74,222,128,0.1); color: #16a34a; }

.db-mr-issues { display: flex; flex-direction: column; gap: 0.375rem; margin-bottom: 0.75rem; }
.db-mr-issue-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.5rem;
    background: var(--surface);
    border-radius: 0.375rem;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}
.db-mr-issue-row:hover { background: var(--primary-50); }
.db-mr-issue-icon { font-size: 1rem; flex-shrink: 0; }
.db-mr-issue-info { flex: 1; min-width: 0; }
.db-mr-issue-title { font-size: 0.8rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--primary-800); }
.db-mr-issue-date { font-size: 0.65rem; color: var(--primary-400); }
.db-mr-issue-badge { font-size: 0.85rem; flex-shrink: 0; }

.db-mr-share { margin-top: 0.5rem; }
.db-mr-share-row {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    animation: fadeSlideUp 0.2s ease;
}

@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(0.5rem); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Feedback FAB + Modal */
.feedback-fab {
    position: fixed;
    bottom: 1.25rem;
    left: 1rem;
    z-index: 90;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: 1px solid var(--primary-200);
    background: var(--surface, white);
    color: var(--primary-400);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: color 0.15s, border-color 0.15s, box-shadow 0.15s;
    touch-action: manipulation;
    opacity: 0.7;
}
.feedback-fab:hover, .feedback-fab:focus-visible {
    color: var(--danger, #dc2626);
    border-color: var(--danger, #dc2626);
    opacity: 1;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.feedback-modal {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
}
.feedback-modal.hidden { display: none; }
.feedback-card {
    width: 100%;
    max-width: 28rem;
    background: var(--surface, white);
    border-radius: 1rem 1rem 0 0;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.12);
    padding: 1rem 1.25rem 1.5rem;
    animation: feedbackSlideUp 0.25s ease;
}
@keyframes feedbackSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.feedback-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.feedback-title { font-size: 1rem; font-weight: 700; color: var(--primary-800); margin: 0; }
.feedback-close { background: none; border: none; font-size: 1.5rem; color: var(--primary-400); cursor: pointer; padding: 0 0.25rem; line-height: 1; }
.feedback-textarea {
    width: 100%;
    border: 1px solid var(--primary-200);
    border-radius: var(--radius);
    padding: 0.625rem;
    font-size: 0.85rem;
    font-family: var(--font-sans);
    resize: vertical;
    min-height: 5rem;
    color: var(--primary-800);
    background: var(--surface, white);
}
.feedback-textarea:focus { outline: none; border-color: var(--accent-violet, #8b5cf6); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-violet, #8b5cf6) 15%, transparent); }
.feedback-context { font-size: 0.65rem; color: var(--primary-400); margin: 0.375rem 0 0.75rem; display: flex; gap: 0.25rem; flex-wrap: wrap; }
.feedback-submit { width: 100%; padding: 0.625rem; font-size: 0.9rem; }

@media (min-width: 640px) {
    .feedback-modal { align-items: center; padding: 1rem; }
    .feedback-card { border-radius: 1rem; }
}

/* =============================================================
   RESPONSIVE OVERRIDES — tablet / laptop / desktop
   Mobile-first: mobile base is the default above.
   ============================================================= */

/* ---- Tablet: issue detail 2-column photo + metadata ---- */
@media (min-width: 768px) {
    .id-title { font-size: 1.5rem; }
    .id-description { font-size: 0.95rem; }
    .id-status-banner { padding: 0.75rem 1rem; }
    .id-banner-icon { width: 1.5rem; height: 1.5rem; }
    .id-hero-img img { border-radius: 0.75rem; }
    .auth-tabs { max-width: 28rem; margin-left: auto; margin-right: auto; }
    .empty-state { padding: 2rem; }
    .flash { max-width: 40rem; margin-left: auto; margin-right: auto; }
    .lb-user-card { padding: 1rem 1.25rem; }
    .lb-rows-grid .card { margin-bottom: 0; }
    .lb-rows-grid .leaderboard-row { border-bottom: none; }
    .mt-stats-banner { justify-content: center; gap: 1.5rem; }
    .mt-stat-item { text-align: center; }

    .md-hero-banner { padding: 1rem 1.25rem; }
    .md-hero-title { font-size: 1.2rem; }
    .md-info-card { border-radius: 0.75rem; }
    .md-attendee-section { border-radius: 0.75rem; }

    .db-hero { padding: 1.25rem; }
    .db-section-card { padding: 1rem; }

    .form-input, .form-textarea, .form-select { font-size: 0.95rem; }
    .btn { font-size: 0.9rem; }
}

/* ---- Laptop: side-by-side layouts for detail pages ---- */
@media (min-width: 1024px) {
    .id-title { font-size: 1.6rem; }
    .id-description { font-size: 1rem; line-height: 1.6; }
    .id-meta-row { font-size: 0.85rem; }
    .id-vote-card { padding: 1rem 1.25rem; }
    .id-meetup-cta { padding: 0.75rem 1rem; }
    .id-share-row { justify-content: flex-start; }

    .md-hero-banner { padding: 1.25rem 1.5rem; }
    .md-hero-title { font-size: 1.4rem; }
    .md-info-row { padding: 0.75rem 1.25rem; }

    .lb-user-card { max-width: 36rem; margin-left: auto; margin-right: auto; }
    .lb-podium { margin-bottom: 1.5rem; }

    .mt-section-title { font-size: 0.85rem; }
    .mt-impact-banner { padding: 0.75rem 1rem; font-size: 0.75rem; }

    .db-hero-avatar { width: 5rem; height: 5rem; }
    .db-hero-name { font-size: 1.25rem; }
    .db-hero-pts-num { font-size: 2rem; }

    .comment-card { padding: 0.75rem 1rem; }
}

/* ---- Desktop: wider comment area, 2-column detail layout ---- */
@media (min-width: 1280px) {
    .id-detail-grid {
        display: grid;
        grid-template-columns: 1fr 24rem;
        gap: 1.5rem;
        align-items: start;
    }
    .id-detail-main { min-width: 0; }
    .id-detail-sidebar {
        position: sticky;
        top: 4.5rem;
    }

    .md-detail-grid {
        display: grid;
        grid-template-columns: 1fr 22rem;
        gap: 1.5rem;
        align-items: start;
    }
    .md-detail-main { min-width: 0; }
    .md-detail-sidebar {
        position: sticky;
        top: 4.5rem;
    }
}

/* ---- Home page responsive overrides ---- */
@media (min-width: 768px) {
    #home-fab { width: 3.75rem; height: 3.75rem; }
    #home-fab svg { width: 28px; height: 28px; }
    .summary-drawer-body { padding: 0 1.5rem 1.5rem; }
    .report-drawer-body { padding: 0 1.5rem 2.5rem; }
    .sum-stat-row { gap: 0.75rem; }
    .sum-stat-pill { padding: 0.4rem 0.75rem; }
    .sum-stat-num { font-size: 0.95rem; }
    .cat-grid { gap: 0.5rem; }
    .cat-card { padding: 0.5rem; font-size: 0.7rem; }
    .photo-slot { width: 4rem; height: 4rem; }
    .sum-hot-card { padding: 0.5rem 0.625rem; }
    .inline-report-drawer .cat-grid { gap: 0.5rem; }
}

@media (min-width: 1024px) {
    #home-fab { width: 4rem; height: 4rem; }
    .summary-drawer-body, .report-drawer-body { padding: 0 2rem 2rem; }
    .sum-stat-row { gap: 1rem; }
    .cat-grid { grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr)); gap: 0.625rem; }
    .cat-card { padding: 0.625rem; font-size: 0.75rem; gap: 0.375rem; }
    .cat-card img { width: 1.75rem; height: 1.75rem; }
    .photo-slot { width: 4.5rem; height: 4.5rem; }
}

/* ---- Sign in/sign up page responsive ---- */
@media (min-width: 768px) {
    .auth-tabs { margin-bottom: 1rem; }
    .auth-tab { padding: 0.75rem 1.5rem; font-size: 0.9rem; }
}

/* ---- FAQ page responsive ---- */
@media (min-width: 768px) {
    .faq-list { max-width: 48rem; margin: 0 auto; }
}

/* ---- Stats responsive ---- */
@media (min-width: 768px) {
    .st-filter-bar { gap: 0.75rem; padding: 0.75rem; }
    .st-filter-select { font-size: 0.8rem; padding: 0.375rem 0.625rem; }
    .st-resolved-card { flex: 0 0 min(40%, 14rem); }
}

/* ---- Leaderboard grid card styling ---- */
@media (min-width: 768px) {
    .lb-row-card { margin-bottom: 0; overflow: hidden; }
    .lb-row-card .leaderboard-row { border-bottom: none; padding: 0.75rem; }
    .lb-row-card .leaderboard-row:last-child { border-bottom: none; }
}

/* ---- Home list view grid (dynamic JS cards) ---- */
@media (min-width: 768px) {
    .home-list-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
    .home-list-grid .card { margin-bottom: 0; }
}
@media (min-width: 1280px) {
    .home-list-grid { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
}

/* ---- Dashboard sections 2-column on desktop ---- */
@media (min-width: 1024px) {
    .db-sections-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
    .db-sections-grid .db-section-card { margin-bottom: 0; }
    .db-sections-grid .db-section-full { grid-column: 1 / -1; }
}

/* ================================================
   COLOR SCHEME OVERRIDES
   Default = Civic Blue (in :root above)
   ================================================ */

/* -- Original Violet ----------------------------- */
[data-theme="violet"] {
    --accent-violet: #8b5cf6;
    --accent-violet-dark: #7c3aed;
    --accent-violet-light: #ede9fe;
    --accent-pink: #ec4899;
    --accent-blue: #3b82f6;
    --accent-green: #22c55e;
}

/* -- Trust Teal ---------------------------------- */
[data-theme="trust-teal"] {
    --accent-violet: #0d9488;
    --accent-violet-dark: #0f766e;
    --accent-violet-light: #ccfbf1;
    --accent-pink: #f472b6;
    --accent-blue: #06b6d4;
    --accent-green: #22c55e;
}

/* -- Slate (60-30-10: warm neutrals + indigo) ---- */
[data-theme="slate"] {
    --accent-violet: #6366f1;
    --accent-violet-dark: #4f46e5;
    --accent-violet-light: #e2e8f0;
    --accent-pink: #a1a1aa;
    --accent-blue: #818cf8;
    --accent-green: #6b8f71;
    --success: #6b8f71;
    --danger: #b07070;
    --warning: #b0966b;
    --primary-50: #fafaf9;
    --primary-100: #f5f5f4;
    --primary-200: #e7e5e4;
    --primary-300: #d6d3d1;
    --primary-400: #a8a29e;
    --primary-500: #78716c;
    --primary-600: #57534e;
    --primary-700: #44403c;
    --primary-800: #292524;
    --primary-900: #1c1917;
    --card-bg: #ffffff;
}

/* Slate: desaturated chart ring & bars — subtle color, not grey */
[data-theme="slate"] .st-ring {
    background: conic-gradient(
        #6b8f71 0deg,
        #6b8f71 calc(var(--ring-pct) * 3.6deg),
        #e7e5e4 calc(var(--ring-pct) * 3.6deg),
        #e7e5e4 360deg
    );
}
[data-theme="slate"] .st-ring-num { color: #6b8f71; }
[data-theme="slate"] .st-bar-open { background: linear-gradient(90deg, #7c8ba0, #94a3b8); }
[data-theme="slate"] .st-bar-resolved { background: linear-gradient(90deg, #6b8f71, #5a7d60); }

/* Slate: secondary stat numbers — muted but hint of color */
[data-theme="slate"] .st-sec-num { color: #44403c !important; }
[data-theme="slate"] .st-fix-value { color: #44403c !important; }

/* Slate: rank headers — soft tinted neutrals */
[data-theme="slate"] .st-rank-best {
    background: linear-gradient(135deg, #f3f6f4, #e8ede9);
    border-bottom-color: #d6d3d1;
}
[data-theme="slate"] .st-rank-alert {
    background: linear-gradient(135deg, #f6f4f3, #ede9e8);
    border-bottom-color: #d6d3d1;
}
[data-theme="slate"] .st-rank-bar-fill { opacity: 0.55; }
[data-theme="slate"] .st-grade-badge { opacity: 0.7; }
[data-theme="slate"] .st-rank-pct { opacity: 0.75; }

/* Slate: category bars — keep original color but desaturate */
[data-theme="slate"] .st-cat-bar-fill { opacity: 0.45; }
[data-theme="slate"] .st-cat-count { color: #44403c; }
[data-theme="slate"] .st-cat-pct { color: #a8a29e; }

/* Slate: location bars */
[data-theme="slate"] .st-loc-bar-fill { opacity: 0.4; }
[data-theme="slate"] .st-loc-count { color: #57534e; }

/* Slate: pulse — muted trend colors */
[data-theme="slate"] .st-pulse-num { color: #44403c; }

/* Slate: resolved showcase — subtle category tint */
[data-theme="slate"] .st-resolved-card { opacity: 0.92; }

/* Slate: engagement — minimal status color */
[data-theme="slate"] .st-eng-badge { opacity: 0.65; }
[data-theme="slate"] .st-eng-score { opacity: 0.7; }
[data-theme="slate"] .st-engagement { border-color: #d6d3d1 !important; }

/* Slate: contributor points badge */
[data-theme="slate"] .st-contrib-points { background: #f5f5f4; color: #57534e; }

/* Slate: impact banner */
[data-theme="slate"] .st-impact {
    background: linear-gradient(135deg, #f5f5f4, #fafaf9);
    border-color: #e7e5e4;
}
[data-theme="slate"] .st-impact-text strong { color: #44403c; }

/* Slate: hero scorecard neutral */
[data-theme="slate"] .st-hero {
    background: linear-gradient(135deg, #f5f5f4 0%, #fafaf9 100%);
    border-color: #e7e5e4;
}

/* Slate: dashboard hero neutral */
[data-theme="slate"] .db-hero {
    background: linear-gradient(135deg, #f5f5f4 0%, #fafaf9 100%);
    border-color: #e7e5e4;
}
[data-theme="slate"] .db-hero-avatar { border-color: #a8a29e; }

/* Slate: leaderboard pedestals neutral */
[data-theme="slate"] .lb-podium-card:nth-child(1) .lb-podium-pedestal { background: linear-gradient(180deg, #e7e5e4, #d6d3d1); }
[data-theme="slate"] .lb-podium-card:nth-child(2) .lb-podium-pedestal { background: linear-gradient(180deg, #f5f5f4, #e7e5e4); }
[data-theme="slate"] .lb-podium-card:nth-child(3) .lb-podium-pedestal { background: linear-gradient(180deg, #f5f5f4, #e7e5e4); }

/* Slate: filter chip neutral */
[data-theme="slate"] .st-filter-chip { background: #f5f5f4; color: #57534e; }

/* Slate: action pills — keep some color */
[data-theme="slate"] .pill-green { background: rgba(34,197,94,0.08); color: #3d8b4f; }
[data-theme="slate"] .pill-violet { background: rgba(99,102,241,0.08); }
[data-theme="slate"] .pill-blue { background: rgba(99,102,241,0.06); }

/* Slate: vote card backgrounds */
[data-theme="slate"] .id-vote-card { border-color: #e7e5e4; }

/* Slate: home drawer stat pills — restore color */
[data-theme="slate"] .sum-stat-pill { border-color: color-mix(in srgb, var(--pill-color) 20%, #e7e5e4); }

/* Slate: home drawer CTA cards — keep readable tint */
[data-theme="slate"] .sum-cta-urgent { background: linear-gradient(135deg, #faf5f5, #f5eded); border-color: #e5d8d8; }
[data-theme="slate"] .sum-cta-urgent .sum-cta-text { color: #8b3a3a; }
[data-theme="slate"] .sum-cta-urgent .sum-cta-btn { background: #b07070; }
[data-theme="slate"] .sum-cta-good { background: linear-gradient(135deg, #f5faf6, #edf5ee); border-color: #d8e5da; }
[data-theme="slate"] .sum-cta-good .sum-cta-text { color: #3d6b42; }
[data-theme="slate"] .sum-cta-good .sum-cta-btn { background: #6366f1; }

/* Slate: home drawer hottest issues — warm amber hint */
[data-theme="slate"] .sum-hot-heat { color: #b0966b; }

/* Slate: home drawer category chips — keep border color visible */
[data-theme="slate"] .sum-cat-chip { border-color: #d6d3d1; }

/* Slate: open/resolved bar labels — desaturated color hints */
[data-theme="slate"] .st-bar-label-open { color: #7c8ba0 !important; }
[data-theme="slate"] .st-bar-label-resolved { color: #6b8f71 !important; }

/* ================================================
   THEME SWATCHES (inside Info popover)
   ================================================ */
.theme-swatch-row {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.25rem 0.25rem 0.375rem;
}
.theme-swatch-row .ts-label {
    font-size: 0.7rem;
    color: var(--primary-400);
    margin-right: 0.125rem;
}
.theme-swatch {
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    border: 2px solid rgba(0,0,0,0.08);
    cursor: pointer;
    touch-action: manipulation;
    transition: transform 0.15s, box-shadow 0.15s;
    flex-shrink: 0;
    padding: 0;
    background: none;
}
.theme-swatch:hover { transform: scale(1.15); }
.theme-swatch.active { box-shadow: 0 0 0 2.5px white, 0 0 0 4.5px var(--accent-violet); }

/* ================================================
   MONTHLY REPORT CAROUSEL
   ================================================ */
.mr-page {
    max-width: 26rem;
    margin: 0 auto;
    padding: 1rem;
}
.mr-header { text-align: center; margin-bottom: 0.75rem; }
.mr-page-title { font-size: 1.1rem; font-weight: 700; color: var(--primary-800); margin: 0; }
.mr-page-sub { font-size: 0.8rem; color: var(--primary-500); margin: 0.125rem 0 0.5rem; }
.mr-actions { display: flex; justify-content: center; gap: 0.5rem; flex-wrap: wrap; }
.mr-share-row {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    animation: fadeSlideUp 0.2s ease;
}
.mr-counter { text-align: center; font-size: 0.75rem; color: var(--primary-400); font-weight: 600; margin-bottom: 0.375rem; }

.mr-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0;
    border-radius: 1rem;
}
.mr-carousel::-webkit-scrollbar { display: none; }

.mr-slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
    aspect-ratio: 4 / 5;
    border-radius: 1rem;
    padding: 1.75rem 1.5rem;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    color: white;
    font-family: var(--font-sans);
}

.mr-watermark {
    position: absolute;
    bottom: 0.75rem;
    right: 1rem;
    font-family: var(--font-brand);
    font-weight: 700;
    font-size: 0.7rem;
    opacity: 0.25;
    letter-spacing: 0.02em;
}

/* Slide 1: Cover */
.mr-cover {
    background: linear-gradient(145deg, var(--accent-violet-dark) 0%, var(--accent-violet) 50%, var(--accent-blue) 100%);
    justify-content: center;
    align-items: center;
    text-align: center;
}
.mr-cover-content { z-index: 1; }
.mr-cover-icon { font-size: 3rem; margin-bottom: 0.75rem; }
.mr-cover-title { font-size: 2rem; font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
.mr-cover-month { font-size: 1.1rem; font-weight: 600; margin-top: 0.75rem; opacity: 0.9; }
.mr-cover-location { font-size: 0.85rem; opacity: 0.7; margin-top: 0.25rem; }
.mr-cover-tagline { font-size: 0.7rem; opacity: 0.5; margin-top: 1.5rem; letter-spacing: 0.08em; text-transform: lowercase; }

/* Slide 2: Numbers */
.mr-numbers {
    background: linear-gradient(160deg, #1e293b 0%, #0f172a 100%);
}
.mr-slide-title { font-size: 1.25rem; font-weight: 800; margin-bottom: 0.125rem; }
.mr-slide-subtitle { font-size: 0.7rem; opacity: 0.5; margin-bottom: 1rem; }
.mr-num-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    flex: 1;
    align-content: center;
}
.mr-num-card {
    background: rgba(255,255,255,0.07);
    border-radius: 0.75rem;
    padding: 1rem 0.75rem;
    text-align: center;
}
.mr-num-wide { grid-column: 1 / -1; }
.mr-num-value { font-size: 2rem; font-weight: 800; color: var(--accent-blue); line-height: 1; }
.mr-num-green { color: #4ade80; }
.mr-num-teal { color: #2dd4bf; }
.mr-num-amber { color: #fbbf24; }
.mr-num-pink { color: #f472b6; }
.mr-num-label { font-size: 0.65rem; color: rgba(255,255,255,0.55); margin-top: 0.375rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }

/* Slide 3: Categories */
.mr-categories {
    background: linear-gradient(160deg, #1e293b 0%, #0f172a 100%);
}
.mr-cat-list { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 0.875rem; }
.mr-cat-row { display: flex; align-items: center; gap: 0.5rem; }
.mr-cat-rank { font-size: 0.7rem; font-weight: 700; opacity: 0.4; width: 1.5rem; text-align: center; }
.mr-cat-icon { font-size: 1.25rem; }
.mr-cat-info { flex: 1; min-width: 0; }
.mr-cat-name { font-size: 0.8rem; font-weight: 600; margin-bottom: 0.25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mr-cat-bar-wrap { height: 0.4rem; background: rgba(255,255,255,0.1); border-radius: 9999px; overflow: hidden; }
.mr-cat-bar { height: 100%; background: linear-gradient(90deg, var(--accent-violet), var(--accent-blue)); border-radius: 9999px; transition: width 0.6s ease; }
.mr-cat-count { font-size: 0.85rem; font-weight: 700; opacity: 0.7; min-width: 1.5rem; text-align: right; }

/* Slide 4: Heroes */
.mr-heroes {
    background: linear-gradient(160deg, #1e293b 0%, #0f172a 100%);
}
.mr-hero-list { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; }
.mr-hero-card { text-align: center; position: relative; }
.mr-hero-medal { font-size: 1.5rem; margin-bottom: 0.25rem; }
.mr-hero-avatar { width: 3.5rem; height: 3.5rem; border-radius: 50%; object-fit: cover; border: 3px solid rgba(255,255,255,0.2); }
.mr-hero-avatar-placeholder { display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.1); color: white; font-size: 1.25rem; font-weight: 700; margin: 0 auto; }
.mr-hero-name { font-size: 0.85rem; font-weight: 700; margin-top: 0.375rem; }
.mr-hero-stats { font-size: 0.65rem; opacity: 0.5; margin-top: 0.125rem; }

/* Slide 5: Impact / CTA */
.mr-cta {
    background: linear-gradient(145deg, var(--accent-violet-dark) 0%, var(--accent-violet) 50%, var(--accent-blue) 100%);
    align-items: center;
    text-align: center;
}
.mr-impact-ring {
    width: 8rem;
    height: 8rem;
    border-radius: 50%;
    background: conic-gradient(
        #4ade80 0deg,
        #4ade80 calc(var(--ring-pct) * 3.6deg),
        rgba(255,255,255,0.15) calc(var(--ring-pct) * 3.6deg),
        rgba(255,255,255,0.15) 360deg
    );
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 1rem 0;
    position: relative;
}
.mr-impact-ring::after {
    content: '';
    position: absolute;
    inset: 0.5rem;
    border-radius: 50%;
    background: var(--accent-violet-dark);
}
.mr-ring-num { font-size: 1.75rem; font-weight: 800; z-index: 1; }
.mr-ring-label { font-size: 0.65rem; opacity: 0.7; z-index: 1; text-transform: uppercase; letter-spacing: 0.06em; }
.mr-impact-stat { font-size: 0.9rem; opacity: 0.85; margin: 0.5rem 0 1.25rem; }
.mr-impact-stat strong { font-weight: 800; }
.mr-cta-box {
    background: rgba(255,255,255,0.12);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.mr-cta-text { font-size: 0.85rem; font-weight: 600; margin-bottom: 0.375rem; }
.mr-cta-url { font-size: 1rem; font-weight: 800; letter-spacing: 0.02em; }

/* Slide 3 (user): Your Activity */
.mr-youractivity {
    background: linear-gradient(160deg, #1e293b 0%, #0f172a 100%);
}
.mr-user-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.mr-user-avatar { width: 3rem; height: 3rem; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,0.2); }
.mr-user-avatar-placeholder { display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.1); color: white; font-size: 1.25rem; font-weight: 700; }
.mr-user-name { font-size: 1rem; font-weight: 700; }
.mr-user-loc { font-size: 0.7rem; opacity: 0.5; margin-top: 0.125rem; }
.mr-user-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.625rem;
    flex: 1;
    align-content: center;
}
.mr-user-stat {
    background: rgba(255,255,255,0.07);
    border-radius: 0.625rem;
    padding: 0.75rem 0.5rem;
    text-align: center;
}
.mr-user-stat-val { font-size: 1.5rem; font-weight: 800; color: var(--accent-blue); line-height: 1; }
.mr-user-stat-lbl { font-size: 0.6rem; color: rgba(255,255,255,0.5); margin-top: 0.25rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }

/* Slide 4 (user): Your Issues Status */
.mr-yourstatus {
    background: linear-gradient(160deg, #1e293b 0%, #0f172a 100%);
}
.mr-status-summary { display: flex; gap: 0.75rem; margin-bottom: 1rem; justify-content: center; }
.mr-status-pill {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
}
.mr-status-open { background: rgba(59,130,246,0.15); color: #60a5fa; }
.mr-status-resolved { background: rgba(74,222,128,0.15); color: #4ade80; }
.mr-status-pill-num { font-size: 1.1rem; font-weight: 800; }
.mr-issue-list { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 0.625rem; }
.mr-issue-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.05);
    border-radius: 0.5rem;
    padding: 0.5rem 0.625rem;
}
.mr-issue-icon { font-size: 1.1rem; }
.mr-issue-info { flex: 1; min-width: 0; }
.mr-issue-title { font-size: 0.8rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mr-issue-date { font-size: 0.65rem; opacity: 0.4; }
.mr-issue-badge { font-size: 0.9rem; }

.mr-empty { text-align: center; opacity: 0.5; font-size: 0.85rem; padding: 2rem 0; }

/* Stats page link to monthly report */
.st-monthly-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent-violet) 10%, transparent), color-mix(in srgb, var(--accent-blue) 8%, transparent));
    border: 1px solid color-mix(in srgb, var(--accent-violet) 20%, transparent);
    border-radius: var(--radius);
    color: var(--accent-violet-dark);
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    margin-bottom: 0.75rem;
    transition: transform 0.15s, box-shadow 0.15s;
}
.st-monthly-link:hover { transform: translateY(-1px); box-shadow: 0 4px 12px color-mix(in srgb, var(--accent-violet) 15%, transparent); }

/* Dots */
.mr-dots { display: flex; justify-content: center; gap: 0.5rem; margin-top: 0.75rem; }
.mr-dot {
    width: 0.5rem; height: 0.5rem;
    border-radius: 50%;
    background: var(--primary-300);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}
.mr-dot.active { background: var(--accent-violet); transform: scale(1.3); }

/* Responsive */
@media (max-width: 374px) {
    .mr-page { padding: 0.5rem; }
    .mr-slide { padding: 1.25rem 1rem; }
    .mr-cover-title { font-size: 1.6rem; }
    .mr-num-value { font-size: 1.5rem; }
}
@media (min-width: 768px) {
    .mr-page { max-width: 30rem; }
}
@media (min-width: 1024px) {
    .mr-page { max-width: 32rem; }
}
