/* ═══ 全国社区营造案例地图 ═══
 * 设计系统 v2 — 基于 Notion 色板 (design.md)
 */
:root {
    /* 中性色 — Notion 灰阶体系 */
    --bg: #ffffff;
    --bg-page: #fbfbfa;
    --border: #e9e9e7;
    --border-hover: #d8d8d6;
    --text: #373530;
    --text-secondary: #787774;
    --text-tertiary: #a6a299;
    /* 功能色 — Notion 10色icon取值 */
    --primary: #337ea9;
    --primary-bg: #e9f3f7;
    --success: #448361;
    --success-bg: #eef3ed;
    --warning: #d87620;
    --warning-bg: #f8ecdf;
    --danger: #d44c47;
    --danger-bg: #faecec;
    /* 兼容别名 */
    --card-bg: var(--bg);
    --primary-light: var(--primary-bg);
    --primary-dark: #2a6890;
    --primary-hover: var(--primary-dark);
    --gray-0: var(--bg);
    --gray-1: var(--bg-page);
    --gray-2: var(--border);
    --gray-3: var(--border-hover);
    --gray-4: var(--text-secondary);
    --gray-5: var(--text);
    --gray-6: #191919;
    /* 尺寸 */
    --sidebar-width: 300px;
    --header-height: 48px;
    --radius: 6px;
    --radius-sm: 4px;
    /* 阴影 — Notion 风格:仅hover才出现 */
    --shadow: 0 1px 3px rgba(0,0,0,0.04);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--bg-page);
    color: var(--text);
    overflow: hidden;
    height: 100vh;
}

/* ── 顶部导航 ── */
#header {
    height: var(--header-height);
    background: #191919;
    color: #d4d4d4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 1000;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.header-left h1 { font-size: 18px; font-weight: 600; letter-spacing: 1px; }
.header-left .subtitle { font-size: 11px; color: rgba(255,255,255,0.55); margin-left: 10px; letter-spacing: 0.5px; }
.powerby { font-size: 10px; color: #ffffff; margin-left: 10px; font-style: italic; }
#stats-bar { display: flex; align-items: center; gap: 10px; font-size: 13px; color: rgba(255,255,255,0.85); }
.stat-item strong { font-size: 16px; color: #ffd700; margin-right: 2px; }
.stat-divider { color: rgba(255,255,255,0.25); }

/* ── 布局 ── */
#app-layout { display: flex; height: calc(100vh - var(--header-height)); position: relative; }

/* ── 左侧筛选 ── */
#sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: var(--card-bg);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    z-index: 100;
    display: flex; flex-direction: column;
}
.sidebar-section { padding: 14px 16px 10px; border-bottom: 1px solid var(--border); }
.sidebar-section h3 { font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; letter-spacing: 0.5px; }
.search-box { display: flex; gap: 6px; }
.search-box input {
    flex: 1; padding: 7px 12px; border: 1px solid var(--border);
    border-radius: 6px; font-size: 13px; outline: none; transition: border-color 0.2s;
}
.search-box input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(45,140,240,0.1); }
.search-box button {
    padding: 7px 12px; background: var(--primary); color: #fff; border: none;
    border-radius: 6px; cursor: pointer; font-size: 13px; transition: background 0.2s;
}
.search-box button:hover { background: var(--primary-dark); }
#province-filter {
    width: 100%; padding: 7px 12px; border: 1px solid var(--border);
    border-radius: 6px; font-size: 13px; outline: none; background: #fff; cursor: pointer;
}
#category-filters { display: flex; flex-wrap: wrap; gap: 5px; }
.category-tag {
    display: inline-block; padding: 3px 10px; border-radius: 16px; font-size: 11px;
    cursor: pointer; transition: all 0.2s; border: 1px solid var(--border);
    background: var(--gray-1); color: var(--text-secondary); user-select: none;
}
.category-tag:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.category-tag.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ── 案例列表 ── */
#case-list { flex: 1; overflow-y: auto; padding: 0 14px 14px; }
.list-loading { text-align: center; padding: 20px; color: var(--text-secondary); font-size: 13px; }
.case-list-item {
    padding: 10px 12px; border-radius: 8px; cursor: pointer;
    transition: all 0.2s; border: 1px solid transparent; margin-bottom: 6px;
}
.case-list-item:hover { background: var(--primary-light); border-color: var(--primary); transform: translateX(2px); }
.case-list-item .item-title { font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.case-list-item .item-meta { font-size: 11px; color: var(--text-secondary); display: flex; gap: 8px; }
.case-list-item .item-badge { display: inline-block; font-size: 10px; padding: 1px 6px; border-radius: 10px; }
.badge-history { background: var(--primary-light); color: var(--primary); }
.badge-garden { background: var(--success-bg); color: var(--success); }
.badge-governance { background: var(--warning-bg); color: var(--warning); }
.badge-renewal { background: #f9f0ff; color: #722ed1; }
.badge-space { background: #e6fffb; color: #13c2c2; }
.badge-rural { background: #fff0f6; color: #eb2f96; }
.badge-default { background: var(--gray-1); color: var(--gray-4); }

/* ── 全屏地图 ── */
#map-container { flex: 1; height: 100%; }

/* ── 详情弹窗 ── */
#detail-modal { display: none; }
#detail-modal.modal-visible { display: block; }
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 2000;
    animation: fadeIn 0.25s ease;
}
.modal-content {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%);
    width: 680px; max-width: 90vw; max-height: 82vh;
    background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg);
    z-index: 2001; overflow: hidden;
    display: flex; flex-direction: column;
    animation: slideUp 0.3s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp {
    from { opacity: 0; transform: translate(-50%,-50%) scale(0.95) translateY(20px); }
    to { opacity: 1; transform: translate(-50%,-50%) scale(1) translateY(0); }
}
.modal-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    padding: 28px 32px 20px; border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, #fafafa 0%, #fff 100%);
}
.modal-header h2 {
    font-size: 22px; font-weight: 700; line-height: 1.5; flex: 1; padding-right: 16px;
    color: var(--gray-6); letter-spacing: 0.5px;
}
#modal-close {
    width: 36px; height: 36px; min-width: 36px; border-radius: 50%;
    border: none; background: var(--gray-2); cursor: pointer; font-size: 18px;
    color: #666; display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
#modal-close:hover { background: var(--gray-3); color: var(--gray-6); transform: rotate(90deg); }
.modal-body { padding: 24px 32px 32px; overflow-y: auto; flex: 1; }

/* ── 详情区块美化 ── */
.modal-section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}
.modal-section:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.modal-section .mod-label {
    font-size: 12px; font-weight: 700; color: var(--text-secondary);
    letter-spacing: 1px; margin-bottom: 8px; text-transform: uppercase;
    display: flex; align-items: center; gap: 6px;
}
.modal-section .mod-label::before {
    content: ''; width: 3px; height: 12px; background: var(--primary);
    border-radius: 2px;
}
.modal-section .mod-value {
    font-size: 15px; color: var(--text); line-height: 1.8;
    letter-spacing: 0.3px;
}
.modal-section .mod-tags {
    display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px;
}
.modal-section .mod-tag {
    padding: 4px 14px; border-radius: 16px; font-size: 13px;
    background: linear-gradient(135deg, var(--primary-light) 0%, #e0f0ff 100%);
    color: var(--primary); border: 1px solid rgba(45,140,240,0.2);
    font-weight: 500; transition: all 0.2s;
}
.modal-section .mod-tag:hover {
    transform: translateY(-1px); box-shadow: 0 2px 8px rgba(45,140,240,0.15);
}
.modal-section .mod-desc {
    font-size: 15px; line-height: 2.0; color: var(--text);
    white-space: pre-line; letter-spacing: 0.5px;
    text-align: justify; word-break: break-word;
}
.modal-section .mod-grid {
    display: flex; flex-wrap: wrap; gap: 20px;
    background: var(--gray-1); padding: 16px; border-radius: 12px;
}
.modal-section .mod-grid-item { flex: 1; min-width: 120px; }
.modal-section .mod-grid-item .mod-label { margin-bottom: 4px; }
.modal-section .mod-grid-item .mod-value { font-size: 14px; font-weight: 600; }

/* ── 位置信息特殊样式 ── */
.modal-section.location-section {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 16px 20px; border-radius: 12px;
    border-bottom: none; margin-bottom: 20px;
}

/* ── 标签区域特殊样式 ── */
.modal-section.tags-section .mod-tags {
    margin-top: 10px;
}

/* ── 简介区域 ── */
.modal-section.intro-section .mod-desc {
    font-size: 16px; line-height: 1.9; color: var(--text);
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    padding: 16px 20px; border-radius: 12px;
    border-left: 4px solid var(--warning);
}

/* ── 详细内容区域 ── */
.modal-section.detail-section .mod-desc {
    font-size: 15px; line-height: 2.2; color: #374151;
    padding: 4px 0;
}

.modal-map-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 18px; background: var(--primary); color: #fff;
    border: none; border-radius: 8px; cursor: pointer; font-size: 13px;
    transition: background 0.2s;
}
.modal-map-btn:hover { background: var(--primary-dark); }

/* ── 地图标记 ── */
.case-marker {
    width: 34px; height: 34px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25); border: 2px solid #fff;
    cursor: pointer; transition: transform 0.2s;
}
.case-marker:hover { transform: scale(1.2); z-index: 999 !important; }
.case-marker.marker-history { background: linear-gradient(135deg,var(--primary),var(--primary-hover)); }
.case-marker.marker-garden { background: linear-gradient(135deg,var(--success),#1a5e29); }
.case-marker.marker-governance { background: linear-gradient(135deg,var(--warning),#8250df); }
.case-marker.marker-renewal { background: linear-gradient(135deg,#722ed1,#531dab); }
.case-marker.marker-space { background: linear-gradient(135deg,#13c2c2,#08979c); }
.case-marker.marker-rural { background: linear-gradient(135deg,#eb2f96,#c41d7f); }
.case-marker.marker-default { background: linear-gradient(135deg,var(--gray-4),#595959); }

/* ── 自定义信息窗口 ── */
.custom-info-window {
    background: #fff; border-radius: 12px; box-shadow: 0 4px 24px rgba(0,0,0,0.18);
    min-width: 240px; max-width: 300px; overflow: hidden;
}
.custom-info-window .info-header {
    background: linear-gradient(135deg,var(--primary),var(--primary-dark));
    color: #fff; padding: 10px 14px; font-size: 14px; font-weight: 600;
    display: flex; justify-content: space-between; align-items: center;
}
.custom-info-window .info-header .close-btn {
    cursor: pointer; width: 22px; height: 22px; border-radius: 50%;
    border: none; background: rgba(255,255,255,0.15); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 13px;
}
.custom-info-window .info-header .close-btn:hover { background: rgba(255,255,255,0.3); }
.custom-info-window .info-body { padding: 10px 14px 14px; }
.custom-info-window .info-body .meta { font-size: 11px; color: var(--text-secondary); margin-bottom: 6px; }
.custom-info-window .info-body .desc { font-size: 12px; color: var(--text); line-height: 1.6; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.custom-info-window .info-body .detail-btn {
    display: block; width: 100%; padding: 7px; background: var(--primary);
    color: #fff; border: none; border-radius: 6px; font-size: 12px;
    cursor: pointer; text-align: center; transition: background 0.2s;
}
.custom-info-window .info-body .detail-btn:hover { background: var(--primary-dark); }

/* ── 滚动条 ── */
#sidebar::-webkit-scrollbar, #case-list::-webkit-scrollbar, .modal-body::-webkit-scrollbar { width: 4px; }
#sidebar::-webkit-scrollbar-thumb, #case-list::-webkit-scrollbar-thumb, .modal-body::-webkit-scrollbar-thumb { background: var(--gray-3); border-radius: 2px; }
#sidebar::-webkit-scrollbar-track, #case-list::-webkit-scrollbar-track, .modal-body::-webkit-scrollbar-track { background: transparent; }

/* ── 汉堡菜单按钮 ── */
.menu-btn {
    display: none;
    width: 40px; height: 40px;
    border: none; background: rgba(255,255,255,0.1);
    border-radius: 8px; color: #fff; font-size: 22px;
    cursor: pointer; align-items: center; justify-content: center;
    margin-right: 12px; transition: all 0.2s;
}
.menu-btn:hover { background: rgba(255,255,255,0.2); }
.menu-btn.active { background: rgba(255,255,255,0.25); }

/* ── 侧边栏遮罩层 ── */
#sidebar-overlay {
    display: none;
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 99;
    opacity: 0; transition: opacity 0.3s;
}
#sidebar-overlay.visible { display: block; opacity: 1; }

/* ── 响应式 ── */
/* ═══ 手机端开场（卡片式） ═══ */
#intro-mobile { display: none; }
#intro-mobile.mobile-visible { display: block; }

#intro-mobile {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 9999; overflow: hidden;
    background: radial-gradient(ellipse at center, #1a1a3e 0%, #000 100%);
}

#intro-mobile-skip {
    position: absolute; top: 20px; right: 30px; z-index: 10001;
    background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.8);
    border: 1px solid rgba(255,255,255,0.3); padding: 8px 20px;
    border-radius: 20px; font-size: 14px; cursor: pointer;
    transition: all 0.3s;
}
#intro-mobile-skip:hover { background: rgba(255,255,255,0.2); color: #fff; border-color: rgba(255,255,255,0.6); }

.intro-mobile-card {
    position: relative; z-index: 10000;
    max-width: 500px; margin: 0 auto;
    height: 100vh; overflow-y: auto;
    padding: 60px 24px 80px;
    color: #ffe680;
    font-family: "PingFang SC","Microsoft YaHei","SimHei",sans-serif;
    text-align: center;
    -webkit-overflow-scrolling: touch;
    animation: introFadeIn 0.8s ease;
}
@keyframes introFadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}
.intro-mobile-card::-webkit-scrollbar { width: 3px; }
.intro-mobile-card::-webkit-scrollbar-thumb { background: rgba(255,215,0,0.2); border-radius: 2px; }

.intro-mobile-card h1 {
    font-size: 28px; font-weight: 700; color: #ffd700;
    text-shadow: 0 0 30px rgba(255,215,0,0.5);
    margin-bottom: 12px; letter-spacing: 4px; line-height: 1.4;
}
.intro-mobile-card h2 {
    font-size: 22px; font-weight: 400; color: #ffd700;
    margin-bottom: 36px; letter-spacing: 6px;
}
.intro-mobile-card p {
    font-size: 15px; line-height: 2.0; margin-bottom: 20px;
    color: #ffe680; text-align: justify;
    text-shadow: 0 0 6px rgba(255,215,0,0.1);
}
.intro-mobile-card p em {
    font-style: normal; font-size: 18px; color: #fff; font-weight: 600;
}
.intro-mobile-credits {
    margin: 40px 0 30px; padding-top: 30px;
    border-top: 1px solid rgba(255,215,0,0.15);
    text-align: center;
}
.intro-mobile-credits p {
    font-size: 11px; line-height: 1.9; margin-bottom: 8px;
    color: rgba(255,215,0,0.45); text-align: center; text-shadow: none;
}
.intro-mobile-end {
    text-align: center !important; font-size: 13px !important;
    color: rgba(255,255,255,0.3) !important; margin-top: 40px !important;
    text-shadow: none !important;
}

@media (max-width: 768px) {
    .menu-btn { display: flex; }
    #header { padding: 0 12px; }
    .header-left h1 { font-size: 15px; }
    .header-left .subtitle { display: none; }
    .powerby { display: none; }
    #stats-bar { font-size: 11px; gap: 6px; }
    .stat-item strong { font-size: 14px; }
    .stat-divider { display: none; }

    /* 侧边栏滑出覆盖 */
    #sidebar {
        position: fixed; top: 56px; left: 0;
        width: 85vw; max-width: 320px; height: calc(100vh - 56px);
        transform: translateX(-100%); transition: transform 0.3s ease;
        z-index: 100; box-shadow: 4px 0 20px rgba(0,0,0,0.3);
    }
    #sidebar.mobile-open { transform: translateX(0); }

    /* 手机端：隐藏桌面星战动画，显示卡片式开场 */
    #intro-crawl { display: none !important; }
    #intro-mobile { display: block; }

    /* 弹窗全屏 */
    .modal-content {
        width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh;
        border-radius: 0; top: 0; left: 0; transform: none;
    }
    @keyframes slideUp {
        from { opacity: 0; }
        to { opacity: 1; }
    }
    .modal-header { padding: 16px 20px 12px; }
    .modal-header h2 { font-size: 17px; }
    .modal-body { padding: 16px 20px 24px; }
    .modal-section .mod-value { font-size: 13px; }
    .modal-section .mod-desc { font-size: 13px; }

    /* 案例列表项触摸优化 */
    .case-list-item { padding: 12px 14px; margin-bottom: 8px; }
    .case-list-item .item-title { font-size: 14px; }
    .case-list-item .item-meta { font-size: 12px; }
    .sidebar-section { padding: 12px 14px 10px; }
    .search-box input { padding: 10px 14px; font-size: 14px; }
    .search-box button { padding: 10px 14px; }
    #province-filter { padding: 10px 14px; font-size: 14px; }
    .category-tag { padding: 5px 12px; font-size: 12px; }
}

@media (max-width: 480px) {
    .intro-mobile-card { padding: 50px 18px 70px; }
    .intro-mobile-card h1 { font-size: 24px; letter-spacing: 2px; }
    .intro-mobile-card h2 { font-size: 18px; margin-bottom: 28px; }
    .intro-mobile-card p { font-size: 14px; line-height: 1.9; }
    .intro-mobile-credits p { font-size: 10px; }
    #stats-bar { font-size: 10px; }
    .stat-item strong { font-size: 12px; }
    #intro-mobile-skip { top: 12px; right: 12px; padding: 6px 16px; font-size: 13px; }
}

/* 桌面端保留的星战字幕动画 */
@keyframes crawl-mobile {
    0%   { transform: translateX(-50%) translateY(0); }
    100% { transform: translateX(-50%) translateY(-2800px); }
}

/* ═══ 开场前言（星球大战字幕效果） ═══ */
#intro-crawl {
    position: fixed; top:0; left:0; width:100%; height:100%;
    z-index: 9999; overflow: hidden;
    background: radial-gradient(ellipse at center, #1a1a3e 0%, #000 100%);
}
.crawl-starfield {
    position: absolute; top:0; left:0; width:100%; height:100%;
    background-image: 
        radial-gradient(2px 2px at 5% 5%, rgba(255,255,255,0.6), transparent),
        radial-gradient(2px 2px at 15% 12%, rgba(255,255,255,0.3), transparent),
        radial-gradient(2px 2px at 25% 8%, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 35% 18%, rgba(255,255,255,0.4), transparent),
        radial-gradient(2px 2px at 48% 6%, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 55% 15%, rgba(255,255,255,0.5), transparent),
        radial-gradient(2px 2px at 68% 10%, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 78% 5%, rgba(255,255,255,0.6), transparent),
        radial-gradient(2px 2px at 88% 14%, rgba(255,255,255,0.4), transparent),
        radial-gradient(2px 2px at 95% 8%, rgba(255,255,255,0.2), transparent),
        radial-gradient(2px 2px at 20% 30%, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 40% 25%, rgba(255,255,255,0.3), transparent),
        radial-gradient(2px 2px at 60% 35%, rgba(255,255,255,0.4), transparent),
        radial-gradient(1px 1px at 75% 22%, rgba(255,255,255,0.6), transparent),
        radial-gradient(2px 2px at 85% 38%, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 50% 45%, rgba(255,255,255,0.5), transparent),
        radial-gradient(2px 2px at 30% 55%, rgba(255,255,255,0.4), transparent),
        radial-gradient(1px 1px at 65% 52%, rgba(255,255,255,0.2), transparent),
        radial-gradient(2px 2px at 10% 65%, rgba(255,255,255,0.6), transparent),
        radial-gradient(2px 2px at 45% 62%, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 80% 58%, rgba(255,255,255,0.5), transparent),
        radial-gradient(2px 2px at 55% 72%, rgba(255,255,255,0.4), transparent),
        radial-gradient(1px 1px at 25% 78%, rgba(255,255,255,0.6), transparent),
        radial-gradient(2px 2px at 70% 76%, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 90% 68%, rgba(255,255,255,0.4), transparent),
        radial-gradient(2px 2px at 5% 88%, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 35% 85%, rgba(255,255,255,0.3), transparent),
        radial-gradient(2px 2px at 58% 90%, rgba(255,255,255,0.6), transparent),
        radial-gradient(2px 2px at 75% 82%, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 95% 92%, rgba(255,255,255,0.5), transparent),
        radial-gradient(2px 2px at 15% 95%, rgba(255,255,255,0.4), transparent),
        radial-gradient(1px 1px at 42% 94%, rgba(255,255,255,0.3), transparent);
    animation: starTwinkle 3s ease-in-out infinite alternate;
}
@keyframes starTwinkle {
    0% { opacity: 0.8; }
    100% { opacity: 1; }
}
#intro-skip {
    position: absolute; top: 20px; right: 30px; z-index: 10001;
    background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.8);
    border: 1px solid rgba(255,255,255,0.3); padding: 8px 20px;
    border-radius: 20px; font-size: 14px; cursor: pointer;
    transition: all 0.3s;
}
#intro-skip:hover { background: rgba(255,255,255,0.2); color: #fff; border-color: rgba(255,255,255,0.6); }
.crawl-text {
    position: absolute; top: 100%; left: 50%;
    width: 60%; max-width: 720px; transform: translateX(-50%) perspective(800px) rotateX(10deg);
    transform-origin: top center; color: #ffd700;
    font-family: "PingFang SC","Microsoft YaHei","SimHei",sans-serif;
    text-align: left;
    animation: crawl 60s linear forwards;
    padding: 0 20px;
    writing-mode: horizontal-tb;
}
.crawl-text h1 { font-size: 50px; font-weight: 700; margin-bottom: 10px; letter-spacing: 10px; color: #ffd700; text-shadow: 0 0 40px rgba(255,215,0,0.6); text-align: center; }
.crawl-text h2 { font-size: 32px; margin-bottom: 50px; color: #ffd700; font-weight: 400; letter-spacing: 6px; text-align: center; }
.crawl-credits { margin-bottom: 50px; text-align: left; }
.crawl-credits p { font-size: 13px; line-height: 1.8; margin-bottom: 6px; color: rgba(255,215,0,0.5); text-shadow: none; letter-spacing: 1px; }
.crawl-text p { font-size: 20px; line-height: 2.4; margin-bottom: 28px; color: #ffe680; text-shadow: 0 0 12px rgba(255,215,0,0.15); letter-spacing: 1.5px; }
.crawl-text p.crawl-end { color: rgba(255,255,255,0.4); font-size: 15px; margin-top: 60px; text-align: left; letter-spacing: 2px; }
.crawl-text em { font-style: normal; font-size: 26px; color: #fff; font-weight: 600; }
@keyframes crawl {
    0%   { transform: translateX(-50%) perspective(800px) rotateX(10deg) translateY(0); }
    100% { transform: translateX(-50%) perspective(800px) rotateX(10deg) translateY(-4000px); }
}

/* ═══ 纠错页面 ═══ */
.correct-page { overflow: hidden; }
.back-link {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}
.back-link:hover { color: #ffd700; }
#correct-layout { display: flex; height: calc(100vh - var(--header-height)); }
#correct-sidebar {
    width: 320px; min-width: 320px;
    background: var(--card-bg);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    padding: 16px;
}
#correct-map { flex: 1; }
#case-info-box h3 { font-size: 16px; margin-bottom: 8px; }
#case-info-box .case-meta { font-size: 12px; color: var(--text-secondary); display: flex; gap: 12px; margin-bottom: 4px; }
#case-info-box .case-meta-coords { font-size: 11px; color: var(--gray-4); font-family: monospace; }
.loading-text { color: var(--text-secondary); font-size: 13px; padding: 20px 0; }
.error-text { color: var(--danger); font-size: 13px; padding: 20px 0; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 4px; }
.form-group .hint { font-weight: 400; color: var(--gray-4); font-size: 11px; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 6px; font-size: 13px;
    outline: none; transition: border-color 0.2s;
    font-family: inherit;
}
.form-group input:focus, .form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(45,140,240,0.1);
}
.form-group textarea { resize: vertical; min-height: 60px; }
#submit-btn {
    width: 100%; padding: 10px;
    background: var(--primary); color: #fff;
    border: none; border-radius: 8px;
    font-size: 14px; font-weight: 600;
    cursor: pointer; transition: background 0.2s;
}
#submit-btn:hover { background: var(--primary-dark); }
#submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.form-msg { display: none; padding: 8px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 10px; }
.form-msg-success { background: var(--success-bg); color: var(--success); border: 1px solid #8acf6e; }
.form-msg-error { background: var(--danger-bg); color: var(--danger); border: 1px solid #ffb4af; }
.map-search {
    position: fixed; top: 70px; right: 20px;
    display: flex; gap: 4px;
    z-index: 10;
}
.map-search input {
    padding: 7px 12px; border: 1px solid #ccc;
    border-radius: 6px; font-size: 13px; width: 200px;
    outline: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.map-search input:focus { border-color: var(--primary); }
.map-search button {
    padding: 7px 12px; background: var(--primary); color: #fff;
    border: none; border-radius: 6px; cursor: pointer; font-size: 13px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.map-search button:hover { background: var(--primary-dark); }

/* 纠错标记 */
.marker-current {
    display: inline-block; font-size: 24px;
    filter: drop-shadow(0 2px 4px rgba(45,140,240,0.6));
}
.marker-proposed {
    display: inline-block; font-size: 24px;
    filter: drop-shadow(0 2px 4px rgba(245,34,45,0.6));
    cursor: grab;
}
.marker-proposed:active { cursor: grabbing; }

/* 纠错按钮 */
.modal-header-actions { display: flex; align-items: center; gap: 10px; }
.correction-btn {
    display: inline-block;
    padding: 3px 10px;
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid #f0d080;
    border-radius: 6px;
    font-size: 12px;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}
.correction-btn:hover { background: #fff3d6; border-color: var(--warning); color: #8250df; }
.content-btn { background: var(--primary-light); color: var(--primary); border-color: var(--primary-light); }
.content-btn:hover { background: #d0e8ff; border-color: var(--primary); color: var(--primary-hover); }
.photo-btn { background: #f9f0ff; color: #722ed1; border-color: #d3adf7; }
.photo-btn:hover { background: #efdbff; border-color: #722ed1; color: #531dab; }

/* 照片展示 */
.photo-section { padding-top: 4px; }
.photo-count { font-weight: 400; font-size: 11px; color: var(--text-secondary); margin-left: 4px; }
.photo-strip {
    display: flex; gap: 10px; overflow-x: auto;
    padding: 4px 0 8px; scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}
.photo-strip::-webkit-scrollbar { height: 4px; }
.photo-strip::-webkit-scrollbar-thumb { background: var(--gray-3); border-radius: 2px; }
.photo-strip-item {
    flex: 0 0 180px; cursor: pointer;
    border-radius: 8px; overflow: hidden;
    background: var(--gray-1); border: 1px solid var(--border);
    transition: transform 0.15s, box-shadow 0.15s;
    scroll-snap-align: start;
}
.photo-strip-item:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.photo-strip-item img {
    width: 180px; height: 120px; object-fit: cover; display: block;
}
.photo-strip-desc {
    display: block; padding: 4px 8px;
    font-size: 11px; color: var(--text-secondary);
    line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 图片灯箱 */
#lightbox {
    display: none;
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.92); z-index: 10000;
    align-items: center; justify-content: center;
    cursor: pointer;
}
#lightbox.active { display: flex; }
.lightbox-close {
    position: absolute; top: 20px; right: 30px;
    background: rgba(255,255,255,0.15); color: #fff;
    border: none; width: 40px; height: 40px; border-radius: 50%;
    font-size: 20px; cursor: pointer; z-index: 1;
    transition: background 0.2s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.3); }
.lightbox-prev, .lightbox-next {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,0.12); color: #fff;
    border: none; width: 48px; height: 80px;
    font-size: 36px; cursor: pointer; z-index: 1;
    transition: background 0.2s;
}
.lightbox-prev { left: 10px; border-radius: 8px; }
.lightbox-next { right: 10px; border-radius: 8px; }
.lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,0.25); }
#lightbox-img {
    max-width: 85%; max-height: 80vh;
    object-fit: contain; border-radius: 6px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
#lightbox-desc {
    position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
    color: rgba(255,255,255,0.85); font-size: 14px;
    background: rgba(0,0,0,0.5); padding: 6px 16px;
    border-radius: 20px;
}

/* 多图上传 */
.photo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.photo-preview-item { position: relative; background: var(--gray-1); border-radius: 6px; padding: 6px; }
.photo-desc-input {
    width: 100%; margin-top: 6px; padding: 5px 8px;
    border: 1px solid var(--border); border-radius: 4px;
    font-size: 12px; outline: none;
}
.photo-desc-input:focus { border-color: var(--primary); }
.photo-remove {
    position: absolute; top: 8px; right: 8px;
    width: 22px; height: 22px; border: none; border-radius: 50%;
    background: rgba(0,0,0,0.5); color: #fff; font-size: 12px;
    cursor: pointer; line-height: 22px; text-align: center;
}
.photo-remove:hover { background: var(--danger); }

/* 纠错页面 Tab */
.tab-bar { display: flex; gap: 0; margin: -16px -16px 12px; border-bottom: 2px solid var(--border); }
.tab-btn {
    flex: 1; padding: 10px 0; border: none; background: none;
    font-size: 13px; font-weight: 600; cursor: pointer;
    color: var(--text-secondary); border-bottom: 2px solid transparent;
    margin-bottom: -2px; transition: all 0.2s;
}
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-btn:hover { color: var(--primary-dark); }

/* 内容纠错文本预览 */
.text-preview {
    background: var(--gray-1); border: 1px solid var(--border);
    border-radius: 6px; padding: 10px 12px;
    font-size: 12px; line-height: 1.7; color: var(--text-secondary);
    max-height: 180px; overflow-y: auto; white-space: pre-wrap;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
}
#proposed-text { min-height: 120px; }
.correction-form { padding-top: 8px; }

/* ═══ 管理后台 ═══ */
#admin-layout { display: flex; height: calc(100vh - var(--header-height)); }
#admin-sidebar {
    width: 320px; min-width: 320px;
    background: var(--card-bg); border-right: 1px solid var(--border);
    overflow-y: auto; display: flex; flex-direction: column;
}
#admin-detail { flex: 1; overflow-y: auto; padding: 20px; background: var(--bg); }
.empty-state { text-align: center; color: var(--text-secondary); padding: 100px 20px; font-size: 14px; }
.status-filters { display: flex; gap: 6px; }
.status-btn {
    flex: 1; padding: 6px 0; border: 1px solid var(--border);
    border-radius: 6px; background: #fff; font-size: 12px;
    cursor: pointer; transition: all 0.2s;
}
.status-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
#correction-list { flex: 1; overflow-y: auto; padding: 0 12px 12px; }
.corr-item {
    padding: 10px 12px; margin-bottom: 6px; border-radius: 8px;
    cursor: pointer; transition: all 0.2s; border: 1px solid transparent;
}
.corr-item:hover { background: var(--primary-light); border-color: var(--primary); }
.corr-title { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.corr-meta { font-size: 11px; color: var(--gray-4); }
.detail-card { background: #fff; border-radius: 12px; padding: 20px; box-shadow: var(--shadow); }
.detail-card h3 { font-size: 16px; margin-bottom: 16px; }
.detail-card h4 { font-size: 12px; color: var(--text-secondary); margin: 14px 0 6px; border-bottom: none; }
.detail-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13px; border-bottom: 1px solid var(--gray-1); }
.detail-row span:first-child { color: var(--text-secondary); }
.diff-table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 13px; }
.diff-table th, .diff-table td { padding: 8px 12px; border: 1px solid var(--border); text-align: left; }
.diff-table th { background: var(--gray-1); font-weight: 600; }
.diff-new { color: var(--success); font-weight: 600; background: var(--success-bg); }
.text-box {
    background: var(--gray-1); border: 1px solid var(--border);
    border-radius: 8px; padding: 12px; font-size: 13px;
    line-height: 1.8; max-height: 300px; overflow-y: auto;
    white-space: pre-wrap;
}
.text-box.new { background: var(--success-bg); border-color: #8acf6e; }
.action-bar { margin-top: 16px; display: flex; gap: 10px; }
.btn-approve, .btn-reject {
    padding: 8px 20px; border: none; border-radius: 8px;
    font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.btn-approve { background: var(--success); color: #fff; }
.btn-approve:hover { background: #1a5e29; }
.btn-reject { background: var(--danger); color: #fff; }
.btn-reject:hover { background: #991b1b; }
.status-badge { display: inline-block; padding: 4px 12px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.status-badge.approved { background: var(--success-bg); color: var(--success); }
.status-badge.rejected { background: var(--danger-bg); color: var(--danger); }
.submit-btn { background: var(--primary); color: #fff; padding: 10px; border: none; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; width: 100%; }

/* ═══ 照片逐行上传 ═══ */
.photo-row {
    display: flex; align-items: center; gap: 12px;
    padding: 12px; margin-bottom: 8px;
    background: var(--gray-0); border: 1px solid var(--border);
    border-radius: 8px;
}
.photo-row.done { background: var(--success-bg); border-color: #8acf6e; }
.photo-upload-area { flex-shrink: 0; }
.upload-label {
    display: inline-block; padding: 6px 16px;
    background: var(--primary); color: #fff;
    border-radius: 6px; font-size: 13px; cursor: pointer;
}
.upload-label:hover { background: var(--primary-dark); }
.photo-fields { display: flex; flex: 1; gap: 10px; align-items: center; }
.photo-thumb { width: 80px; height: 60px; flex-shrink: 0; }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }
.photo-inputs { flex: 1; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.photo-inputs .photo-desc-input { flex: 1; min-width: 150px; }
.photo-done-text { font-size: 13px; color: var(--success); line-height: 1.5; }
.btn-confirm, .btn-cancel {
    padding: 4px 12px; border-radius: 4px; border: none; font-size: 12px; cursor: pointer;
}
.btn-confirm { background: var(--success); color: #fff; }
.btn-confirm:hover { background: #2d5a42; }
.btn-cancel { background: var(--gray-2); color: var(--text); }
.btn-cancel:hover { background: var(--gray-3); }
.add-row-btn {
    width: 100%; padding: 10px; border: 1px dashed var(--border);
    border-radius: 8px; background: transparent; color: var(--text-secondary);
    font-size: 13px; cursor: pointer; margin-bottom: 8px;
}
.add-row-btn:hover { border-color: var(--primary); color: var(--primary); }