/**
 * 老赖地图样式 — 对齐邻而帮主站风格
 * 主色：#00a2e3（主站主色蓝）
 * 背景：#f5f6f7（主站 --body-bg-color）
 * 圆角：8px（主站 --main-radius）
 * v2.5.78: 移除 InfoWindow 上的虚线边框（.alm-info-social 和 .alm-info-footer）
 * v2.5.77: 移动端抽屉列表移除 max-height 限制，由 flex:1 自然填满
 */

/* ==========================================
   CSS 变量
   ========================================== */
.alm-laolai-map {
    --alm-primary:       #00a2e3;
    --alm-primary-dark:  #0088c2;
    --alm-primary-light: rgba(0, 162, 227, 0.1);
    --alm-primary-glow:  rgba(0, 162, 227, 0.25);
    --alm-success:       #22c55e;
    --alm-warning:       #f59e0b;
    --alm-text:          #333;
    --alm-text-sub:      #777;
    --alm-text-muted:    #aaa;
    --alm-bg:            #f5f6f7;
    --alm-card-bg:       #fff;
    --alm-border:        rgba(50, 50, 50, 0.08);
    --alm-shadow:        rgba(116, 116, 116, 0.1);
    --alm-radius:        8px;
    --alm-radius-lg:     12px;
    --alm-font:          -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

/* ==========================================
   整体容器
   ========================================== */
.alm-cluster-map-wrap {
    width: 100%;
    font-family: var(--alm-font);
    color: var(--alm-text);
}

/* ==========================================
   地图页面全局隐藏装饰元素
   （放在通用区域，不受媒体查询限制）
   使用高优先级选择器确保能覆盖主题样式
   ========================================== */
html body.alm-is-map-page .wave,
html body.alm-is-map-page .waves,
html body.alm-is-map-page [class*="wave"]:not(.alm-),
html body.alm-is-map-page [class*="float-elem"],
html body.alm-is-map-page .decoration,
html body.alm-is-map-page .ornament,
html body.alm-is-map-page .divider,
html body.alm-is-map-page .separator,
html body.alm-is-map-page [class*="divider"],
html body.alm-is-map-page [class*="separator"],
html body.alm-is-map-page .bg-decoration,
html body.alm-is-map-page .section-decoration,
html body.alm-is-map-page .banner-decoration,
html body.alm-is-map-page .header-decoration,
html body.alm-is-map-page .footer-decoration,
html body.alm-is-map-page .shape,
html body.alm-is-map-page .shapes,
html body.alm-is-map-page [class*="shape"],
html body.alm-is-map-page .curve,
html body.alm-is-map-page .curves,
html body.alm-is-map-page [class*="curve"],
html body.alm-is-map-page .svg-decoration,
html body.alm-is-map-page .svg-wave,
html body.alm-is-map-page .svg-shape,
html body.alm-is-map-page [class*="decoration"],
html body.alm-is-map-page [id*="decoration"],
html body.alm-is-map-page [class*="ornament"],
html body.alm-is-map-page [id*="ornament"],
html body.alm-is-map-page [class*="banner-bg"],
html body.alm-is-map-page [class*="bg-banner"],
html body.alm-is-map-page [class*="bg-shape"],
/* 针对用户提供的 wiiuii_layout 和 editorial 波浪组件 */
html body.alm-is-map-page .wiiuii_layout,
html body.alm-is-map-page .wiiuii_layout *,
html body.alm-is-map-page .editorial,
html body.alm-is-map-page .editorial * {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    max-height: 0 !important;
    max-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    position: absolute !important;
    left: -9999px !important;
}

.alm-laolai-map {
    background: var(--alm-bg);
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
}

/* ==========================================
   顶部 Header — v2.5.62 已删除，改为悬浮工具栏
   ========================================== */

/* ==========================================
   悬浮工具栏（浮于地图内部顶部，PC/手机共用）
   v2.5.64: 改为 column 布局，内部有 .alm-toolbar-top 和 .alm-toolbar-stats-row
   z-index:995 确保高于天地图 canvas(990) 和 overlay(991)
   ========================================== */
.alm-map-toolbar-float {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 995;
    display: flex;
    flex-direction: column;
    gap: 6px;
    pointer-events: none; /* 容器本身不拦截点击 */
    max-width: calc(100% - 20px);
}

.alm-map-toolbar-float > * {
    pointer-events: auto; /* 子元素可交互 */
}

/* 工具栏第一行：定位按钮 + 搜索框 + 状态 */
.alm-toolbar-top {
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: auto;
}

/* 工具栏第二行：统计（紧跟"我的位置"按钮下方，左对齐） */
.alm-toolbar-stats-row {
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}

/* 紧凑型统计 pill（嵌在工具栏内） */
.alm-post-count-compact {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 11px;
    color: #777;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 4px 10px;
    border-radius: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.alm-post-count-compact strong {
    color: #00a2e3;
    font-size: 14px;
    font-weight: 700;
    margin: 0 2px;
}

/* 搜索框区域（悬浮版） */
.alm-map-filter-float {
    flex: 1;
    min-width: 0;
    position: relative;
}

.alm-map-filter-float::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23aaa' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") center/contain no-repeat;
}

#alm-search-input {
    width: 100%;
    padding: 9px 14px 9px 30px;
    border: 1.5px solid var(--alm-border);
    border-radius: var(--alm-radius);
    font-size: 13px;
    font-family: var(--alm-font);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--alm-text);
    transition: all 0.2s;
    box-sizing: border-box;
    outline: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

#alm-search-input:focus {
    border-color: var(--alm-primary);
    background: #fff;
    box-shadow: 0 0 0 3px var(--alm-primary-glow);
}

#alm-search-input::placeholder {
    color: var(--alm-text-muted);
}

/* 统计数 */
.alm-post-count {
    font-size: 12px;
    color: var(--alm-text-sub);
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.95);
    padding: 5px 12px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.alm-post-count strong {
    color: var(--alm-primary);
    font-size: 15px;
    font-weight: 700;
    margin: 0 2px;
}

/* 定位状态 */
.alm-location-status {
    font-size: 11px;
    color: var(--alm-text-sub);
    white-space: nowrap;
    background: rgba(255,255,255,0.9);
    padding: 4px 8px;
    border-radius: 10px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==========================================
   v2.5.65: 天地图缩放按钮定位到右上角
   天地图 API 生成的控件通常使用 .tdt-control-* 或类似的 class
   ========================================== */
#alm-cluster-map .tdt_ctrl_zoom,
#alm-cluster-map .tdt-control,
#alm-cluster-map [class*="tdt-control"],
#alm-cluster-map [class*="tdt_ctrl"],
#alm-cluster-map .control_zoom,
#alm-cluster-map .tianditu-control,
[id*="tianditu"] [class*="zoom"],
[class*="tianditu"] .zoom,
.tdt-control-zoom,
.tdt_ctrl_zoom {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    left: auto !important;
    bottom: auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    border-radius: 6px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
    border: 1px solid rgba(0,0,0,0.1) !important;
}

#alm-cluster-map .tdt_ctrl_zoom *,
#alm-cluster-map [class*="tdt-control"] *,
#alm-cluster-map .control_zoom *,
.tdt-control-zoom *,
.tdt_ctrl_zoom * {
    border-radius: 0 !important;
    margin: 0 !important;
}

/* 手机端缩放按钮同样在右上角，下移避开 header */
@media (max-width: 768px) {
    #alm-cluster-map .tdt_ctrl_zoom,
    #alm-cluster-map [class*="tdt-control"],
    #alm-cluster-map .control_zoom,
    .tdt-control-zoom,
    .tdt_ctrl_zoom {
        top: 60px !important;
    }
}

/* ==========================================
   按钮
   ========================================== */
.alm-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border: none;
    border-radius: var(--alm-radius);
    font-size: 14px;
    font-weight: 500;
    font-family: var(--alm-font);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.4;
}

.alm-btn-primary {
    background: var(--alm-primary);
    color: #fff;
    box-shadow: 0 2px 8px var(--alm-primary-glow);
}

.alm-btn-primary:hover {
    background: var(--alm-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px var(--alm-primary-glow);
}

.alm-btn-primary:active {
    transform: translateY(0);
}

.alm-btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.alm-btn-nav {
    background: #10b981;
    color: #fff;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.alm-btn-nav:hover {
    background: #059669;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.alm-btn-locate svg {
    stroke: currentColor;
    flex-shrink: 0;
}

/* ==========================================
   地图区域 — PC 端 flex 并排布局
   v2.5.61: sidebar 不再叠加在地图上（absolute），
   改为与地图并排（flex），彻底消除 z-index 竞争。
   天地图 T.Map 的内部 DOM 再高的 z-index 也不会影响 sidebar。
   ========================================== */
.alm-map-container {
    display: flex;
    flex-direction: row;
    position: relative;
    overflow: hidden;
    /* height 由 PHP 内联样式设置 */
}

/* 地图本体：flex 填满剩余宽度 */
.alm-map-wrapper {
    flex: 1 1 auto;
    position: relative;
    overflow: hidden;
    min-width: 0;
}

#alm-cluster-map {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* v2.5.68: 背景色消除透明缝隙 */
    background: #e8e8e8;
    overflow: hidden;
}

/* ==========================================
   地图统计信息（绝对定位，在 .alm-map-wrapper 内部）
   v2.5.64: 已隐藏——统计已移至工具栏内（.alm-toolbar-stats-row）
   此元素保留但默认隐藏，防止旧引用仍存在
   ========================================== */
.alm-map-stats {
    /* v2.5.64: 隐藏（已迁移到工具栏内） */
    display: none;
}

.alm-map-stats .alm-post-count {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 6px 14px;
    border-radius: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

/* ==========================================
   侧边栏 — PC 端：flex 列，与地图并排
   v2.5.61: 不再使用 position:absolute 叠在地图上，
   完全独立的 flex 列，天地图 DOM 无法影响它。
   ========================================== */
.alm-nearby-sidebar {
    flex: 0 0 340px;
    width: 340px;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--alm-card-bg);
    border-left: 1px solid var(--alm-border);
    position: relative;
    z-index: 1;
    pointer-events: auto;
}

/* sidebar 内所有子元素均可点击 */
.alm-nearby-sidebar > * {
    pointer-events: auto;
}

.alm-sidebar-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--alm-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--alm-card-bg);
    flex-shrink: 0;
}

.alm-sidebar-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--alm-text);
}

.alm-sidebar-header .alm-icon {
    font-size: 16px;
}

.alm-sort-select {
    font-size: 12px;
    color: var(--alm-primary);
    background: var(--alm-primary-light);
    border: 1px solid var(--alm-primary);
    padding: 3px 8px;
    border-radius: 12px;
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    max-width: 130px;
    font-family: inherit;
}

.alm-sort-select:focus {
    border-color: var(--alm-primary);
    box-shadow: 0 0 0 2px var(--alm-primary-glow);
}

.alm-nearby-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px;
    scrollbar-width: thin;
    scrollbar-color: #ddd transparent;
    display: flex;
    flex-direction: column;
}

.alm-nearby-list::-webkit-scrollbar {
    width: 4px;
}

.alm-nearby-list::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 4px;
}

.alm-nearby-empty {
    text-align: center;
    padding: 36px 20px;
    color: var(--alm-text-muted);
    font-size: 13px;
    line-height: 1.6;
}

.alm-nearby-empty::before {
    content: '📭';
    display: block;
    font-size: 28px;
    margin-bottom: 10px;
}

/* 定位权限引导卡片 */
.alm-nearby-empty.alm-location-guide {
    padding: 24px 16px;
    background: #fff8f0;
    border: 1px solid #fde68a;
    border-radius: 8px;
    margin: 12px;
    text-align: left;
}

.alm-nearby-empty.alm-location-guide::before {
    content: none; /* 取消默认的 📭 */
}

.alm-location-guide-icon {
    font-size: 28px;
    text-align: center;
    margin-bottom: 8px;
}

.alm-location-guide-title {
    font-size: 14px;
    font-weight: 600;
    color: #b45309;
    text-align: center;
    margin-bottom: 10px;
}

.alm-location-guide-text {
    font-size: 12px;
    color: #78716c;
    line-height: 1.8;
}

/* 定位中加载动画 */
.alm-nearby-empty.alm-locating-indicator {
    padding: 32px 20px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    margin: 12px;
    text-align: center;
}

.alm-nearby-empty.alm-locating-indicator::before {
    content: none;
}

.alm-locating-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e0f2fe;
    border-top-color: #00a2e3;
    border-radius: 50%;
    animation: alm-spin 0.8s linear infinite;
    margin: 0 auto 10px;
}

@keyframes alm-spin {
    to { transform: rotate(360deg); }
}

.alm-locating-text {
    font-size: 14px;
    font-weight: 600;
    color: #0369a1;
    margin-bottom: 6px;
}

.alm-locating-hint {
    font-size: 12px;
    color: #64748b;
    line-height: 1.6;
}

/* ==========================================
   老赖卡片
   ========================================== */
.alm-nearby-item {
    position: relative;
    padding: 12px 14px;
    margin-bottom: 8px;
    background: var(--alm-card-bg);
    border-radius: var(--alm-radius);
    border: 1.5px solid var(--alm-border);
    cursor: pointer;
    transition: all 0.2s;
}

.alm-nearby-item:last-child {
    margin-bottom: 0;
}

.alm-nearby-item:hover {
    border-color: var(--alm-primary);
    box-shadow: 0 2px 12px var(--alm-primary-glow);
    transform: translateY(-1px);
}

.alm-nearby-item.active {
    border-color: var(--alm-primary);
    background: var(--alm-primary-light);
}

.alm-nearby-item.nearest {
    border-color: var(--alm-primary);
    border-width: 1.5px;
}

.alm-nearby-item.nearest::after {
    content: "最近";
    position: absolute;
    top: -1px;
    right: -1px;
    background: var(--alm-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 0 7px 0 7px;
    letter-spacing: 0.5px;
}

/* ==========================================
   老赖卡片 — 真正的左右两栏布局
   ========================================== */
.alm-nearby-item {
    position: relative;
    display: flex;
    flex-direction: column;
}

/* 标题行：从左到右横跨整行 */
.alm-nearby-name-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    flex-shrink: 0;
    margin-bottom: 8px;
}

/* 左右两栏容器 */
.alm-nearby-body {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

/* 左边：单张缩略图 */
.alm-nearby-left {
    flex-shrink: 0;
    width: 118px;
    height: 110px;
    display: flex;
    align-items: flex-start;
    background: var(--alm-bg);
    border-radius: var(--alm-radius);
    overflow: hidden;
}

.alm-nearby-left img {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--alm-border);
}

.alm-nearby-left:empty {
    display: none;
}

/* 右边：摘要+地址+赏金 */
.alm-nearby-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* 底部行：从左到右横跨整行 */
.alm-nearby-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--alm-border);
}

/* 第一行：标题 */
.alm-nearby-name-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    flex-shrink: 0;
}

.alm-nearby-name-row a {
    font-weight: 600;
    font-size: 14px;
    color: var(--alm-text);
    text-decoration: none;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.alm-nearby-name-row a:hover {
    color: var(--alm-primary);
}

.alm-nearby-distance {
    font-size: 11px;
    color: var(--alm-primary);
    font-weight: 600;
    white-space: nowrap;
    background: var(--alm-primary-light);
    padding: 2px 6px;
    border-radius: 10px;
    flex-shrink: 0;
}

/* 中间：摘要+地址+赏金 */
.alm-nearby-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.alm-nearby-excerpt {
    font-size: 11px;
    color: var(--alm-text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.alm-nearby-address {
    font-size: 11px;
    color: var(--alm-text-sub);
    margin-bottom: 4px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.alm-nearby-reward {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    margin-bottom: 4px;
    border: 1px solid #fcd34d;
}

.alm-nearby-judge-phone {
    font-size: 10px;
    color: var(--alm-text-sub);
    margin-bottom: 4px;
    line-height: 1.4;
}

.alm-nearby-judge-phone a {
    color: var(--alm-primary);
    text-decoration: none;
    font-weight: 600;
}

.alm-nearby-judge-phone a:hover {
    text-decoration: underline;
}

/* ==========================================
   图片预览弹窗
   ========================================== */
.alm-image-preview-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.alm-image-preview-modal.active {
    display: flex;
}

.alm-preview-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alm-preview-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.alm-preview-image {
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
}

.alm-preview-nav {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.alm-preview-nav button {
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.alm-preview-nav button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.alm-preview-counter {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-bottom: 10px;
}

/* 地图弹窗图片画廊 */
.alm-info-images {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #ddd transparent;
}

.alm-info-images::-webkit-scrollbar {
    height: 3px;
}

.alm-info-images::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

.alm-info-images img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--alm-border);
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.alm-info-images img:hover {
    border-color: var(--alm-primary);
    transform: scale(1.05);
}

.alm-nearby-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 6px;
}

.alm-nearby-date {
    font-size: 10px;
    color: var(--alm-text-muted);
    flex-shrink: 0;
}

.alm-nearby-actions {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.alm-nearby-actions a {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.15s;
    line-height: 1.4;
}

.alm-nearby-actions .alm-view {
    background: var(--alm-primary);
    color: #fff;
}

.alm-nearby-actions .alm-view:hover {
    background: var(--alm-primary-dark);
}

.alm-nearby-actions .alm-nav {
    background: var(--alm-bg);
    color: var(--alm-text-sub);
    border: 1px solid var(--alm-border);
}

.alm-nearby-actions .alm-nav:hover {
    background: #ecfdf5;
    color: #059669;
    border-color: #6ee7b7;
}

/* ==========================================
   地图信息弹窗 — 与侧边栏卡片布局一致
   ========================================== */
.alm-info-window {
    padding: 16px 18px 14px;
    max-width: 480px;
    min-width: 400px;
    font-family: var(--alm-font);
}

/* 标题行 */
.alm-info-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--alm-text);
    line-height: 1.4;
    margin-bottom: 10px;
}

.alm-info-title a {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    border-bottom: 1px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}

.alm-info-title a:hover {
    color: var(--alm-primary);
    border-bottom-color: var(--alm-primary);
}

/* 左右两栏容器 */
.alm-info-body {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 10px;
}

/* 左边：单张缩略图 */
.alm-info-left {
    flex-shrink: 0;
    width: 118px;
    height: 110px;
    display: flex;
    background: var(--alm-bg);
    border-radius: var(--alm-radius);
    overflow: hidden;
}

.alm-info-thumb img {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--alm-border);
}

.alm-info-left:empty {
    display: none;
}

/* 右边：摘要+地址+赏金 */
.alm-info-right {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.alm-info-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.alm-info-tag {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--alm-bg);
    color: var(--alm-text-sub);
    border: 1px solid var(--alm-border);
}

.alm-info-address {
    font-size: 12px;
    color: var(--alm-text-sub);
    line-height: 1.5;
    padding: 6px 8px;
    background: var(--alm-bg);
    border-radius: 6px;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.alm-info-excerpt {
    font-size: 11px;
    color: var(--alm-text-muted);
    line-height: 1.5;
    margin-bottom: 4px;
}

.alm-info-judge-phone {
    font-size: 11px;
    color: var(--alm-text-sub);
    margin-bottom: 4px;
    line-height: 1.4;
}

.alm-info-judge-phone a {
    color: var(--alm-primary);
    text-decoration: none;
    font-weight: 600;
}

.alm-info-judge-phone a:hover {
    text-decoration: underline;
}

.alm-info-reward {
    background: linear-gradient(135deg, #fef9ec 0%, #fef3c7 100%);
    border: 1px solid #fcd34d;
    border-radius: 8px;
    padding: 6px 8px;
    font-size: 11px;
    font-weight: 600;
    color: #92400e;
}

.alm-info-reward-label {
    font-size: 12px;
    color: #92400e;
}

.alm-info-reward-value {
    font-size: 15px;
    font-weight: 700;
    color: #b45309;
}

/* 互动按钮行 */
.alm-info-social {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
    padding: 6px 0;
    /* v2.5.78: 移除虚线边框 */
}

/* 底部行：时间+操作按钮 */
.alm-info-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding-top: 8px;
    /* v2.5.78: 移除虚线边框 */
}

.alm-info-date {
    font-size: 11px;
    color: var(--alm-text-muted);
    flex-shrink: 0;
}

.alm-info-actions {
    display: flex;
    gap: 6px;
}

.alm-info-actions a {
    flex: 1;
    text-align: center;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s;
    font-family: var(--alm-font);
}

.alm-info-view {
    background: var(--alm-primary);
    color: #fff;
}

.alm-info-view:hover {
    background: var(--alm-primary-dark);
}

.alm-info-nav {
    background: var(--alm-bg);
    color: #059669;
    border: 1.5px solid #6ee7b7;
}

.alm-info-nav:hover {
    background: #ecfdf5;
}

/* ==========================================
   信息弹窗 — 次要互动按钮
   ========================================== */
.alm-info-social {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 10px;
    padding: 6px 0;
    border-bottom: 1px solid var(--alm-border);
}

.alm-social-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border: 1px solid var(--alm-border);
    border-radius: 16px;
    background: var(--alm-bg);
    color: var(--alm-text-sub);
    font-size: 11px;
    font-family: var(--alm-font);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    text-decoration: none;
    line-height: 1.4;
}

.alm-social-btn svg {
    flex-shrink: 0;
}

.alm-social-btn:hover {
    background: var(--alm-card-bg);
    color: var(--alm-text);
    border-color: #bbb;
}

/* 收藏按钮 */
.alm-social-fav.active {
    color: #ef4444;
    border-color: #fca5a5;
    background: #fff5f5;
}

.alm-social-fav.active svg {
    fill: #ef4444;
    stroke: #ef4444;
}

/* 点赞按钮 */
.alm-social-like.active {
    color: #f59e0b;
    border-color: #fcd34d;
    background: #fffbeb;
}

.alm-social-like.active svg {
    fill: #f59e0b;
    stroke: #f59e0b;
}

/* 分享按钮 */
.alm-social-share.active {
    color: var(--alm-primary);
    border-color: var(--alm-primary-light);
    background: var(--alm-primary-light);
}

/* 回复按钮 */
.alm-social-reply:hover {
    color: var(--alm-primary);
    border-color: var(--alm-primary-light);
}

/* ==========================================
   内联地图
   ========================================== */
.alm-inline-map-wrap {
    margin: 24px 0;
    background: var(--alm-card-bg);
    border-radius: var(--alm-radius-lg);
    overflow: hidden;
    box-shadow: 0 2px 12px var(--alm-shadow);
    border: 1px solid var(--alm-border);
    position: relative;
    z-index: 1;
}

.alm-inline-map-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--alm-border);
}

.alm-inline-map-header .alm-icon {
    font-size: 18px;
}

.alm-inline-map-header h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--alm-text);
}

.alm-inline-map {
    width: 100%;
    min-height: 300px;
    position: relative;
}

/* 确保高德地图容器正确显示 */
.alm-inline-map .amap-container,
.alm-inline-map .amap-layer,
.alm-inline-map iframe {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

.alm-inline-locations {
    padding: 14px 18px;
    background: var(--alm-bg);
}

.alm-location-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    margin-bottom: 8px;
    background: var(--alm-card-bg);
    border-radius: var(--alm-radius);
    border: 1px solid var(--alm-border);
}

.alm-location-item:last-child {
    margin-bottom: 0;
}

.alm-location-marker {
    width: 26px;
    height: 26px;
    background: var(--alm-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

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

.alm-location-address {
    font-size: 14px;
    color: var(--alm-text);
    margin-bottom: 4px;
    line-height: 1.4;
}

.alm-location-coords {
    font-size: 11px;
    color: var(--alm-text-muted);
}

/* ==========================================
   高德地图覆盖
   ========================================== */
.amap-marker-label {
    border: none !important;
    background: none !important;
}

.amap-info-content {
    padding: 0 !important;
    border-radius: 10px !important;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important;
    border: 1px solid var(--alm-border, rgba(50,50,50,0.08)) !important;
}

.amap-info-close {
    right: 8px !important;
    top: 8px !important;
    color: #999 !important;
    font-size: 16px !important;
}

.amap-info-outer {
    border-radius: 10px !important;
}

/* ==========================================
   响应式
   ========================================== */
@media (max-width: 900px) {
    .alm-nearby-sidebar {
        width: 260px;
    }
}

/* ==========================================
   移动端优化 — 全屏地图 + 底部卡片
   ========================================== */
@media (max-width: 768px) {
    /* 隐藏主题悬浮联系组件（微信、QQ、邮箱等） */
    .float-icon,
    .float-contact,
    .contact-float,
    .sidebar-slide,
    .slide-bar,
    .siderbar-float,
    [class*="float-"],
    [class*="contact-"],
    [id*="float-"],
    [id*="contact-"],
    .zib-widget,
    .suscribe,
    .subscribe-box,
    .attention,
    .follow-us,
    .share-box,
    .social-box,
    .tool-bar,
    .toolbar,
    .fixed-wp,
    .wp-footer,
    .footer-fixed,
    .footer-avatar,
    .footer-user,
    .footer-con,
    .footer-bottom,
    .footer,
    #footer,
    .site-footer {
        display: none !important;
    }

    /* 隐藏波浪、动效、装饰元素 - 仅限地图页面 */
    .alm-is-map-page .wave,
    .alm-is-map-page .waves,
    .alm-is-map-page [class*="wave"],
    .alm-is-map-page [class*="float-elem"],
    .alm-is-map-page .decoration,
    .alm-is-map-page .ornament,
    .alm-is-map-page .divider,
    .alm-is-map-page .separator,
    .alm-is-map-page [class*="divider"],
    .alm-is-map-page [class*="separator"],
    .alm-is-map-page .bg-decoration,
    .alm-is-map-page .section-decoration,
    .alm-is-map-page .banner-decoration,
    .alm-is-map-page .header-decoration,
    .alm-is-map-page .footer-decoration,
    .alm-is-map-page .shape,
    .alm-is-map-page .shapes,
    .alm-is-map-page [class*="shape"],
    .alm-is-map-page .curve,
    .alm-is-map-page .curves,
    .alm-is-map-page [class*="curve"],
    .alm-is-map-page .svg-decoration,
    .alm-is-map-page .svg-wave,
    .alm-is-map-page .svg-shape {
        display: none !important;
    }

    /* 隐藏所有可能的装饰性背景元素 - 仅限地图页面 */
    .alm-is-map-page [class*="decoration"],
    .alm-is-map-page [id*="decoration"],
    .alm-is-map-page [class*="ornament"],
    .alm-is-map-page [id*="ornament"],
    .alm-is-map-page [class*="banner-bg"],
    .alm-is-map-page [class*="bg-banner"],
    .alm-is-map-page [class*="bg-shape"] {
        display: none !important;
        visibility: hidden !important;
    }

    /* 写死隐藏 wiiuii 主题的波浪装饰 - 仅限地图页面 */
    .alm-is-map-page .wiiuii_layout,
    .alm-is-map-page .wiiuii_layout *,
    .alm-is-map-page .editorial,
    .alm-is-map-page .editorial * {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
        position: absolute !important;
        left: -9999px !important;
    }

    /* 重置容器尺寸 */
    .alm-laolai-map {
        border-radius: 0;
        margin: 0;
        box-shadow: none;
        position: relative;
    }

    .alm-cluster-map-wrap {
        max-width: 100%;
        padding: 0;
    }

    /* 地图全屏：mobile 下 map-container 改为 block，map-wrapper 全屏 */
    .alm-map-container {
        display: block;
        position: fixed !important;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100% !important;
        height: 100% !important;
        z-index: 1;
        /* 必须 overflow:visible，否则绝对定位的 sidebar 溢出部分被裁掉 */
        overflow: visible !important;
    }

    /* map-wrapper 撑满整个 map-container */
    .alm-map-wrapper {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        overflow: hidden;
    }

    #alm-cluster-map {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

    /* iOS Safari dvh 支持 */
    @supports (height: 100dvh) {
        #alm-cluster-map {
            height: 100dvh;
        }
    }

    /* ==========================================
       v2.5.64: 手机端工具栏下移，避开网站顶部 header
       ========================================== */
    .alm-map-toolbar-float {
        top: 60px;  /* 避开网站顶部 header（约50-60px） */
        left: 10px;
        right: auto;
    }

    /* 紧凑型统计（工具栏内嵌）手机端样式 */
    .alm-post-count-compact {
        font-size: 10px;
        padding: 3px 8px;
    }

    .alm-post-count-compact strong {
        font-size: 13px;
    }



    /* 侧边栏：移动端底部抽屉
     * v2.5.67: position:fixed 确保固定在视口底部，拖拽时不受影响
     * bottom:50px 贴近底部固定导航栏（导航栏约50px）
     * 顶部圆角 16px，灰色把手条
     */
    .alm-nearby-sidebar {
        position: fixed !important;  /* v2.5.67: fixed 确保固定在视口 */
        bottom: 50px;  /* v2.5.67: 贴近底部固定导航栏 */
        left: 0;
        right: 0;
        width: 100%;
        /* v2.5.66: 恢复顶部圆角 */
        border-radius: 16px 16px 0 0;
        border-left: none;
        border-top: 1px solid var(--alm-border);
        box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
        z-index: 999;
        display: flex;
        flex-direction: column;
        /* iOS 安全区域适配 */
        padding-bottom: env(safe-area-inset-bottom, 0px);
        /* v2.5.69: 调整为 65vh，更接近搜索框下方 */
        max-height: 65vh;
        overflow: hidden;
        /* 重置 PC 端的 flex 子项属性 */
        flex: none;
        height: auto;
        /* 背景色确保不透明 */
        background: var(--alm-card-bg);
    }

    /* 收起状态：40px 高度，拖动条醒目 */
    .alm-nearby-sidebar.collapsed {
        height: 40px;
        overflow: visible;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        /* v2.5.66: 恢复顶部圆角 */
        border-radius: 12px 12px 0 0;
    }

    /* 展开状态：固定高度，列表内滚动 */
    .alm-nearby-sidebar.expanded {
        height: calc(65vh - env(safe-area-inset-bottom, 0px));
        overflow: hidden;
    }

    /* ==========================================
       v2.5.66: 恢复 v2.0.60 经典拖动条样式（灰色把手条）
       ========================================== */
    .alm-sidebar-drag-handle {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 8px 0 0;
        cursor: pointer;
        flex-shrink: 0;
        height: 24px;
        background: transparent;
    }

    /* 灰色圆角把手条 */
    .alm-sidebar-drag-handle::before {
        content: '';
        width: 36px;
        height: 4px;
        background: #bbb;
        border-radius: 2px;
    }

    /* 收起状态下的拖动条：增加高度和点击面积 */
    .alm-nearby-sidebar.collapsed .alm-sidebar-drag-handle {
        padding-top: 8px;
        height: 32px;
    }

    /* 侧边栏头部 */
    .alm-sidebar-header {
        padding: 8px 14px 6px;
        flex-shrink: 0;
        gap: 6px;
    }

    .alm-sidebar-header h3 {
        font-size: 13px;
        flex-shrink: 0;
    }

    .alm-sort-select {
        font-size: 11px;
        max-width: 110px;
        padding: 2px 6px;
    }

    /* 列表区域 — 始终可滚动，由 flex:1 自然填满 sidebar 高度 */
    .alm-nearby-list {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        /* v2.5.77: 移除 max-height 限制，由 flex:1 自然填满，避免底部空白遮挡 */
        padding: 6px 12px;
        scrollbar-width: thin;
        scrollbar-color: #ddd transparent;
    }

    .alm-nearby-list::-webkit-scrollbar { width: 4px; }
    .alm-nearby-list::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }

    /* ==========================================
       老赖卡片（手机端优化）
       ========================================== */
    .alm-nearby-item {
        padding: 10px 12px;
        margin-bottom: 6px;
    }

    .alm-nearby-name-row a {
        font-size: 13px;
    }

    .alm-nearby-distance {
        font-size: 10px;
        padding: 1px 5px;
    }

    /* 手机端保持左右排列，调整尺寸适应小屏幕 */
    .alm-nearby-body {
        flex-direction: row;
        gap: 8px;
    }

    .alm-nearby-left {
        width: 88px;
        height: 88px;
        flex-shrink: 0;
    }

    .alm-nearby-left img {
        width: 80px;
        height: 80px;
    }

    .alm-nearby-footer {
        padding-top: 6px;
    }

    .alm-nearby-actions a {
        padding: 3px 8px;
        font-size: 10px;
    }

    /* ==========================================
       定位状态提示（手机端）
       ========================================== */
    .alm-location-status {
        display: none;
    }

    /* ==========================================
       地图信息弹窗（手机端适配）
       ========================================== */
    .amap-info-content {
        margin: 0;
    }

    .alm-info-window {
        max-width: 320px;
        min-width: 280px;
        padding: 12px 14px;
    }

    .alm-info-title {
        font-size: 14px;
        margin-bottom: 8px;
    }

    .alm-info-body {
        flex-direction: row;
        gap: 8px;
    }

    .alm-info-left {
        width: 88px;
        height: 88px;
        flex-shrink: 0;
    }

    .alm-info-thumb img {
        width: 80px;
        height: 80px;
    }

    .alm-info-right {
        width: 100%;
    }

    .alm-info-social {
        flex-wrap: wrap;
    }

    .alm-info-footer {
        flex-wrap: wrap;
        gap: 6px;
    }

    .alm-info-date {
        width: 100%;
    }

    .alm-info-actions {
        width: 100%;
    }

    .alm-info-actions a {
        font-size: 11px;
        padding: 5px 8px;
    }

    /* ==========================================
       收起状态：只显示拖动条
       ========================================== */
    .alm-nearby-sidebar.collapsed .alm-nearby-list,
    .alm-nearby-sidebar.collapsed .alm-sidebar-header {
        display: none;
    }

    /* 收起状态下的拖动条：增加高度和点击面积 */
    .alm-nearby-sidebar.collapsed .alm-sidebar-drag-handle {
        height: 32px;
    }

}
