/* ============================================================================
 * RETUR — NORDIC CIVIC TRUST & GEOSPATIAL BENTO UI (iOS / Android / Web)
 * Color Psychology:
 *  - Trust Cobalt Indigo (#254EDB): Security, reliability, calm authority
 *  - Signal Coral Rose (#E11D48): High-visibility urgency for LOST items
 *  - Recovery Emerald (#059669): Safety, altruism & relief for FOUND / RESOLVED
 *  - Gratitude Amber (#D97706): Community reward & appreciation
 * Layout Architecture:
 *  - Modular Bento Cards with inset rounded imagery, glass location pills,
 *    segmented radar controls, and custom bottom-sheet styled modal dialogs
 * ============================================================================ */
:root {
    color-scheme: light dark;

    --civic-cobalt: #254EDB;
    --civic-cobalt-dark: #1D3FB3;
    --civic-cobalt-light: #EEF2FF;
    --civic-cobalt-border: #C7D2FE;

    --lost-red: #E11D48;
    --lost-red-bg: #FFF1F2;
    --lost-red-border: #FECDD3;

    --found-emerald: #059669;
    --found-emerald-bg: #ECFDF5;
    --found-emerald-border: #A7F3D0;

    --reward-amber: #D97706;
    --reward-amber-bg: #FFFBEB;
    --reward-amber-border: #FDE68A;

    --bg-canvas: #F1F5F9;
    --surface-card: #FFFFFF;
    --surface-bento: #F8FAFC;
    --surface-elevated: #FFFFFF;
    --text-primary: #0F172A;
    --text-secondary: #334155;
    --text-muted: #64748B;
    --divider-line: #E2E8F0;

    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --app-height: 100dvh;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --civic-cobalt: #3B82F6;
        --civic-cobalt-dark: #2563EB;
        --civic-cobalt-light: rgba(59, 130, 246, 0.18);
        --civic-cobalt-border: rgba(96, 165, 250, 0.35);

        --lost-red: #FB7185;
        --lost-red-bg: rgba(244, 63, 94, 0.18);
        --lost-red-border: rgba(251, 113, 133, 0.38);

        --found-emerald: #34D399;
        --found-emerald-bg: rgba(16, 185, 129, 0.18);
        --found-emerald-border: rgba(52, 211, 153, 0.38);

        --reward-amber: #FBBF24;
        --reward-amber-bg: rgba(245, 158, 11, 0.16);
        --reward-amber-border: rgba(251, 191, 36, 0.38);

        --bg-canvas: #0B1120;
        --surface-card: #1E293B;
        --surface-bento: #0F172A;
        --surface-elevated: #263349;
        --text-primary: #F8FAFC;
        --text-secondary: #CBD5E1;
        --text-muted: #94A3B8;
        --divider-line: #334155;
    }
}

html[data-theme="dark"],
body.dark-mode {
    color-scheme: dark;
    --civic-cobalt: #3B82F6;
    --civic-cobalt-dark: #2563EB;
    --civic-cobalt-light: rgba(59, 130, 246, 0.18);
    --civic-cobalt-border: rgba(96, 165, 250, 0.35);

    --lost-red: #FB7185;
    --lost-red-bg: rgba(244, 63, 94, 0.18);
    --lost-red-border: rgba(251, 113, 133, 0.38);

    --found-emerald: #34D399;
    --found-emerald-bg: rgba(16, 185, 129, 0.18);
    --found-emerald-border: rgba(52, 211, 153, 0.38);

    --reward-amber: #FBBF24;
    --reward-amber-bg: rgba(245, 158, 11, 0.16);
    --reward-amber-border: rgba(251, 191, 36, 0.38);

    --bg-canvas: #0B1120;
    --surface-card: #1E293B;
    --surface-bento: #0F172A;
    --surface-elevated: #263349;
    --text-primary: #F8FAFC;
    --text-secondary: #CBD5E1;
    --text-muted: #94A3B8;
    --divider-line: #334155;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    height: var(--app-height, 100dvh);
    max-height: var(--app-height, 100dvh);
    font-family: -apple-system, BlinkMacSystemFont, "Plus Jakarta Sans", "Inter", "Segoe UI", Roboto, sans-serif;
    background: var(--bg-canvas);
    color: var(--text-primary);
    overflow: hidden;
    user-select: none;
    -webkit-font-smoothing: antialiased;
}

/* App Shell */
.app-shell {
    position: relative;
    width: 100%;
    height: 100%;
    height: var(--app-height, 100dvh);
    max-height: var(--app-height, 100dvh);
    max-width: 560px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-canvas);
    box-shadow: 0 0 42px rgba(15, 23, 42, 0.1);
}

/* ============================================================================
 * 1. SIMPLE SPLASH OVERLAY (2.65s — Deep Civic Cobalt Gradient)
 * ============================================================================ */
.splash-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: radial-gradient(circle at 50% 35%, #1E3A8A 0%, #0F172A 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.35s ease;
}
.splash-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}
.splash-pin-circle {
    width: 92px;
    height: 92px;
    border-radius: 28px;
    background: var(--civic-cobalt);
    border: 2px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 16px 36px rgba(37, 78, 219, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: splashPop 0.52s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.splash-pin-circle svg {
    width: 48px;
    height: 48px;
    fill: #FFFFFF;
}
.splash-brand-title {
    margin-top: 20px;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #FFFFFF;
    opacity: 0;
    animation: splashFadeIn 0.45s ease 0.16s forwards;
}
@keyframes splashPop {
    0% { opacity: 0; transform: scale(0.72); }
    100% { opacity: 1; transform: scale(1); }
}
@keyframes splashFadeIn {
    0% { opacity: 0; transform: translateY(6px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ============================================================================
 * 2. BENTO COMMAND HEADER & SEGMENTED RADAR FILTERS
 * ============================================================================ */
.top-header {
    background: var(--surface-card);
    padding-top: calc(10px + var(--safe-top));
    padding-left: 16px;
    padding-right: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--divider-line);
    border-bottom-left-radius: 22px;
    border-bottom-right-radius: 22px;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
    z-index: 20;
}
.brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.brand-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}
.brand-logo-badge {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: var(--civic-cobalt);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(37, 78, 219, 0.25);
}
.brand-logo-badge svg {
    width: 20px;
    height: 20px;
    fill: #FFFFFF;
}
.brand-title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    line-height: 1.1;
}
.brand-subtitle {
    font-size: 11px;
    font-weight: 600;
    color: var(--civic-cobalt);
    margin-top: 2px;
}
.top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.top-icon-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border: 1px solid var(--divider-line);
    background: var(--surface-bento);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
}
.top-icon-btn:active {
    background: var(--civic-cobalt-light);
    border-color: var(--civic-cobalt);
}
.top-icon-btn svg {
    width: 20px;
    height: 20px;
    fill: var(--text-primary);
}
.bell-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--lost-red);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--surface-card);
}

/* Bento Search Input & Filter Trigger Row */
.search-command-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.search-bar {
    flex: 1;
    min-width: 0;
    margin-top: 0;
    height: 42px;
    background: var(--surface-bento);
    border-radius: 13px;
    display: flex;
    align-items: center;
    padding: 0 13px;
    border: 1.5px solid var(--divider-line);
    transition: all 0.15s;
}
.search-bar:focus-within {
    background: var(--surface-card);
    border-color: var(--civic-cobalt);
    box-shadow: 0 0 0 3px var(--civic-cobalt-light);
}
.search-bar svg {
    width: 18px;
    height: 18px;
    fill: var(--civic-cobalt);
    flex-shrink: 0;
}
.search-bar input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    margin-left: 9px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-primary);
}
.search-bar input::placeholder {
    color: var(--text-muted);
}
.search-clear-btn {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    padding: 4px 6px;
}
.filter-menu-trigger-btn {
    position: relative;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 13px;
    border: 1.5px solid var(--divider-line);
    background: var(--surface-bento);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
    transition: all 0.15s ease;
}
.filter-menu-trigger-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}
.filter-menu-trigger-btn.has-active {
    background: var(--civic-cobalt-light);
    border-color: var(--civic-cobalt);
    color: var(--civic-cobalt);
}
.filter-menu-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--civic-cobalt);
    color: #FFFFFF;
    font-size: 10px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--surface-card);
}
.filter-menu-section {
    margin-bottom: 14px;
}
.filter-menu-section-title {
    font-size: 11.5px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 7px;
}
.filter-menu-chips {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}
.filter-menu-chips .filter-chip {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    box-sizing: border-box;
    height: 42px;
    padding: 0 14px;
    font-size: 13.5px;
    border-radius: 12px;
    text-align: left;
}

/* Segmented Bento Filter Bar */
.filter-scroll {
    margin-top: 10px;
    display: flex;
    gap: 7px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 2px 2px 4px 2px;
}
.filter-scroll::-webkit-scrollbar {
    display: none;
}
.filter-chip {
    height: 33px;
    padding: 0 13px;
    border-radius: 11px;
    border: 1px solid var(--divider-line);
    background: var(--surface-bento);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
    transition: all 0.15s ease;
}
.filter-chip.active {
    background: var(--civic-cobalt);
    border-color: var(--civic-cobalt);
    color: #FFFFFF;
    box-shadow: 0 3px 10px rgba(37, 78, 219, 0.25);
}
.filter-chip.active-lost {
    background: var(--lost-red);
    border-color: var(--lost-red);
    color: #FFFFFF;
    box-shadow: 0 3px 10px rgba(225, 29, 72, 0.25);
}
.filter-chip.active-found {
    background: var(--found-emerald);
    border-color: var(--found-emerald);
    color: #FFFFFF;
    box-shadow: 0 3px 10px rgba(5, 150, 105, 0.25);
}
.filter-chip.mine-chip {
    color: var(--civic-cobalt);
    border-color: var(--civic-cobalt-border);
    background: var(--civic-cobalt-light);
}
.filter-chip.mine-chip.active {
    background: var(--civic-cobalt);
    color: #FFFFFF;
}
.filter-chip.fav-filter-chip {
    color: var(--lost-red);
    border-color: var(--lost-red-border);
    background: var(--lost-red-bg);
}
.filter-chip.fav-filter-chip.active {
    background: var(--lost-red);
    border-color: var(--lost-red);
    color: #FFFFFF;
    box-shadow: 0 3px 10px rgba(225, 29, 72, 0.25);
}

/* ============================================================================
 * 3. MAIN VIEWPORT & BENTO FEED CARDS
 * ============================================================================ */
.main-viewport {
    flex: 1;
    position: relative;
    overflow: hidden;
}
.tab-pane {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
}
.tab-pane.active {
    display: flex;
}

.feed-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px 10px 96px 10px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    align-content: start;
}

/* 2-Column Bento Card Architecture */
.feed-card {
    background: var(--surface-card);
    border-radius: 16px;
    border: 1px solid var(--divider-line);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
    margin-bottom: 0;
    padding: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.feed-card:active {
    transform: scale(0.985);
}

/* Top Bento Status & Category Ribbon (Used on Item Detail Photo) */
.bento-top-bar {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    z-index: 3;
    pointer-events: none;
}
.bento-cat-pill {
    background: var(--surface-card);
    backdrop-filter: blur(8px);
    color: var(--civic-cobalt);
    border: 1px solid var(--civic-cobalt-border);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 46%;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.14);
}
.bento-badges-left {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    width: 100%;
    justify-content: space-between;
}
.badge-type {
    display: inline-block;
    padding: 4px 9px;
    border-radius: 7px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 52%;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18);
}
.badge-type.lost { background: var(--lost-red); }
.badge-type.found { background: var(--found-emerald); }
.badge-type.resolved { background: #0D9488; }

/* Clickable Favourite Label (Only Label on Main Listing Cards) */
.fav-pill-btn {
    position: absolute;
    top: 7px;
    right: 7px;
    z-index: 4;
    border: 1px solid rgba(255, 255, 255, 0.75);
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(8px);
    color: #FFFFFF;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.01em;
    cursor: pointer;
    display: inline-block;
    max-width: calc(100% - 14px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 3px 8px rgba(15, 23, 42, 0.22);
    transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease;
}
.fav-pill-btn:active {
    transform: scale(0.92);
}
.fav-pill-btn.active {
    background: #E11D48;
    border-color: #FDA4AF;
    color: #FFFFFF;
    box-shadow: 0 3px 10px rgba(225, 29, 72, 0.35);
}
.fav-pill-btn.detail-header-fav {
    position: static;
    background: var(--lost-red-bg);
    border: 1.5px solid var(--lost-red-border);
    color: var(--lost-red);
    padding: 6px 12px;
    font-size: 12px;
    max-width: 145px;
    flex-shrink: 0;
    box-shadow: none;
}
.fav-pill-btn.detail-header-fav.active {
    background: var(--lost-red);
    border-color: var(--lost-red);
    color: #FFFFFF;
}
.owner-fav-count-pill {
    background: var(--lost-red-bg);
    color: var(--lost-red);
    border: 1px solid var(--lost-red-border);
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.cat-pill {
    background: var(--civic-cobalt-light);
    color: var(--civic-cobalt);
    border: 1px solid var(--civic-cobalt-border);
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 130px;
}

.badge-reward {
    position: absolute;
    bottom: 28px;
    right: 10px;
    background: var(--reward-amber-bg);
    color: var(--reward-amber);
    border: 1px solid var(--reward-amber-border);
    padding: 4px 9px;
    border-radius: 8px;
    font-size: 10.5px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 44%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
    z-index: 3;
}

/* Inset Rounded Photo Frame inside 2-Column Bento Card */
.feed-photo-wrap {
    position: relative;
    width: 100%;
    height: 136px;
    border-radius: 11px;
    overflow: hidden;
    background: var(--surface-bento);
    flex-shrink: 0;
    touch-action: pan-y;
}
.feed-photo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}
.feed-badge-row {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    z-index: 3;
    pointer-events: none;
}
.feed-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.28);
    line-height: 1.1;
    white-space: nowrap;
}
.feed-status-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #FFFFFF;
    flex-shrink: 0;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.6);
}
.feed-status-badge.lost {
    background: rgba(225, 29, 72, 0.92);
}
.feed-status-badge.found {
    background: rgba(5, 150, 105, 0.92);
}
.feed-status-badge.resolved {
    background: rgba(13, 148, 136, 0.94);
}
.feed-status-badge.resolved::before {
    display: none;
}
.feed-photo-counter {
    position: absolute;
    bottom: 7px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 6;
    background: transparent;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    pointer-events: none;
}
.detail-photo-counter {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 6;
    background: transparent;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    pointer-events: none;
}
.photo-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.52);
    border: 1px solid rgba(15, 23, 42, 0.5);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.9), 0 0 2px rgba(0, 0, 0, 0.75);
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.photo-dot.active {
    background: #FFFFFF;
    border-color: rgba(15, 23, 42, 0.65);
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.95), 0 0 3px rgba(0, 0, 0, 0.85);
    transform: scale(1.22);
}
.bento-location-glass {
    position: absolute;
    bottom: 28px;
    left: 10px;
    max-width: 50%;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(8px);
    color: #FFFFFF;
    padding: 4px 9px;
    border-radius: 8px;
    font-size: 10.5px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    z-index: 3;
}

.feed-body {
    padding: 7px 2px 0 2px;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}
.feed-title {
    margin: 0 0 3px 0;
    font-size: 13px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}
.feed-desc {
    margin: 0;
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Bento Inner Footer Capsule */
.feed-action-bar {
    margin-top: auto;
    padding-top: 8px;
}
.feed-action-inner {
    background: var(--surface-bento);
    border: 1px solid var(--divider-line);
    border-radius: 10px;
    padding: 5px 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
}
.bento-user-chip {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    flex: 1;
}
.bento-avatar {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    background: var(--civic-cobalt);
    color: #FFFFFF;
    font-size: 10.5px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.owner-label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.owner-label.mine {
    color: var(--civic-cobalt);
}
.action-icons-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
    width: 100%;
    flex: 1;
}
.feed-action-inner .icon-btn {
    flex: 1;
    width: auto;
    min-width: 0;
    height: 29px;
}

/* Compact Icon Button System */
.icon-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
    transition: all 0.15s ease;
}
.icon-btn:active {
    transform: scale(0.94);
}
.icon-btn svg {
    width: 15px;
    height: 15px;
}
.icon-btn.primary {
    background: var(--civic-cobalt);
    color: #fff;
    box-shadow: 0 2px 6px rgba(37, 78, 219, 0.25);
}
.icon-btn.primary svg { fill: #fff; }
.icon-btn.tonal-blue {
    background: var(--civic-cobalt-light);
    color: var(--civic-cobalt);
}
.icon-btn.tonal-blue svg { fill: var(--civic-cobalt); }
.icon-btn.tonal-red {
    background: var(--lost-red-bg);
    color: var(--lost-red);
}
.icon-btn.tonal-red svg { fill: var(--lost-red); }
.icon-btn.tonal-teal {
    background: var(--found-emerald-bg);
    color: var(--found-emerald);
}
.icon-btn.tonal-teal svg { fill: var(--found-emerald); }
.icon-btn.tonal-amber {
    background: var(--reward-amber-bg);
    border-color: var(--reward-amber-border);
    color: var(--reward-amber);
}
.icon-btn.tonal-amber svg { fill: var(--reward-amber); }
.icon-btn.tonal-fav-active {
    background: var(--lost-red-bg);
    border-color: var(--lost-red-border);
    color: var(--lost-red);
}
.icon-btn.tonal-fav-active svg { fill: var(--lost-red); }
.icon-btn.danger {
    background: var(--lost-red);
    color: #fff;
}
.icon-btn.danger svg { fill: #fff; }
.icon-btn.outlined {
    background: var(--surface-card);
    border-color: var(--divider-line);
    color: var(--text-primary);
}
.icon-btn.outlined svg { fill: var(--text-primary); }
.icon-btn:disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* Map Tab */
#mainMapContainer {
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Dark Mode Map Styling (Main Map, Detail Map & Create Picker Map) */
html[data-theme="dark"] .leaflet-container,
body.dark-mode .leaflet-container {
    background: #0B1120 !important;
}
html[data-theme="dark"] .leaflet-tile-pane,
body.dark-mode .leaflet-tile-pane {
    filter: invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%);
    -webkit-filter: invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%);
}
html[data-theme="dark"] .leaflet-bar,
body.dark-mode .leaflet-bar {
    border-color: var(--divider-line) !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45) !important;
}
html[data-theme="dark"] .leaflet-bar a,
body.dark-mode .leaflet-bar a {
    background-color: var(--surface-card) !important;
    color: var(--text-primary) !important;
    border-bottom-color: var(--divider-line) !important;
}
html[data-theme="dark"] .leaflet-bar a:hover,
body.dark-mode .leaflet-bar a:hover {
    background-color: var(--surface-elevated) !important;
}
html[data-theme="dark"] .leaflet-control-attribution,
body.dark-mode .leaflet-control-attribution {
    background: rgba(15, 23, 42, 0.82) !important;
    color: var(--text-muted) !important;
}
html[data-theme="dark"] .leaflet-control-attribution a,
body.dark-mode .leaflet-control-attribution a {
    color: var(--civic-cobalt) !important;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .leaflet-container {
        background: #0B1120 !important;
    }
    :root:not([data-theme="light"]) .leaflet-tile-pane {
        filter: invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%);
        -webkit-filter: invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%);
    }
    :root:not([data-theme="light"]) .leaflet-bar {
        border-color: var(--divider-line) !important;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45) !important;
    }
    :root:not([data-theme="light"]) .leaflet-bar a {
        background-color: var(--surface-card) !important;
        color: var(--text-primary) !important;
        border-bottom-color: var(--divider-line) !important;
    }
    :root:not([data-theme="light"]) .leaflet-control-attribution {
        background: rgba(15, 23, 42, 0.82) !important;
        color: var(--text-muted) !important;
    }
    :root:not([data-theme="light"]) .leaflet-control-attribution a {
        color: var(--civic-cobalt) !important;
    }
}
.custom-osm-pin,
.custom-picker-pin,
.custom-user-gps-pin {
    width: 0 !important;
    height: 0 !important;
    overflow: visible !important;
    background: transparent !important;
    border: none !important;
}
.map-locate-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--surface-card);
    border: 1px solid var(--divider-line);
    color: var(--civic-cobalt);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.16);
    transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.map-locate-btn:hover {
    background: var(--surface-bento);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.22);
}
.map-locate-btn:active {
    transform: scale(0.93);
}
.map-locate-btn svg {
    width: 19px;
    height: 19px;
    fill: currentColor;
}
.map-locate-btn.locating svg {
    animation: ptrSpin 0.8s linear infinite;
}
.map-selected-card {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 16px;
    z-index: 500;
    background: var(--surface-card);
    border: 1.5px solid var(--civic-cobalt-border);
    border-radius: 18px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.2);
}
.map-selected-card.hidden {
    display: none;
}
.map-selected-card img {
    width: 66px;
    height: 66px;
    border-radius: 12px;
    object-fit: contain;
    object-position: center;
    background: #0F172A;
    flex-shrink: 0;
}
.map-selected-info {
    flex: 1;
    min-width: 0;
}

/* Messages Tab */
.encrypted-banner {
    background: var(--civic-cobalt-light);
    color: var(--civic-cobalt);
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--civic-cobalt-border);
    min-width: 0;
}
.encrypted-banner span {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.encrypted-banner svg {
    width: 17px;
    height: 17px;
    fill: var(--civic-cobalt);
    flex-shrink: 0;
}
.threads-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px 14px 90px 14px;
}
.thread-card {
    background: var(--surface-card);
    border: 1px solid var(--divider-line);
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
.thread-avatar {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: var(--civic-cobalt);
    color: #fff;
    font-weight: 800;
    font-size: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ============================================================================
 * 4. FLOATING PILL-DOCK BOTTOM NAVIGATION BAR (VISIBLE ON ALL PAGES)
 * ============================================================================ */
.bottom-nav {
    position: relative;
    flex-shrink: 0;
    background: var(--surface-card);
    border-top: 1px solid var(--divider-line);
    padding-bottom: var(--safe-bottom);
    height: calc(66px + var(--safe-bottom));
    display: flex;
    align-items: center;
    padding-left: 6px;
    padding-right: 6px;
    gap: 2px;
    z-index: 4500;
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.05);
}
.nav-item {
    position: relative;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    height: 52px;
    border: none;
    background: transparent;
    border-radius: 11px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0 2px;
    transition: all 0.15s;
}
.nav-item .nav-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.nav-item .nav-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    display: block;
}
.nav-item .nav-label {
    font-size: 10px;
    font-weight: 600;
    margin-top: 3px;
    line-height: 1.1;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nav-item.active {
    color: var(--civic-cobalt);
    background: var(--civic-cobalt-light);
}
.nav-item.active .nav-label {
    font-weight: 800;
}
.nav-create-btn {
    flex: 1.05;
    height: 48px;
    margin-left: 4px;
    margin-right: 2px;
    border: none;
    border-radius: 13px;
    background: var(--civic-cobalt);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(37, 78, 219, 0.35);
}
.nav-create-btn:active {
    background: var(--civic-cobalt-dark);
}
.nav-create-btn .nav-icon {
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
}
.nav-create-btn .nav-label {
    font-size: 10px;
    font-weight: 800;
}

/* ============================================================================
 * 5. FULL-SCREEN SLIDE-OVER MODALS (ABOVE CONTENT, KEEPING BOTTOM NAV VISIBLE)
 * ============================================================================ */
.screen-modal {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: calc(66px + var(--safe-bottom));
    z-index: 1000;
    background: var(--bg-canvas);
    display: none;
    flex-direction: column;
    overflow: hidden;
    max-width: 560px;
    margin: 0 auto;
}
.screen-modal.open {
    display: flex;
}
.screen-header {
    background: var(--surface-card);
    color: var(--text-primary);
    padding-top: calc(10px + var(--safe-top));
    padding-bottom: 12px;
    padding-left: 12px;
    padding-right: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--divider-line);
}
.back-btn {
    width: 38px;
    height: 38px;
    border: 1px solid var(--divider-line);
    background: var(--surface-bento);
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.07);
}
.screen-title {
    font-size: 17.5px;
    font-weight: 800;
    color: var(--text-primary);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.screen-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 16px 16px calc(32px + var(--safe-bottom)) 16px;
}

/* Create / Edit Form Controls */
.scenario-switcher {
    display: flex;
    background: var(--surface-bento);
    border: 1px solid var(--divider-line);
    padding: 4px;
    border-radius: 14px;
    height: 46px;
}
.scenario-tab {
    flex: 1;
    min-width: 0;
    border: none;
    border-radius: 10px;
    padding: 0 8px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    background: transparent;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.15s;
}
.scenario-tab.active-lost {
    background: var(--lost-red);
    color: #fff;
    box-shadow: 0 2px 8px rgba(225, 29, 72, 0.3);
}
.scenario-tab.active-found {
    background: var(--found-emerald);
    color: #fff;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
}

.field-label {
    display: block;
    margin-top: 14px;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.text-input, .text-area {
    width: 100%;
    border: 1.5px solid var(--divider-line);
    background: var(--surface-card);
    border-radius: 12px;
    padding: 11px 14px;
    font-size: 14.5px;
    color: var(--text-primary);
    outline: none;
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.text-input:focus, .text-area:focus {
    border-color: var(--civic-cobalt);
    box-shadow: 0 0 0 3px var(--civic-cobalt-light);
}
.text-area {
    min-height: 82px;
    resize: vertical;
}

.picker-map-card {
    width: 100%;
    height: 205px;
    border-radius: 16px;
    overflow: hidden;
    border: 1.5px solid var(--civic-cobalt-border);
    position: relative;
}
#createMapContainer, #detailMapContainer {
    width: 100%;
    height: 100%;
}

/* Address Auto-Suggestions Dropdown */
.autocomplete-wrap {
    position: relative;
}
.suggestions-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    background: var(--surface-card);
    border: 1.5px solid var(--civic-cobalt);
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
    z-index: 1200;
    max-height: 210px;
    overflow-y: auto;
}
.suggestions-dropdown.hidden {
    display: none;
}
.suggestion-item {
    padding: 11px 14px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--divider-line);
    cursor: pointer;
}
.suggestion-item:last-child {
    border-bottom: none;
}
.suggestion-item:hover, .suggestion-item:active {
    background: var(--civic-cobalt-light);
}

/* Multi-Photo Upload, Preview, Rotate & Delete */
.photo-preview-card {
    width: 100%;
    height: 215px;
    border-radius: 16px;
    background: #0F1E36;
    border: 1.5px dashed var(--civic-cobalt-border);
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: pan-y;
}
.photo-preview-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}
.photo-placeholder {
    color: var(--text-muted);
    text-align: center;
    padding: 20px;
    font-size: 13.5px;
    font-weight: 600;
}
.thumbs-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin-top: 8px;
    padding-bottom: 4px;
}
.thumb-item {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    overflow: hidden;
    background: #0F1E36;
    border: 2px solid var(--divider-line);
    flex-shrink: 0;
    cursor: pointer;
}
.thumb-item.selected {
    border-color: var(--civic-cobalt);
    border-width: 3px;
}
.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}
.photo-toolbar {
    display: flex;
    gap: 6px;
    margin-top: 10px;
}
.photo-toolbar .icon-btn {
    flex: 1;
    height: 44px;
}

.primary-submit-btn {
    width: 100%;
    height: 50px;
    margin-top: 18px;
    margin-bottom: 24px;
    padding: 0 14px;
    border: none;
    border-radius: 14px;
    background: var(--civic-cobalt);
    color: #fff;
    font-size: 15.5px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(37, 78, 219, 0.3);
}
.primary-submit-btn:active {
    background: var(--civic-cobalt-dark);
}

/* ============================================================================
 * 6. CUSTOM STYLED BENTO / BOTTOM-SHEET DIALOGS
 * ============================================================================ */
.retur-dialog-backdrop {
    position: absolute;
    inset: 0;
    z-index: 5000;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: calc(16px + var(--safe-top)) 16px calc(24px + var(--safe-bottom)) 16px;
}
.retur-dialog-backdrop.open {
    display: flex;
}
.retur-dialog-card {
    width: 100%;
    max-width: 420px;
    max-height: 100%;
    overflow-y: auto;
    background: var(--surface-card);
    border-radius: 26px;
    padding: 14px 20px 20px 20px;
    border: 1px solid var(--divider-line);
    box-shadow: 0 24px 54px rgba(15, 23, 42, 0.35);
    animation: splashPop 0.22s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.dialog-grab-handle {
    width: 42px;
    height: 5px;
    border-radius: 3px;
    background: var(--divider-line);
    margin: 0 auto 14px auto;
}
.dialog-header-banner {
    background: var(--surface-bento);
    border: 1px solid var(--civic-cobalt-border);
    border-radius: 18px;
    padding: 14px 16px;
    margin-bottom: 14px;
}
.dialog-badge {
    display: inline-block;
    max-width: 100%;
    background: var(--civic-cobalt);
    color: #FFFFFF;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    padding: 4px 10px;
    border-radius: 999px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dialog-title {
    margin: 8px 0 4px 0;
    font-size: 18.5px;
    font-weight: 800;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dialog-msg {
    margin: 0;
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.45;
    white-space: pre-line;
}
.dialog-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 290px;
    overflow-y: auto;
    padding: 4px;
    margin-bottom: 16px;
}
.dialog-row-card {
    padding: 14px 15px;
    border-radius: 16px;
    border: 1px solid var(--divider-line);
    background: var(--surface-bento);
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.08);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    transition: all 0.15s;
}
.dialog-row-card:hover, .dialog-row-card:active {
    background: var(--civic-cobalt-light);
    border-color: var(--civic-cobalt-border);
    box-shadow: 0 5px 14px rgba(37, 78, 219, 0.14);
    transform: translateY(-1px);
}
.dialog-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}
.dialog-btn {
    height: 44px;
    padding: 0 20px;
    max-width: 100%;
    border-radius: 999px;
    border: none;
    font-size: 13.5px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.1);
}

/* Pull-to-Refresh Floating Spinner Pill */
.pull-refresh-pill {
    position: absolute;
    top: -48px;
    left: 50%;
    transform: translate(-50%, 0);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--surface-card);
    border: 1px solid var(--divider-line);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.16);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 60;
    pointer-events: none;
    opacity: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.pull-refresh-pill svg {
    width: 20px;
    height: 20px;
    fill: var(--civic-cobalt);
}
.pull-refresh-pill.spinning svg {
    animation: ptrSpin 0.72s linear infinite;
}
@keyframes ptrSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Full-Screen Gesture Zoom Photo Lightbox */
.photo-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9200;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    touch-action: none;
    padding-top: var(--safe-top);
    padding-bottom: var(--safe-bottom);
}
.photo-lightbox-overlay.open {
    display: flex;
}
.photo-lightbox-stage {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    touch-action: none;
}
.photo-lightbox-stage img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transform-origin: center center;
    will-change: transform;
    user-select: none;
    -webkit-user-drag: none;
}
.photo-lightbox-close {
    position: absolute;
    top: calc(16px + var(--safe-top));
    right: 16px;
    z-index: 9210;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(15, 23, 42, 0.75);
    color: #FFFFFF;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================================================
 * 7. WIDESCREEN / DESKTOP / TABLET RESPONSIVE LAYOUT (>= 769px)
 *    Keeps mobile (<= 768px) 100% untouched while expanding cleanly on PC.
 * ============================================================================ */
@media (min-width: 769px) {
    .app-shell {
        max-width: 1380px;
        box-shadow: 0 0 60px rgba(15, 23, 42, 0.08);
    }

    /* Spacious Desktop Header */
    .top-header {
        padding: 16px 28px 14px 28px;
        border-bottom-left-radius: 24px;
        border-bottom-right-radius: 24px;
    }
    .search-bar {
        height: 46px;
        border-radius: 14px;
        padding: 0 16px;
    }
    .search-bar input {
        font-size: 14.5px;
    }
    .filter-scroll {
        margin-top: 12px;
        gap: 9px;
        flex-wrap: wrap;
    }
    .filter-chip {
        height: 36px;
        padding: 0 15px;
        font-size: 12.5px;
        border-radius: 12px;
    }
    .filter-chip:hover {
        border-color: var(--civic-cobalt);
    }

    /* Multi-Column Widescreen Bento Feed Grid */
    .feed-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 18px;
        padding: 22px 28px 104px 28px;
    }
    .feed-card {
        padding: 12px;
        border-radius: 18px;
        transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
    }
    .feed-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
        border-color: var(--civic-cobalt-border);
    }
    .feed-photo-wrap {
        height: 185px;
        border-radius: 13px;
    }
    .feed-body {
        padding: 10px 4px 0 4px;
    }
    .feed-title {
        font-size: 14.5px;
        margin-bottom: 4px;
    }
    .feed-desc {
        font-size: 12.5px;
        line-height: 1.45;
    }
    .feed-action-bar {
        padding-top: 10px;
    }
    .feed-action-inner {
        padding: 6px 8px;
        border-radius: 11px;
    }

    /* Widescreen Map Overlay Card */
    .map-selected-card {
        max-width: 520px;
        width: calc(100% - 48px);
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        bottom: 24px;
        padding: 14px 18px;
        border-radius: 20px;
    }

    /* Widescreen Messages Inbox */
    .encrypted-banner {
        padding: 11px 28px;
        font-size: 13px;
        justify-content: center;
    }
    .encrypted-banner span {
        flex: 0 1 auto;
    }
    .threads-list {
        max-width: 880px;
        width: 100%;
        margin: 0 auto;
        padding: 20px 28px 104px 28px;
    }
    .thread-card {
        padding: 16px 20px;
        border-radius: 18px;
        transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    }
    .thread-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
        border-color: var(--civic-cobalt-border);
    }

    /* Desktop Bottom Navigation Bar */
    .bottom-nav {
        height: 70px;
        padding-left: max(24px, calc((100% - 880px) / 2));
        padding-right: max(24px, calc((100% - 880px) / 2));
        gap: 8px;
    }
    .nav-item {
        flex-direction: row;
        gap: 8px;
        height: 48px;
        border-radius: 13px;
        padding: 0 12px;
    }
    .nav-item:hover {
        background: var(--surface-bento);
        color: var(--civic-cobalt);
    }
    .nav-item.active:hover {
        background: var(--civic-cobalt-light);
    }
    .nav-item .nav-label {
        font-size: 13px;
        margin-top: 0;
    }

    /* Desktop Modals (Create, Detail, Chat, Profile) */
    .screen-modal {
        max-width: 100%;
        bottom: calc(70px + var(--safe-bottom));
        background: var(--bg-canvas);
    }
    .screen-header {
        padding: 14px max(28px, calc((100% - 880px) / 2));
    }
    .screen-scroll {
        max-width: 880px;
        width: 100%;
        margin: 0 auto;
        padding: 24px 28px calc(40px + var(--safe-bottom)) 28px;
    }
    #screenDetail .screen-scroll {
        padding: 24px 28px calc(40px + var(--safe-bottom)) 28px !important;
    }
    #detailPhotoWrap {
        height: 360px !important;
        border-radius: 20px 20px 0 0;
    }
    .picker-map-card {
        height: 260px;
    }
    #screenChat #rvChatMessages,
    #screenChat #chatPendingPhotoBar,
    #screenChat > div:last-child {
        max-width: 880px;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
    .retur-dialog-card {
        max-width: 480px;
    }
}

@media (min-width: 1100px) {
    .feed-list {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 20px;
        padding: 24px 32px 104px 32px;
    }
    .feed-photo-wrap {
        height: 195px;
    }
}

@media (min-width: 1440px) {
    .app-shell {
        max-width: 1520px;
    }
    .feed-list {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 22px;
        padding: 26px 36px 104px 36px;
    }
}

/* ============================================================================
 * CUSTOM BENTO TOAST POPUP (FITS APP THEME & MOBILE SCREEN WIDTH)
 * ============================================================================ */
.retur-toast {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: calc(78px + var(--safe-bottom));
    margin: 0 auto;
    width: fit-content;
    max-width: min(420px, calc(100vw - 32px));
    box-sizing: border-box;
    background: var(--surface-card);
    color: var(--text-primary);
    border: 1.5px solid var(--civic-cobalt-border);
    border-radius: 16px;
    padding: 10px 15px 10px 11px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.35;
    white-space: normal;
    word-break: break-word;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16), 0 2px 8px rgba(37, 78, 219, 0.08);
    opacity: 0;
    transform: translateY(14px) scale(0.97);
    pointer-events: none;
    transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 8500;
}
.retur-toast.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.retur-toast.toast-success {
    border-color: var(--found-emerald-border);
}
.retur-toast.toast-error {
    border-color: var(--lost-red-border);
}
.retur-toast-icon {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    background: var(--civic-cobalt);
    color: #FFFFFF;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 3px 8px rgba(37, 78, 219, 0.25);
}
.retur-toast.toast-success .retur-toast-icon {
    background: var(--found-emerald);
    box-shadow: 0 3px 8px rgba(5, 150, 105, 0.25);
}
.retur-toast.toast-error .retur-toast-icon {
    background: var(--lost-red);
    box-shadow: 0 3px 8px rgba(225, 29, 72, 0.25);
}
.retur-toast-icon svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    display: block;
}
.retur-toast-text {
    flex: 1;
    min-width: 0;
    color: var(--text-primary);
}
html[data-theme="dark"] .retur-toast,
body.dark-mode .retur-toast {
    background: #1E293B;
    border-color: rgba(129, 140, 248, 0.35);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.04);
}
html[data-theme="dark"] .retur-toast.toast-success,
body.dark-mode .retur-toast.toast-success {
    border-color: rgba(16, 185, 129, 0.45);
}
html[data-theme="dark"] .retur-toast.toast-error,
body.dark-mode .retur-toast.toast-error {
    border-color: rgba(244, 63, 94, 0.45);
}

/* Printable QR Poster Stylesheet */
@media print {
    body * {
        visibility: hidden;
    }
    #printableFlyerSheet, #printableFlyerSheet * {
        visibility: visible;
    }
    #printableFlyerSheet {
        position: fixed;
        inset: 0;
        background: #fff;
        z-index: 99999;
        padding: 24px;
    }
}
