:root {
    --primary: #4361EE;
    --primary-dark: #3A56D4;
    --primary-deep: #2B3EA8;
    --primary-bg: #EEF2FF;
    --primary-light: #DDE4FF;
    --accent: #06D6A0;
    --accent-bg: #E6FBF4;
    --warn: #FF9F1C;
    --card: #FFFFFF;
    --bg: #F4F6FB;
    --text-1: #1A1D2E;
    --text-2: #5F6680;
    --text-3: #9DA3B8;
    --border: #E8ECF4;
    --radius: 14px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 24px rgba(67,97,238,0.12);
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text-2);
    min-height: 100dvh;
    padding-bottom: calc(24px + var(--safe-bottom));
    -webkit-font-smoothing: antialiased;
}

/* ===== Header ===== */
.header {
    background: linear-gradient(160deg, #3A0CA3 0%, #4361EE 40%, #4CC9F0 100%);
    padding: calc(var(--safe-top) + 24px) 20px 40px;
    position: relative;
    overflow: hidden;
}
.header::before {
    content: '';
    position: absolute; top: -40%; right: -20%;
    width: 280px; height: 280px;
    background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 70%);
    pointer-events: none;
}
.header::after {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0;
    height: 28px; background: var(--bg);
    border-radius: 28px 28px 0 0;
}
.header-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; position: relative; z-index: 1; }
.header h1 {
    font-size: 26px; font-weight: 700; color: #fff;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.header-badge {
    font-size: 10px; background: rgba(255,255,255,0.18);
    color: rgba(255,255,255,0.95); padding: 4px 12px;
    border-radius: 12px; font-weight: 500;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.header .stats {
    font-size: 13px; color: rgba(255,255,255,0.7);
    margin-top: 4px; position: relative; z-index: 1;
}

/* ===== 状态栏（统计卡片）===== */
.status-row {
    display: flex; gap: 10px;
    margin: -18px 14px 14px;
    position: relative; z-index: 2;
}
.status-item {
    flex: 1; background: var(--card);
    border-radius: 14px; padding: 14px 6px 12px;
    text-align: center;
    box-shadow: var(--shadow-md);
    min-width: 0;
    transition: transform 0.2s, box-shadow 0.2s;
}
.status-item:active { transform: scale(0.97); }
.status-num {
    font-size: clamp(20px, 6vw, 28px);
    font-weight: 800; color: var(--primary);
    line-height: 1.1; letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.status-lbl {
    font-size: clamp(9px, 2.5vw, 11px);
    color: var(--text-3); margin-top: 4px;
    font-weight: 500; letter-spacing: 0.3px;
}

/* ===== 搜索栏 ===== */
.search-bar {
    margin: 0 14px 14px;
    background: var(--card);
    border-radius: 12px;
    height: 46px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    box-shadow: var(--shadow-sm);
    border: 1.5px solid var(--border);
    transition: border-color 0.25s, box-shadow 0.25s, transform 0.15s;
}
.search-bar:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(67,97,238,0.1);
    transform: translateY(-1px);
}
.search-bar input {
    flex: 1; border: none; outline: none;
    font-size: 14px; background: transparent; color: var(--text-1);
    min-width: 0; font-weight: 500;
}
.search-bar input::placeholder { color: var(--text-3); font-weight: 400; }
.search-bar svg { color: var(--text-3); flex-shrink: 0; transition: color 0.2s; }
.search-bar:focus-within svg { color: var(--primary); }

/* ===== 分类标签 ===== */
.tags {
    display: flex; gap: 8px;
    padding: 0 14px 14px;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.tags::-webkit-scrollbar { display: none; }
.tag {
    flex-shrink: 0;
    padding: 7px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    background: var(--card);
    color: var(--text-2);
    border: 1.5px solid var(--border);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
    white-space: nowrap;
    user-select: none;
}
.tag:active { transform: scale(0.95); }
.tag.on {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

/* ===== 列表 ===== */
.list { padding: 0 14px; }

/* ===== 卡片 ===== */
.card {
    background: var(--card);
    border-radius: var(--radius);
    margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow 0.25s, transform 0.15s;
}
.card:active { box-shadow: var(--shadow-md); transform: scale(0.99); }

.card-main {
    padding: 16px 16px 14px;
    display: flex; gap: 14px;
}

.card-icon {
    width: 46px; height: 46px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary-bg), var(--primary-light));
    color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.8);
}
.card-icon svg { width: 22px; height: 22px; }

.card-icon-wrap {
    display: flex; flex-direction: column; align-items: center;
    flex-shrink: 0; gap: 6px;
}
.bdist {
    font-size: 10px; font-weight: 600; color: var(--primary);
    background: var(--primary-bg);
    padding: 1px 6px; border-radius: 6px;
    white-space: nowrap;
}

.card-content { flex: 1; min-width: 0; }

.card h3 {
    font-size: 16px; font-weight: 700; color: var(--text-1);
    line-height: 1.4;
    margin-bottom: 6px;
}

.dist-badge { display: none; }

.info {
    font-size: 13px; color: var(--text-2); line-height: 1.6;
    display: flex; align-items: flex-start; gap: 8px;
    margin-bottom: 5px;
}
.info:last-of-type { margin-bottom: 0; }
.info svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 3px; color: var(--text-3); }
.info span {
    flex: 1;
    min-width: 0;
    word-break: break-all;
    overflow-wrap: break-word;
}

/* ===== 卡片底部按钮 ===== */
.card-actions {
    display: flex;
    border-top: 1px solid var(--border);
}
.cbtn {
    flex: 1; display: flex; align-items: center; justify-content: center;
    gap: 6px; padding: 13px 0;
    font-size: 13px; font-weight: 600; text-decoration: none;
    color: var(--text-3); transition: all 0.15s;
    position: relative; overflow: hidden;
}
.cbtn::after {
    content: ''; position: absolute; inset: 0;
    background: transparent; transition: background 0.15s;
}
.cbtn:active::after { background: rgba(0,0,0,0.04); }
.cbtn svg { width: 16px; height: 16px; position: relative; z-index: 1; }
.cbtn + .cbtn { border-left: 1px solid var(--border); }
.cbtn.nav { color: var(--primary); }
.cbtn.nav:active { background: var(--primary-bg); }
.cbtn.tel { color: var(--accent); }
.cbtn.tel:active { background: var(--accent-bg); }

/* ===== 底部 ===== */
.footer {
    text-align: center; padding: 28px 16px 12px;
    font-size: 12px; color: var(--text-3);
    letter-spacing: 0.3px;
}
.footer b { font-weight: 600; color: var(--text-2); }

/* ===== 定位按钮 ===== */
.location-btn {
    position: fixed;
    bottom: calc(32px + var(--safe-bottom));
    right: 20px;
    width: 50px; height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    border: none;
    box-shadow: var(--shadow-lg), 0 0 0 4px rgba(67,97,238,0.1);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    z-index: 10;
    transition: transform 0.2s, box-shadow 0.2s;
}
.location-btn:active { transform: scale(0.9); box-shadow: var(--shadow-md); }
.location-btn svg { width: 22px; height: 22px; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2)); }

/* ===== 骨架屏 ===== */
.skeleton { background: var(--card); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.skeleton-line {
    height: 12px; border-radius: 6px;
    background: linear-gradient(90deg, #eee 25%, #e4e6ed 50%, #eee 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    margin-bottom: 10px;
}
.skeleton-title { width: 55%; height: 18px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
