/* ============================================
   枫桥镇手绘地图 · 游客端响应式样式
   方案C：PC(>=1024) 左栏+右图 / H5(<1024) 全屏图+底部抽屉
   设计语言：青绿山水 + 现代工具 UI（参考"好吃熊猫"成都地图）
   圆角体系：容器 16 / 卡片 12 / 输入 12 / 按钮&chip pill
   所有样式挂 .map-app 根类，防止污染其它页面
   ============================================ */

.map-app * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
.hidden { display: none !important; }
.map-app {
    --panel-w: 400px;
    --brand: #2f8f7a;          /* 主色：黛青（青绿山水） */
    --brand-deep: #1f6f5e;     /* 主色深档（hover/active） */
    --brand-soft: #e6f2ed;     /* 主色浅底 */
    --paper: #fbf8f1;          /* 面板纸感 */
    --ink: #33302f;           /* 主文字：墨色 */
    --ink-soft: #8a7f6a;       /* 次要文字 */
    --line: rgba(120, 100, 60, .14);
    --eat: #d9823f;            /* 吃：柿子橙(低饱和) */
    --hotel: #7a6db0;          /* 住：黛紫 */
    --hospital: #c85a66;       /* 医：朱红 */
    --scenic: #4c9a72;         /* 游：松绿 */
    --shadow: 0 8px 24px rgba(47, 90, 74, .10);
    --shadow-sm: 0 2px 8px rgba(47, 90, 74, .08);
    --radius: 12px;
    --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    position: fixed; inset: 0; overflow: hidden;
    font-family: var(--font);
    background: #f4efe4;
    color: #3a3226;
}

/* ---------- 品牌开场动画（splash 遮罩，数据就绪后淡出） ---------- */
.map-app .splash {
    position: fixed; inset: 0; z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(180deg, #fdfbf4 0%, #efe9d8 100%);
    transition: opacity .38s ease, transform .38s ease, visibility .38s;
}
.map-app .splash.out { opacity: 0; transform: translateY(-26px); visibility: hidden; }
.map-app .splash-inner { text-align: center; }
/* logo 图片（/static/logo.png，自带白底 → 作白卡片呈现） */
.map-app .splash-logo {
    width: 104px; height: 104px; margin: 0 auto 20px; border-radius: 20px;
    background: #fff; padding: 9px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 12px 30px rgba(47, 143, 122, .28);
    animation: splash-pop .7s cubic-bezier(.16, 1, .3, 1) both;
}
.map-app .splash-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.map-app .splash-title {
    font-size: 30px; font-weight: 800; letter-spacing: 10px; color: var(--ink);
    opacity: 0; animation: splash-up .6s ease .38s both;
}
.map-app .splash-sub {
    margin-top: 12px; font-size: 13px; letter-spacing: 5px; color: var(--ink-soft);
    opacity: 0; animation: splash-up .6s ease .66s both;
}
@keyframes splash-pop {
    0% { transform: scale(.5); opacity: 0; }
    60% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes splash-up {
    0% { transform: translateY(16px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

/* ---------- 顶部品牌条（H5 显示） ---------- */
.map-app .map-topbar {
    display: none;
    position: absolute; top: 0; left: 0; right: 0; z-index: 900;
    height: 52px; padding: 0 14px;
    align-items: center; justify-content: center;
    background: rgba(251, 248, 241, .94);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1px 12px rgba(60, 40, 10, .05);
}
.map-app .topbar-logo {
    flex: 0 0 30px; width: 30px; height: 30px; border-radius: 9px;
    background: linear-gradient(135deg, var(--brand), var(--brand-deep));
    color: #fff; font-size: 15px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    margin-right: 8px; box-shadow: var(--shadow-sm);
}
.map-app .map-topbar #topbarTitle { font-weight: 800; font-size: 16px; letter-spacing: 2px; color: var(--ink); }
.map-app .map-topbar .map-total { margin-left: 8px; font-size: 12px; font-weight: 500; color: var(--brand); }
.map-app .map-topbar #topbarTitle, .map-app .map-topbar .map-total { cursor: pointer; transition: opacity .15s; }
.map-app .map-topbar #topbarTitle:active, .map-app .map-topbar .map-total:active { opacity: .6; }
.map-app .map-topbar .hybrid-back {
    position: absolute; left: 10px; top: 8px; height: 36px; padding: 0 10px;
    border: 0; border-radius: 18px; background: rgba(255,255,255,.88);
    color: var(--brand); font: 600 14px/36px var(--font); cursor: pointer;
    box-shadow: 0 2px 8px rgba(47,90,74,.12);
}
.map-app .map-topbar .hybrid-back:hover { background: var(--brand-soft); }

/* ---------- 全局地图容器 ---------- */
/* 背景：与手绘图纸同色系的柔和米白，地图铺满容器时拖拽边缘不露硬块 */
.map-app #map { position: absolute; inset: 0; z-index: 100; background: #f7f2e6; }
.map-app .ol-viewport { font-family: var(--font); }

/* 地图右下角缩放控件（OpenLayers ol-zoom） */
.map-app .ol-zoom {
    position: absolute; top: auto; bottom: 18px; right: 12px; left: auto;
    background: none; padding: 0; border-radius: 10px; overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.map-app .ol-zoom button {
    display: block; width: 40px; height: 40px; line-height: 40px; margin: 0;
    border: 0; border-radius: 0; background: #fffdf7; color: #3a3226;
    font-family: var(--font); font-size: 20px; font-weight: 600;
    caret-color: transparent; cursor: pointer;
    transition: background .15s, color .15s;
}
.map-app .ol-zoom button + button { border-top: 1px solid var(--line); }
.map-app .ol-zoom button:hover { background: var(--brand-soft); color: var(--brand) !important; }

/* 地图/列表模式切换（H5 左下角） */
.map-app .map-toggle {
    position: absolute; left: 50%; bottom: 12px; z-index: 800;
    width: 132px; height: 38px; border-radius: 22px;
    border: 0; padding: 3px; background: rgba(255,255,255,.94); color: var(--ink); font-size: 16px; font-weight: 700;
    box-shadow: var(--shadow); cursor: pointer;
    display: none; align-items: center; justify-content: space-between;
    transform: translateX(-50%);
    transition: transform .18s ease, opacity .18s ease;
}
.map-app .map-toggle span { width: 50%; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 18px; }
.map-app .map-toggle .mode-map { background: var(--brand); color: #fff; }
.map-app .map-toggle.list-mode .mode-map { background: transparent; color: var(--ink); }
.map-app .map-toggle.list-mode .mode-list { background: var(--brand); color: #fff; }
.map-app .map-toggle.list-mode { transform: translate(-50%, 80px); opacity: 0; pointer-events: none; }
.map-app .map-toggle:active { transform: translateX(-50%) scale(.96); }

/* 背景音乐开关（右下角悬浮，位于缩放控件上方） */
.map-app .bgm-btn {
    position: fixed; right: 14px; bottom: 14px; z-index: 2000;
    width: 46px; height: 46px; border-radius: 50%;
    border: 0; background: rgba(35, 177, 176, .94); color: #42205d; font-size: 25px;
    box-shadow: var(--shadow); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: transform .18s ease, background .15s, opacity .18s ease;
}
.map-app .bgm-btn:active { transform: scale(.92); }
.map-app .bgm-btn.playing { background: var(--brand); color: #fff; animation: bgm-pulse 2.4s ease-in-out infinite; }
.map-app .bgm-btn.muted { opacity: .55; }
@keyframes bgm-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(47,143,122,.35); } 50% { box-shadow: 0 0 0 10px rgba(47,143,122,0); } }
/* 详情/小地图/抽屉打开时隐藏，避免遮挡内容 */
.map-app .bgm-btn.hide-when-cover { display: none; }

/* ---------- 点位 divIcon ---------- */
.map-app .spot-icon {
    position: relative;
    width: 140px; height: 78px;
    cursor: pointer; --spot-scale: 1;
    transform: translate(-50%, -46px);
}
.map-app .spot-icon .spot-pin {
    position: absolute; top: 0; left: 50%;
    width: 38px; height: 38px; border-radius: 50% 50% 50% 0;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid #fff; box-shadow: 0 3px 10px rgba(0, 0, 0, .22);
    background: #fff;
    transform: translateX(-50%) rotate(-45deg) scale(var(--spot-scale));
    transform-origin: center center;
    transition: transform .18s cubic-bezier(.16, 1, .3, 1);
}
.map-app .spot-icon:hover .spot-pin { transform: translateX(-50%) rotate(-45deg) scale(calc(var(--spot-scale) * 1.1)); }
.map-app .spot-icon .spot-pin::before {
    content: ''; position: absolute; inset: 4px; border: 1px solid rgba(255, 255, 255, .95);
    border-radius: 50%; pointer-events: none; transform: rotate(45deg);
}
.map-app .spot-icon .spot-pin .sicon {
    width: 26px; height: 26px; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    position: relative; z-index: 1; transform: rotate(45deg);
    overflow: hidden; border-radius: 50%; background: #fff;
}
.map-app .spot-icon .spot-pin .sicon img {
    width: 100%; height: 100%; border-radius: 50%;
    object-fit: contain; object-position: center; display: block;
}
/* 后台上传的自定义点位图统一裁成居中的正圆，避免横图、竖图显示形状不一致。 */
.map-app .spot-icon .spot-pin .sicon.custom-image img {
    object-fit: cover;
    clip-path: circle(50% at 50% 50%);
}
.map-app .spot-icon .spot-name {
    position: absolute; top: 45px; left: 50%;
    transform: translateX(-50%);
    padding: 2px 7px; border-radius: 4px;
    background: rgba(255, 255, 255, .6); color: #3a3226;
    font-size: 13px; font-weight: 700; letter-spacing: .1px;
    white-space: nowrap; line-height: 1.35;
    max-width: none; overflow: visible; text-overflow: clip;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .22);
    pointer-events: none;
}
/* 小地图点位数字角标（绑定了小地图的点位显示图内点位数量） */
.map-app .spot-icon .spot-mini-badge {
    position: absolute; top: -5px; right: -5px;
    min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px;
    background: var(--brand); color: #fff; font-size: 10px; font-weight: 700;
    font-style: normal; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    border: 1.5px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.map-app .spot-icon.active .spot-pin { transform: translateX(-50%) rotate(-45deg) scale(calc(var(--spot-scale) * 1.35)); box-shadow: 0 0 0 4px rgba(255, 255, 255, .65), 0 6px 16px rgba(0, 0, 0, .22); }
.map-app .spot-icon:hover .spot-name { max-width: none; }
/* ---------- popup 详情（OpenLayers Overlay） ---------- */
.map-app .ol-popup {
    position: absolute; min-width: 220px;
    border-radius: 14px; background: #fff; box-shadow: var(--shadow);
    transform: translate(-50%, calc(-100% - 18px));
    will-change: transform;
}
.map-app .ol-popup .popup-box { position: relative; padding: 14px 16px; }
.map-app .p-close {
    position: absolute; top: 8px; right: 8px; z-index: 2;
    width: 24px; height: 24px; border: 0; border-radius: 50%;
    background: var(--brand-soft); color: var(--brand);
    font-size: 14px; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s, transform .1s;
}
.map-app .p-close:hover { background: #d7e9e1; }
.map-app .p-close:active { transform: scale(.9); }
.map-app .ol-popup .popup-box .p-name { padding-right: 24px; }
.map-app .ol-popup::after {
    content: ""; position: absolute; left: 50%; bottom: -8px;
    transform: translateX(-50%);
    border: 8px solid transparent; border-top-color: #fff; border-bottom: 0;
}
.map-app .ol-popup .popup-box { padding: 14px 16px; }
.map-app .popup-box { min-width: 220px; }
.map-app .popup-box .p-name { font-size: 16px; font-weight: 700; color: #3a3226; display: flex; align-items: center; gap: 6px; }
.map-app .popup-box .p-type { font-size: 11px; padding: 2px 9px; border-radius: 99px; color: #fff; }
.map-app .popup-box .p-type.eat { background: var(--eat); }
.map-app .popup-box .p-type.hotel { background: var(--hotel); }
.map-app .popup-box .p-type.hospital { background: var(--hospital); }
.map-app .popup-box .p-type.scenic { background: var(--scenic); }
.map-app .popup-box .p-addr { font-size: 12px; color: var(--ink-soft); margin-top: 4px; }
.map-app .popup-box .p-go {
    margin-top: 10px; display: inline-flex; align-items: center; gap: 5px;
    padding: 7px 18px; border-radius: 99px;
    background: var(--brand); color: #fff; font-size: 13px; font-weight: 600;
    text-decoration: none; border: 0; cursor: pointer;
    transition: background .15s, transform .1s;
}
.map-app .popup-box .p-go:active { transform: scale(.96); }
.map-app .popup-box .p-go:hover { background: var(--brand-deep); }

/* ---------- PC 左侧信息栏 ---------- */
.map-app .map-panel {
    position: absolute; top: 0; left: 0; bottom: 0; z-index: 500;
    width: var(--panel-w);
    background: linear-gradient(180deg, #fdfaf3, var(--paper) 90px);
    border-right: 1px solid var(--line);
    display: flex; flex-direction: column;
    box-shadow: 2px 0 20px rgba(47, 90, 74, .07);
    transform: translateX(0); transition: transform .32s cubic-bezier(.16, 1, .3, 1);
}
.map-app .map-panel.collapsed { transform: translateX(calc(-100% - 1px)); }

/* 面板头部：标题 + 青绿晕染 */
.map-app .panel-head {
    padding: 20px 20px 12px;
    display: flex; align-items: flex-start; justify-content: space-between;
    background:
        radial-gradient(120% 120% at 100% 0%, rgba(47, 143, 122, .10), transparent 55%),
        radial-gradient(90% 130% at 0% 110%, rgba(74, 154, 114, .08), transparent 60%);
}
.map-app .panel-head > div { position: relative; }
.map-app .panel-head h1 { font-size: 21px; margin: 0; font-weight: 800; letter-spacing: 2px; color: var(--ink); }
.map-app .panel-head .panel-sub { font-size: 12px; color: var(--ink-soft); margin-top: 4px; line-height: 1.5; max-width: 300px; }
.map-app .panel-close {
    flex: 0 0 auto; width: 30px; height: 30px; border: 0; border-radius: 50%; cursor: pointer;
    background: var(--brand-soft); color: var(--brand); font-size: 15px; line-height: 1;
    transition: background .15s;
}
.map-app .panel-close:hover { background: #d7e9e1; }

/* 分类 tabs（图标+文字 双编码）：5 个 tab 在面板宽度内均分 */
.map-app .panel-tabs { padding: 10px 20px 6px; display: flex; gap: 6px; flex-wrap: nowrap; }
.map-app .tab {
    padding: 6px 15px; border-radius: 99px; font-size: 13px; cursor: pointer;
    background: rgba(255, 253, 247, .9); color: var(--ink-soft); border: 1px solid var(--line);
    user-select: none; display: flex; align-items: center; gap: 5px;
    transition: background .15s, color .15s, border-color .15s;
}
.map-app .tab:hover { border-color: rgba(47, 143, 122, .4); color: var(--brand); }
.map-app .tab.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.map-app .panel-tabs .tab { flex: 1 1 0; min-width: 0; justify-content: center; padding: 7px 4px; gap: 3px; font-size: 14px; }
.map-app .tab .t-ico { font-size: 14px; line-height: 1; display: inline-flex; }
.map-app .tab .t-ico img { width: 16px; height: 16px; object-fit: contain; display: block; }
.map-app .tab .t-num { font-size: 11px; opacity: .8; font-weight: 600; }
/* 筛选栏中间的"全部"：稍微强调（加粗 + 色边） */
.map-app .tab.center { font-weight: 700; border-color: rgba(47, 143, 122, .35); }
.map-app .map-filters .tab.center { font-weight: 700; }

/* 排序栏 */
.map-app .panel-sort { padding: 8px 20px 4px; display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--ink-soft); }
.map-app .sort-btn { border: 0; background: none; color: var(--ink-soft); cursor: pointer; font-size: 12px; display: flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 8px; transition: color .15s, background .15s; }
.map-app .sort-btn:hover { background: var(--brand-soft); }
.map-app .sort-btn.active { color: var(--brand); font-weight: 600; }

/* 点位卡片列表 */
.map-app .panel-list { flex: 1; overflow-y: auto; padding: 8px 14px 14px; margin-top: 2px; }
.map-app .panel-list::-webkit-scrollbar { width: 5px; }
.map-app .panel-list::-webkit-scrollbar-thumb { background: #d8cbbb; border-radius: 99px; }
.map-app .map-card {
    position: relative; display: flex; gap: 12px; align-items: center;
    padding: 11px 12px; margin-bottom: 9px; border-radius: var(--radius);
    background: #fff; border: 1px solid var(--line);
    cursor: pointer;
    transition: box-shadow .16s, transform .14s, border-color .16s;
}
.map-app .map-card:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); border-color: rgba(47, 143, 122, .35); }
.map-app .map-card.active { border-color: var(--brand); background: #f4faf7; }
.map-app .map-card.active::before {
    content: ""; position: absolute; left: 0; top: 12px; bottom: 12px;
    width: 3px; border-radius: 0 99px 99px 0; background: var(--brand);
}
.map-app .card-ico {
    flex: 0 0 46px; width: 46px; height: 46px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, .88);
    box-shadow: var(--shadow-sm);
}
.map-app .card-ico img { width: 30px; height: 30px; object-fit: contain; display: block; }
.map-app .card-ico.custom-image img {
    width: 34px; height: 34px; object-fit: cover;
    object-position: center; border-radius: 50%;
}
.map-app .card-body { flex: 1; min-width: 0; }
.map-app .card-name { font-size: 15px; font-weight: 700; color: #3a3226; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-app .card-addr { font-size: 12px; color: var(--ink-soft); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-app .card-tags { display: flex; gap: 5px; margin-top: 5px; flex-wrap: wrap; }
.map-app .tag-chip { font-size: 11px; padding: 2px 9px; border-radius: 99px; color: #fff; font-weight: 500; }
.map-app .tag-chip.eat { background: var(--eat); }
.map-app .tag-chip.hotel { background: var(--hotel); }
.map-app .tag-chip.hospital { background: var(--hospital); }
.map-app .tag-chip.scenic { background: var(--scenic); }
.map-app .tag-chip.map-chip { background: var(--brand, #2f8f7a); }
.map-app .card-go {
    flex: 0 0 auto; padding: 8px 15px; border-radius: 99px; border: 0;
    background: var(--brand); color: #fff; font-size: 12px; font-weight: 600; cursor: pointer;
    transition: background .15s, transform .1s;
}
.map-app .card-go:hover { background: var(--brand-deep); }
.map-app .card-go:active { transform: scale(.94); }

/* ---------- H5 底部抽屉 ---------- */
.map-app .map-drawer {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 700;
    max-height: 48vh; background: #fdfbf6;
    border-radius: 20px 20px 0 0; box-shadow: 0 -6px 30px rgba(47, 90, 74, .16);
    transform: translateY(110%); transition: transform .34s cubic-bezier(.16, 1, .3, 1);
    display: flex; flex-direction: column;
    padding-bottom: env(safe-area-inset-bottom, 0);
}
.map-app .map-drawer::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    border-radius: 20px 20px 0 0;
    background: linear-gradient(90deg, transparent, rgba(47, 143, 122, .25), transparent);
}
.map-app .map-drawer.open { transform: translateY(0); }
.map-app .map-drawer.detail-full {
    max-height: none; height: 100vh; top: 0;
    border-radius: 0; padding-bottom: 0;
    z-index: 950;   /* 盖住顶部品牌条(z 900)，否则详情页返回/关闭按钮被顶栏遮挡 */
}
.map-app .map-drawer.detail-full .drawer-grip { display: none; }
.map-app .drawer-grip { width: 40px; height: 4px; border-radius: 99px; background: #d8cbbb; margin: 11px auto 5px; flex: 0 0 auto; }
.map-app .drawer-title { padding: 4px 18px 6px; font-size: 14px; font-weight: 700; color: #3a3226; display: flex; align-items: center; justify-content: space-between; }
.map-app .drawer-title #drawerName { display: flex; align-items: center; gap: 6px; }
.map-app .drawer-close {
    border: 0; background: var(--brand-soft); color: var(--brand);
    font-size: 15px; line-height: 1; cursor: pointer; padding: 0;
    width: 26px; height: 26px; border-radius: 50%;
}
.map-app .drawer-list { flex: 1; overflow-y: auto; padding: 6px 14px 16px; }
.map-app .drawer-list .map-card { margin-bottom: 7px; }
.map-app .drawer-intro { margin: 8px 0 0; font-size: 13px; line-height: 1.75; color: #5c5444; }
.map-app .drawer-view { display: flex; flex-direction: column; overflow: hidden; flex: 1; min-height: 0; }
.map-app .drawer-meta { padding: 2px 0 4px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* ---------- 动效降级（尊重系统设置） ---------- */
@media (prefers-reduced-motion: reduce) {
    .map-app * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
    .map-app .map-panel, .map-app .map-drawer { transition: none; }
}

/* H5 类型筛选栏（悬浮于地图顶部，PC 隐藏；与左侧 tab 同逻辑）
   5 个 tab 按屏幕宽度均分（flex:1），不再依赖内容宽度/横向滚动 */
.map-app .map-filters {
    position: absolute; top: 62px; left: 10px; right: 10px; z-index: 260;
    display: flex; gap: 4px; padding: 4px;
    background: rgba(255, 255, 255, .92);
    border-radius: 99px; box-shadow: 0 2px 8px rgba(0, 0, 0, .14);
}
.map-app .map-filters .tab {
    flex: 1 1 0; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 3px;
    padding: 8px 4px; border-radius: 99px;
    font-size: 14px; font-weight: 600; color: #5c5444; white-space: nowrap;
    background: transparent; border: none; cursor: pointer;
    transition: background .15s, color .15s;
}
.map-app .map-filters .tab.active {
    background: var(--brand); color: #fff;
}

/* ---------- 移动端布局（< 1024px） ---------- */
@media (max-width: 1023px) {
    .map-app .map-panel { display: none !important; }
    .map-app .map-topbar { display: flex; }
    .map-app #map { top: 52px; }
    .map-app .map-toggle { display: flex; }
    .map-app .ol-zoom { display: none; }
    .map-app .map-pop-nav { display: none; }
}

/* ---------- 详情页（图一风格） ---------- */
.map-app .detail-gallery {
    position: relative; height: 42vh; min-height: 240px;
    background: #3a3226; overflow: hidden;
}
.map-app .detail-back {
    position: absolute; top: 12px; left: 12px; z-index: 5;
    width: 38px; height: 38px; border-radius: 50%;
    border: none; background: rgba(255,255,255,.85);
    font-size: 26px; line-height: 1; color: #333; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.map-app .detail-close {
    position: absolute; top: 12px; right: 12px; z-index: 5;
    width: 38px; height: 38px; border-radius: 50%;
    border: none; background: rgba(255,255,255,.85);
    font-size: 22px; line-height: 1; color: #333; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.map-app .detail-slides { position: absolute; inset: 0; }
.map-app .detail-slide {
    position: absolute; inset: 0; display: none;
    align-items: center; justify-content: center;
}
.map-app .detail-slide img { width: 100%; height: 100%; object-fit: cover; }
.map-app .detail-slide.empty {
    background:
        radial-gradient(120% 100% at 30% 20%, rgba(255,255,255,.12), transparent 55%),
        linear-gradient(135deg, #6b7a6a, #4a5a49);
    color: rgba(255,255,255,.6); font-size: 14px; display: flex;
    flex-direction: column; align-items: center; gap: 8px;
}
.map-app .detail-slide.empty .de-emoji { font-size: 44px; line-height: 1; }
.map-app .detail-dots {
    position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 6px; z-index: 4;
}
.map-app .ddot {
    width: 7px; height: 7px; border-radius: 50%;
    background: rgba(255,255,255,.45); cursor: pointer; transition: all .2s;
}
.map-app .ddot.active { background: #fff; width: 20px; border-radius: 4px; }
.map-app .detail-title-bar {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
    padding: 20px 16px 14px;
    background: linear-gradient(to top, rgba(0,0,0,.65), transparent);
    color: #fff;
}
.map-app .detail-name {
    margin: 0; font-size: 22px; font-weight: 700;
    text-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.map-app .detail-tags { display: flex; gap: 6px; margin-top: 6px; }
.map-app .detail-tags .tag-chip {
    background: rgba(255,255,255,.9); color: #3a3226;
    font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px;
}
.map-app .detail-scroll {
    flex: 1; overflow-y: auto; padding: 0 14px 90px;
    background: var(--paper);
}
.map-app .detail-card {
    margin-top: 14px; position: relative;
    background: #fff; border-radius: 16px; padding: 16px;
    display: flex; align-items: stretch; gap: 12px;
    box-shadow: 0 4px 16px rgba(47,90,74,.12);
}
.map-app .dc-item { flex: 1; text-align: center; }
.map-app .dc-value {
    font-size: 14px; font-weight: 600; color: var(--brand); line-height: 1.4;
    word-break: break-word;
}
.map-app .dc-label { font-size: 12px; color: var(--ink-soft); margin-top: 6px; }
.map-app .dc-divider { width: 1px; background: var(--line); }
.map-app .detail-audio {
    margin-top: 12px; border-radius: 14px; padding: 14px 16px;
    background: var(--brand-soft); display: flex; align-items: center; gap: 10px;
}
.map-app .da-ico { font-size: 20px; }
.map-app .da-text { flex: 1; font-size: 15px; font-weight: 600; color: var(--brand); }
.map-app .da-play {
    width: 38px; height: 38px; border-radius: 50%;
    border: none; background: var(--brand); color: #fff;
    font-size: 16px; cursor: pointer; display: flex;
    align-items: center; justify-content: center;
    transition: background .15s, transform .1s;
}
.map-app .da-play:active { transform: scale(.92); }
.map-app .detail-video {
    margin-top: 12px; border-radius: 14px; overflow: hidden; background: #000;
}
.map-app .detail-video video { width: 100%; display: block; }
/* 全屏小地图页 */
.map-app .mini-page {
    position: absolute; inset: 0; z-index: 980;
    background: #efe9dc; display: flex; flex-direction: column;
    transform: translateY(110%); transition: transform .3s cubic-bezier(.16, 1, .3, 1);
}
.map-app .mini-page.open { transform: translateY(0); }
/* 从小地图进详情时：小地图隐藏但保留状态，详情关闭后恢复 */
.map-app .mini-page.mini-back { display: none; }
.map-app .mini-page-head {
    position: relative; display: flex; align-items: center; gap: 8px;
    padding: 12px 12px; background: rgba(251,248,241,.96);
}
.map-app .mini-page-back, .map-app .mini-page-close {
    width: 38px; height: 38px; border-radius: 50%; border: none;
    background: #eee4d0; color: #3a3226; font-size: 24px; line-height: 1;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    flex: 0 0 38px;
}
.map-app .mini-page-title { flex: 1; min-width: 0; text-align: center; }
.map-app .mini-page-title h2 {
    margin: 0; font-size: 18px; font-weight: 700; color: var(--ink);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.map-app .mini-page-tags { display: flex; gap: 5px; justify-content: center; margin-top: 4px; }
.map-app .mini-page-tags .tag-chip {
    background: var(--brand-soft); color: var(--brand);
    font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 99px;
}
.map-app .mini-page-tags .tag-chip.pay { background: #f4e6c5; color: #b07d1b; }
.map-app .mini-page-body {
    flex: 1; min-height: 0; position: relative;
}
.map-app .mini-map-wrap {
    position: absolute; inset: 0;
    background: #efe9dc;
}
.map-app .mini-page-bottom {
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.95);
    display: flex; gap: 10px;
    border-top: 1px solid var(--line);
}
/* 小地图页当前点位简介条（与总地图说明一致，切换点位联动） */
.map-app .mini-page-info {
    background: rgba(255, 255, 255, .94);
    border-top: 1px solid var(--line);
    padding: 7px 14px;
    display: flex; align-items: flex-start; gap: 6px;
}
.map-app .mini-page-info .mpi-label {
    flex: 0 0 auto; font-size: 12px; font-weight: 700; color: var(--brand);
    line-height: 1.6;
}
.map-app .mini-page-info .mpi-text {
    margin: 0; font-size: 12px; color: #5c5444; line-height: 1.6;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.map-app .mpb-detail {
    flex: 1; height: 46px; border: none; border-radius: 14px;
    background: var(--brand); color: #fff; font-size: 15px; font-weight: 700;
    cursor: pointer;
}
.map-app .mpb-nav {
    flex: 1; height: 46px; border: 1px solid var(--line); border-radius: 14px;
    background: #fff; color: var(--ink); font-size: 15px; font-weight: 700;
    cursor: pointer;
}
/* 小地图页点位标记（复用详情小地图标记样式） */
.map-app .minimap-marker {
    position: relative; width: 40px; height: 40px; cursor: pointer;
}
.map-app .minimap-marker .mm-dot {
    position: absolute; left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    width: 28px; height: 28px; border-radius: 50% 50% 50% 0;
    background: #fff; border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,.35);
    z-index: 2; transform: translate(-50%, -50%) rotate(-45deg);
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.map-app .minimap-marker .mm-dot img { width: 20px; height: 20px; object-fit: contain; border-radius: 50%; display: block; transform: rotate(45deg); }
.map-app .minimap-marker .mm-ring {
    position: absolute; left: 50%; top: 50%;
    width: 36px; height: 36px; border-radius: 50%;
    transform: translate(-50%, -50%);
    background: rgba(224,68,46,.35);
    z-index: 1;
    animation: mm-pulse 1.8s ease-out infinite;
}
@keyframes mm-pulse {
    0%   { transform: translate(-50%, -50%) scale(.6); opacity: .9; }
    70%  { transform: translate(-50%, -50%) scale(1.35); opacity: 0; }
    100% { transform: translate(-50%, -50%) scale(1.35); opacity: 0; }
}
.map-app .minimap-mini {
    min-width: 24px; height: 24px; padding: 2px 6px; border-radius: 99px;
    color: #fff; font-size: 12px; font-weight: 800; line-height: 1; text-align: center;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 1px 4px rgba(0,0,0,.35), 0 0 0 2px rgba(255,255,255,.85);
    cursor: pointer; transition: transform .15s;
    text-shadow: 0 1px 2px rgba(0,0,0,.35);
}
.map-app .minimap-mini:hover { transform: scale(1.18); }
.map-app .minimap-mini.eat      { background: #d9823f; }
.map-app .minimap-mini.hotel    { background: #7a6db0; }
.map-app .minimap-mini.hospital { background: #c85a66; }
.map-app .minimap-mini.scenic   { background: #4c9a72; }
/* 小地图点位名称标签（打开小地图只显示点位名称，点击进详情） */
.map-app .minimap-tag {
    padding: 4px 10px; border-radius: 99px;
    background: rgba(255, 255, 255, .95);
    color: #3a3226; font-size: 12px; font-weight: 600; white-space: nowrap;
    border: 1px solid rgba(120, 100, 60, .18);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .22);
    cursor: pointer;
    transition: transform .15s, border-color .15s, color .15s, box-shadow .15s;
}
.map-app .minimap-tag:hover { transform: scale(1.06); border-color: var(--brand); color: var(--brand); box-shadow: 0 2px 8px rgba(0, 0, 0, .28); }
.map-app .minimap-marker.active .mm-name {
    position: absolute; left: 50%; bottom: -36px; transform: translateX(-50%);
    padding: 0; border-radius: 0;
    background: transparent; color: #3a3226; font-size: 15px; font-weight: 700; white-space: nowrap;
    z-index: 3;
}
.map-app .detail-section { margin-top: 18px; }
.map-app .ds-title {
    font-size: 17px; font-weight: 700; color: var(--ink); margin: 0 0 10px;
}
.map-app .ds-content {
    margin: 0; font-size: 14px; line-height: 1.75; color: #5c5444;
}
.map-app .detail-bottom-bar {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 10;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.95); backdrop-filter: blur(10px);
    display: flex; align-items: center; gap: 10px;
    border-top: 1px solid var(--line);
}
.map-app .db-nav {
    flex: 1; height: 48px; border: none; border-radius: 14px;
    background: var(--brand); color: #fff; font-size: 16px; font-weight: 700;
    cursor: pointer; transition: background .15s, transform .1s;
}
.map-app .db-nav:active { background: var(--brand-deep); transform: scale(.98); }
.map-app .db-switch {
    height: 48px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line);
    background: #fff; color: var(--ink); font-size: 13px; font-weight: 600; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 2px;
    transition: background .15s, border-color .15s, transform .1s;
}
.map-app .db-switch:hover { border-color: rgba(47, 143, 122, .4); color: var(--brand); }
.map-app .db-switch:active { transform: scale(.96); }

/* ---------- 桌面端（>= 1024px） ---------- */
@media (min-width: 1024px) {
    .map-app .map-drawer, .map-app .map-toggle, .map-app .map-filters { display: none; }
    .map-app .map-panel { transform: none !important; }      /* PC 左侧列表常驻，不可收起 */
    .map-app .panel-close { display: none !important; }
    .map-app #map { left: var(--panel-w); }                  /* 右区地图，不被左栏遮挡 */
    .map-app .panel-list .map-card .card-go { display: none; }  /* PC 用 popup 内导航 */
    /* PC 小地图页：居中卡片形态（移动端仍全屏） */
    .map-app .mini-page {
        top: 10vh; left: calc(var(--panel-w) + (100vw - var(--panel-w)) / 2);
        right: auto; bottom: auto;
        width: 480px; max-width: calc(100vw - var(--panel-w) - 48px);
        height: min(78vh, 640px);
        border-radius: 18px; border: 1px solid var(--line);
        box-shadow: var(--shadow);
        overflow: hidden;
        transform: translate(-50%, -110%);
    }
    .map-app .mini-page.open { transform: translate(-50%, 0); }
    .map-app .mini-page-body { background: #efe9dc; }
}
