/* ============================================================
   校园地图 · Apple Liquid Glass 液态玻璃设计系统
   ------------------------------------------------------------
   材质分层：
   L0 极光背景层（彩色流动光斑，供玻璃折射）
   L1 液态玻璃面板（blur + saturate + 渐变发光描边 + 内侧镜面高光）
   L2 玻璃控件（胶囊按钮 / 玻璃芯片）
   ------------------------------------------------------------
   三大视觉签名：
   ① 渐变边缘光 (gradient edge glow，mask 抠出的 1px 高光描边)
   ② 顶部镜面高光 (inset 0 1px 0 specular highlight)
   ③ 彩色环境光晕投影 (ambient glow shadow)
   ============================================================ */

/* ---------- 动画属性注册（旋转描边光用） ---------- */
@property --glow-angle {
    syntax: "<angle>";
    inherits: false;
    initial-value: 0deg;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 玻璃材质变量 */
    --glass-bg:        rgba(255, 255, 255, 0.55);
    --glass-bg-strong: rgba(255, 255, 255, 0.68);
    --glass-bg-soft:   rgba(255, 255, 255, 0.38);
    --glass-blur:      blur(28px) saturate(180%);
    --glass-blur-strong: blur(40px) saturate(200%);

    /* 发光描边（白金渐变 → 玻璃边缘反光） */
    --edge-glow: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(255, 255, 255, 0.15) 38%,
        rgba(255, 255, 255, 0.05) 62%,
        rgba(255, 255, 255, 0.75) 100%
    );

    /* 文字 */
    --color-text:        #1c1c28;
    --color-text-light:  #5a5a6e;
    --color-text-muted:  #8e8ea3;

    /* 品牌色（Apple 系活力色） */
    --color-accent:       #FF7A2F;
    --color-accent-light: #FFA36B;
    --color-primary:      #34B47C;
    --color-blue:         #4E9BE6;
    --color-purple:       #9D7BEC;
    --color-pink:         #F473A8;

    /* 建筑分类 */
    --cat-gate:     #4E9BE6;
    --cat-teaching: #34B47C;
    --cat-canteen:  #FF7A2F;
    --cat-dorm:     #9D7BEC;
    --cat-sports:   #F0556B;
    --cat-library:  #3D7BC4;
    --cat-admin:    #F473A8;
    --cat-service:  #8e8ea3;
    --cat-stage:    #F5B93D;

    /* 液态玻璃阴影三件套：接触阴影 + 扩散阴影 + 环境光晕 */
    --shadow-glass:
        0 2px 8px rgba(30, 30, 60, 0.06),
        0 12px 32px rgba(30, 30, 60, 0.12),
        0 24px 64px rgba(78, 155, 230, 0.10);
    --shadow-glass-hover:
        0 4px 12px rgba(30, 30, 60, 0.08),
        0 18px 44px rgba(30, 30, 60, 0.16),
        0 32px 80px rgba(78, 155, 230, 0.16);

    --radius-sm: 14px;
    --radius-md: 22px;
    --radius-lg: 28px;

    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-glass: cubic-bezier(0.22, 1, 0.36, 1);
}

body {
    font-family: "SF Pro Display", "SF Pro Text", "PingFang SC",
                 "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
    color: var(--color-text);
    overflow: hidden;
    height: 100vh;
    background: #dfe6f5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* ============================================================
   L0 · 极光背景层
   液态玻璃必须叠在彩色内容上才有"折射感"，
   用多组缓慢漂移的径向光斑制造流动的极光。
   ============================================================ */
#app {
    display: flex;
    height: 100vh;
    position: relative;
    background:
        radial-gradient(46vw 42vw at 8% 12%,
            rgba(120, 170, 255, 0.55) 0%, transparent 100%),
        radial-gradient(40vw 46vw at 22% 88%,
            rgba(157, 123, 236, 0.42) 0%, transparent 100%),
        radial-gradient(44vw 40vw at 50% 30%,
            rgba(255, 163, 107, 0.30) 0%, transparent 100%),
        radial-gradient(38vw 42vw at 88% 78%,
            rgba(52, 180, 124, 0.36) 0%, transparent 100%),
        radial-gradient(30vw 30vw at 78% 10%,
            rgba(244, 115, 168, 0.30) 0%, transparent 100%),
        linear-gradient(150deg, #eef2fb 0%, #e6ecfa 45%, #f0eaf3 100%);
    background-size: 200% 200%, 200% 200%, 220% 220%, 200% 200%, 220% 220%, 100% 100%;
    animation: aurora-drift 36s ease-in-out infinite alternate;
}

@keyframes aurora-drift {
    0%   { background-position: 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0 0; }
    50%  { background-position: 12% 8%, -10% 6%, 8% -12%, -8% 10%, 10% -6%, 0 0; }
    100% { background-position: 20% 16%, -16% 12%, 14% -18%, -14% 18%, 16% -10%, 0 0; }
}

/* ============================================================
   L1 · 液态玻璃面板基础类
   .liquid-glass = 玻璃体 + 渐变发光描边 + 镜面高光 + 环境光晕
   ============================================================ */
.liquid-glass {
    position: relative;
    background: var(--glass-bg);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-lg);
    box-shadow:
        var(--shadow-glass),
        inset 0 1px 0 rgba(255, 255, 255, 0.75);   /* 顶部镜面高光 */
}

/* 渐变发光描边：用 mask 从 padding-box 抠出 1px 环形渐变 */
.liquid-glass::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: var(--edge-glow);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
            mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
    z-index: 1;
}

/* 玻璃体内上部的柔和光泽带 */
.liquid-glass::after {
    content: "";
    position: absolute;
    top: 0;
    left: 8%;
    right: 8%;
    height: 38%;
    border-radius: inherit;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.32) 0%,
        rgba(255, 255, 255, 0.06) 100%
    );
    pointer-events: none;
    z-index: 0;
}

/* ============================================================
   侧边栏 · 悬浮玻璃塔
   ============================================================ */
#sidebar {
    width: 366px;
    min-width: 366px;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    position: relative;
    margin: 14px 0 14px 14px;
    background: var(--glass-bg);
    -webkit-backdrop-filter: var(--glass-blur-strong);
    backdrop-filter: var(--glass-blur-strong);
    border-radius: var(--radius-lg);
    box-shadow:
        0 4px 16px rgba(30, 30, 60, 0.07),
        0 24px 56px rgba(30, 30, 60, 0.14),
        0 32px 88px rgba(78, 155, 230, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    overflow: hidden;
    animation: panel-rise 0.7s var(--ease-glass) both;
}

#sidebar::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: var(--edge-glow);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
            mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
    z-index: 5;
}

@keyframes panel-rise {
    from { transform: translateY(18px) scale(0.985); opacity: 0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
}

/* ---------- 侧边栏标题：玻璃中的品牌标头 ---------- */
.sidebar-header {
    position: relative;
    padding: 26px 24px 20px;
    background:
        radial-gradient(120% 160% at 12% 0%,
            rgba(255, 138, 76, 0.34) 0%,
            rgba(255, 163, 107, 0.14) 46%,
            rgba(255, 255, 255, 0) 100%);
    z-index: 2;
}

/* 标题区底缘的液态分割线（发光细线） */
.sidebar-header::after {
    content: "";
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 138, 76, 0.55) 30%,
        rgba(255, 255, 255, 0.85) 50%,
        rgba(120, 170, 255, 0.45) 70%,
        transparent 100%
    );
}

.sidebar-header h1 {
    font-size: 23px;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: linear-gradient(120deg, #2a2a3d 0%, #4a3f5e 55%, #6d4f8f 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-header .subtitle {
    font-size: 12.5px;
    color: var(--color-text-light);
    margin-top: 6px;
    letter-spacing: 1.5px;
}

/* ============================================================
   搜索框 · 玻璃胶囊（带内阴影"凹面玻璃"感）
   ============================================================ */
.search-box {
    position: relative;
    padding: 18px 20px 8px;
    z-index: 2;
}

.search-box input {
    width: 100%;
    padding: 13px 92px 13px 18px;
    border: none;
    border-radius: 18px;
    font-size: 14px;
    font-family: inherit;
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.5);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    backdrop-filter: blur(14px) saturate(160%);
    box-shadow:
        inset 0 1px 3px rgba(30, 30, 60, 0.08),
        inset 0 8px 20px rgba(30, 30, 60, 0.045),
        0 1px 0 rgba(255, 255, 255, 0.7);
    outline: none;
    transition: box-shadow 0.3s var(--ease-glass), background 0.3s;
}

.search-box input::placeholder {
    color: var(--color-text-muted);
}

.search-box input:focus {
    background: rgba(255, 255, 255, 0.78);
    box-shadow:
        inset 0 1px 2px rgba(30, 30, 60, 0.05),
        0 0 0 3.5px rgba(255, 122, 47, 0.22),
        0 0 24px rgba(255, 122, 47, 0.22),
        0 1px 0 rgba(255, 255, 255, 0.85);
}

/* 搜索按钮 · 主色圆钮（可点击执行搜索，替代原装饰性图标） */
.search-go {
    position: absolute;
    right: 11px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF9A4D, #F0782E);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(240, 120, 46, 0.35);
    transition: all 0.25s var(--ease-spring);
}
.search-go svg {
    width: 16px; height: 16px;
    fill: none; stroke: #fff;
    stroke-width: 2.2; stroke-linecap: round;
}
.search-go:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 14px rgba(240, 120, 46, 0.5);
}
.search-go:active {
    transform: translateY(-50%) scale(0.94);
}

/* 清空按钮 · 玻璃小圆钮 */
.search-clear {
    position: absolute;
    right: 52px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background: rgba(30, 30, 60, 0.10);
    color: var(--color-text-light);
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s var(--ease-spring);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.search-clear:hover {
    background: var(--color-accent);
    color: #fff;
    transform: scale(1.12);
    box-shadow: 0 4px 12px rgba(255, 122, 47, 0.4);
}

/* 结果计数 */
.result-count {
    padding: 4px 24px 2px;
    font-size: 12px;
    color: var(--color-text-muted);
    letter-spacing: 0.4px;
    min-height: 20px;
    z-index: 2;
    position: relative;
}

.result-count b {
    color: var(--color-accent);
    font-weight: 700;
}

/* ============================================================
   键盘焦点可见性（无障碍）· 发光环
   ============================================================ */
button:focus-visible,
.cat-tag:focus-visible,
.building-item:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 3.5px rgba(255, 255, 255, 0.9),
        0 0 0 6px rgba(255, 122, 47, 0.55),
        0 0 18px rgba(255, 122, 47, 0.35);
    border-radius: 14px;
}

/* ============================================================
   分类标签 · 玻璃芯片
   ============================================================ */
.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 20px 12px;
    position: relative;
    z-index: 2;
}

.cat-tag {
    position: relative;
    padding: 7px 15px;
    border: none;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    user-select: none;
    color: var(--color-text-light);
    background: rgba(255, 255, 255, 0.42);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
    backdrop-filter: blur(10px) saturate(150%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        0 2px 6px rgba(30, 30, 60, 0.07);
    transition: all 0.28s var(--ease-glass);
}

/* 芯片 1px 微光描边 */
.cat-tag::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.15));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
            mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}

.cat-tag:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.65);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 6px 16px rgba(30, 30, 60, 0.12);
}

.cat-tag:active { transform: translateY(0) scale(0.97); }

/* 激活态：浸入橙色的液态玻璃 */
.cat-tag.active {
    color: #fff;
    background:
        linear-gradient(135deg,
            rgba(255, 138, 76, 0.92) 0%,
            rgba(255, 163, 107, 0.86) 100%);
    -webkit-backdrop-filter: blur(14px) saturate(190%);
    backdrop-filter: blur(14px) saturate(190%);
    text-shadow: 0 1px 2px rgba(120, 50, 0, 0.25);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.45),
        inset 0 -6px 14px rgba(200, 80, 20, 0.22),
        0 6px 18px rgba(255, 122, 47, 0.42),
        0 2px 6px rgba(255, 122, 47, 0.3);
}

.cat-tag.active::before {
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.2));
}

/* ============================================================
   建筑列表 · 玻璃卡片流
   ============================================================ */
.building-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px 16px 18px;
    position: relative;
    z-index: 2;
}

.building-list::-webkit-scrollbar { width: 8px; }
.building-list::-webkit-scrollbar-track { background: transparent; }
.building-list::-webkit-scrollbar-thumb {
    background: rgba(30, 30, 60, 0.14);
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
.building-list::-webkit-scrollbar-thumb:hover {
    background: rgba(30, 30, 60, 0.28);
    background-clip: padding-box;
}

.building-item {
    display: flex;
    align-items: center;
    padding: 11px 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    margin-bottom: 7px;
    background: rgba(255, 255, 255, 0.34);
    border: 1px solid rgba(255, 255, 255, 0.45);
    transition: all 0.28s var(--ease-glass);
    font-family: inherit;
    text-align: left;
    width: 100%;
}

.building-item:hover {
    background: rgba(255, 255, 255, 0.72);
    -webkit-backdrop-filter: blur(16px) saturate(170%);
    backdrop-filter: blur(16px) saturate(170%);
    transform: translateX(5px);
    border-color: rgba(255, 255, 255, 0.9);
    box-shadow:
        0 8px 24px rgba(30, 30, 60, 0.12),
        0 0 0 1px rgba(255, 163, 107, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.building-item:active { transform: translateX(2px) scale(0.985); }

.building-icon {
    width: 46px;
    height: 46px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-right: 13px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.85);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 1),
        0 4px 12px rgba(30, 30, 60, 0.12),
        0 0 0 1px rgba(30, 30, 60, 0.04);
}

.building-info { flex: 1; min-width: 0; }

.building-name {
    font-size: 15px;
    font-weight: 650;
    margin-bottom: 3px;
    color: var(--color-text);
}

.building-desc {
    font-size: 12px;
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================================
   地图区域
   ============================================================ */
#map-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    margin: 14px 14px 14px 0;
    border-radius: var(--radius-lg);
    box-shadow:
        0 4px 16px rgba(30, 30, 60, 0.07),
        0 24px 56px rgba(30, 30, 60, 0.14);
}

#map {
    width: 100%;
    height: 100%;
    /* 与底图纸面同色：完整显示时上下留白与地图浑然一体，消除"地图被截断"感 */
    background: #FFFFFF;
    border-radius: var(--radius-lg);
}

/* 地图容器边缘发光描边（覆盖在地图上方） */
#map-container::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    padding: 1.5px;
    background: var(--edge-glow);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
            mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
    z-index: 300;
}

/* ---------- Leaflet 控件 · 玻璃化 ---------- */
.leaflet-control-zoom {
    border: none !important;
    border-radius: 16px !important;
    overflow: hidden;
    box-shadow:
        0 8px 24px rgba(30, 30, 60, 0.16) !important;
    background: rgba(255, 255, 255, 0.6) !important;
    -webkit-backdrop-filter: var(--glass-blur) !important;
    backdrop-filter: var(--glass-blur) !important;
}

.leaflet-control-zoom a {
    width: 38px !important;
    height: 38px !important;
    line-height: 38px !important;
    font-size: 20px !important;
    color: var(--color-text) !important;
    background: rgba(255, 255, 255, 0) !important;
    border: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.55) !important;
    transition: background 0.2s;
}

.leaflet-control-zoom a:hover {
    background: rgba(255, 163, 107, 0.25) !important;
}

.leaflet-control-attribution {
    background: rgba(255, 255, 255, 0.6) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    backdrop-filter: blur(12px) !important;
    border-radius: 10px 0 0 0 !important;
    font-size: 10.5px !important;
    color: var(--color-text-muted) !important;
}

/* ============================================================
   校园 Logo · 浮空玻璃徽章
   ============================================================ */
.campus-logo {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--glass-bg);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border-radius: 20px;
    padding: 11px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow:
        var(--shadow-glass),
        inset 0 1px 0 rgba(255, 255, 255, 0.75);
    z-index: 400;
    animation: panel-rise 0.8s var(--ease-glass) both;
}

.campus-logo::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: var(--edge-glow);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
            mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}

.logo-icon { font-size: 28px; line-height: 1; }
.logo-text { display: flex; flex-direction: column; }

.logo-title {
    font-size: 14px;
    font-weight: 750;
    letter-spacing: 0.5px;
}

.logo-sub {
    font-size: 11px;
    color: var(--color-text-muted);
    margin-top: 2px;
    letter-spacing: 1px;
}

/* ============================================================
   指北针 · 玻璃圆盘
   ============================================================ */
.compass {
    position: absolute;
    bottom: 28px;
    right: 104px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--glass-bg);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    box-shadow:
        var(--shadow-glass),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    z-index: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: panel-rise 0.9s var(--ease-glass) both;
}

.compass::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    padding: 1.5px;
    background: var(--edge-glow);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
            mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}

.compass::after {
    content: "";
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px dashed rgba(120, 130, 170, 0.35);
}

.compass-needle {
    position: absolute;
    width: 4px;
    height: 34px;
    background: linear-gradient(180deg,
        var(--color-accent) 0%, var(--color-accent) 50%,
        rgba(120, 130, 170, 0.6) 50%, rgba(120, 130, 170, 0.6) 100%);
    border-radius: 2px;
}

.compass-n {
    position: absolute;
    top: -3px;
    font-size: 10.5px;
    font-weight: 800;
    color: var(--color-accent);
    background: rgba(255, 255, 255, 0.92);
    width: 17px;
    height: 17px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 2px 6px rgba(30, 30, 60, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 1);
}

/* ============================================================
   视野模式切换 · 底部胶囊（仅竖屏手机显示）
   ============================================================ */
.view-toggle {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(88px + env(safe-area-inset-bottom));
    z-index: 460;
    display: none;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: 1px solid rgba(30, 30, 60, 0.08);
    border-radius: 999px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: #3A3325;
    background: rgba(255, 255, 255, 0.78);
    -webkit-backdrop-filter: blur(20px) saturate(170%);
    backdrop-filter: blur(20px) saturate(170%);
    box-shadow:
        0 1px 3px rgba(30, 30, 60, 0.10),
        0 8px 24px rgba(30, 30, 60, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.25s var(--ease-spring);
}
.view-toggle svg { width: 15px; height: 15px; flex: none; }

.view-toggle:active { transform: translateX(-50%) scale(0.95); }

/* 两模式视野一致（横屏/桌面）时无切换意义 */
.view-toggle.no-alt { display: none !important; }

/* ============================================================
   小地图（浏览模式右上角）：整校缩略图 + 当前取景框
   ============================================================ */
.map-overview {
    position: absolute;
    top: calc(64px + env(safe-area-inset-top));
    right: 12px;
    width: 118px;
    aspect-ratio: 1642 / 958;
    z-index: 430;
    border-radius: 12px;
    overflow: hidden;
    display: none;
    cursor: pointer;
    background: #fff;
    box-shadow:
        0 6px 20px rgba(30, 30, 60, 0.22),
        0 0 0 1.5px rgba(255, 255, 255, 0.65);
    -webkit-tap-highlight-color: transparent;
}

.map-overview.visible { display: block; animation: slideDown 0.35s var(--ease-glass); }

.map-overview img {
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
}

.map-overview .ov-rect {
    position: absolute;
    border: 2px solid #FF7A2F;
    background: rgba(255, 122, 47, 0.14);
    border-radius: 3px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.75);
    pointer-events: none;
}

/* ============================================================
   导航面板 · 顶部悬浮玻璃卡
   ============================================================ */
.nav-panel {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 344px;
    background: var(--glass-bg-strong);
    -webkit-backdrop-filter: var(--glass-blur-strong);
    backdrop-filter: var(--glass-blur-strong);
    border-radius: var(--radius-md);
    box-shadow:
        0 4px 16px rgba(30, 30, 60, 0.08),
        0 20px 48px rgba(30, 30, 60, 0.18),
        0 28px 72px rgba(52, 180, 124, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    z-index: 500;
    overflow: hidden;
    animation: slideDown 0.4s var(--ease-glass);
}

.nav-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: var(--edge-glow);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
            mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
    z-index: 3;
}

@keyframes slideDown {
    from { transform: translateY(-18px) scale(0.97); opacity: 0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
}

.nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 18px;
    background: linear-gradient(120deg,
        rgba(52, 180, 124, 0.32) 0%,
        rgba(78, 155, 230, 0.22) 100%);
}

.nav-header h3 {
    font-size: 15.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 7px;
    letter-spacing: 0.5px;
}

.btn-close {
    background: rgba(255, 255, 255, 0.35);
    border: none;
    font-size: 15px;
    cursor: pointer;
    color: var(--color-text-light);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    transition: all 0.25s var(--ease-spring);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.btn-close:hover {
    background: rgba(255, 255, 255, 0.75);
    color: var(--color-text);
    transform: rotate(90deg);
}

.nav-body { padding: 18px; }

.nav-endpoints {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 16px;
}

.nav-point label {
    display: block;
    font-size: 11.5px;
    color: var(--color-text-muted);
    margin-bottom: 6px;
    font-weight: 600;
    letter-spacing: 1px;
}

.nav-point select {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 14px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    cursor: pointer;
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.5);
    box-shadow:
        inset 0 1px 3px rgba(30, 30, 60, 0.06),
        0 1px 0 rgba(255, 255, 255, 0.6);
    transition: all 0.25s;
    appearance: none;
    -webkit-appearance: none;
}

.nav-point select:focus {
    background: rgba(255, 255, 255, 0.85);
    box-shadow:
        0 0 0 3px rgba(52, 180, 124, 0.25),
        0 0 18px rgba(52, 180, 124, 0.2);
}

/* ---------- 主按钮 · 发光玻璃凝胶 ---------- */
.btn-primary {
    position: relative;
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg,
        rgba(255, 138, 76, 0.95) 0%,
        rgba(255, 163, 107, 0.9) 100%);
    color: #fff;
    border: none;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    letter-spacing: 2px;
    transition: all 0.28s var(--ease-glass);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -8px 16px rgba(200, 80, 20, 0.25),
        0 8px 24px rgba(255, 122, 47, 0.42),
        0 2px 6px rgba(255, 122, 47, 0.3);
    text-shadow: 0 1px 2px rgba(120, 50, 0, 0.3);
    overflow: hidden;
}

/* 按钮顶部流动光泽 */
.btn-primary::after {
    content: "";
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 45%;
    border-radius: 16px 16px 40px 40px;
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0));
    pointer-events: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        inset 0 -8px 16px rgba(200, 80, 20, 0.25),
        0 12px 32px rgba(255, 122, 47, 0.55),
        0 4px 10px rgba(255, 122, 47, 0.35);
}

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

.nav-result {
    margin-top: 16px;
    padding: 15px 16px;
    background: rgba(255, 255, 255, 0.45);
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.6;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.nav-result .route-info {
    display: flex;
    justify-content: space-around;
    text-align: center;
    padding: 8px 0;
}

.nav-result .route-info .stat {
    font-size: 27px;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, #FF7A2F, #F0556B);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-result .route-info .label {
    font-size: 11.5px;
    color: var(--color-text-muted);
    margin-top: 5px;
    letter-spacing: 1px;
}

/* ============================================================
   浮动按钮 · 液态玻璃球 + 旋转流光环
   ============================================================ */
/* ============================================================
   浮动操作组 · Apple 式竖排玻璃胶囊（v3.9 重设计）
   单颗磨砂玻璃胶囊 + 细分割线 + 描边 SVG 图标，
   去渐变 / 去光环 / 去 emoji —— 简洁高级
   ============================================================ */
.fab-stack {
    position: absolute;
    bottom: 28px;
    right: 18px;
    z-index: 500;
    display: flex;
    flex-direction: column;
    width: 48px;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.72);
    -webkit-backdrop-filter: blur(24px) saturate(170%);
    backdrop-filter: blur(24px) saturate(170%);
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow:
        0 1px 3px rgba(30, 30, 60, 0.10),
        0 10px 28px rgba(30, 30, 60, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    animation: panel-rise 0.8s var(--ease-glass) both;
}

.fab-stack .fab {
    position: static;
    width: 48px;
    height: 48px;
    border: none;
    background: transparent;
    box-shadow: none;
    text-shadow: none;
    animation: none;
    border-radius: 0;
    color: #34384f;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease;
}
.fab-stack .fab + .fab {
    border-top: 1px solid rgba(30, 30, 60, 0.08);   /* 发丝分割线 */
}
.fab-stack .fab:hover  { background: rgba(30, 30, 60, 0.055); }
.fab-stack .fab:active { background: rgba(30, 30, 60, 0.10); transform: scale(0.94); }
.fab-stack .fab svg { width: 20px; height: 20px; }

/* 添加模式激活：橙色浅底 + 图标变橙（克制、无光环） */
.fab-stack .fab.active {
    background: rgba(255, 122, 47, 0.14);
    color: var(--color-accent);
}

/* 深色模式 */
[data-theme="dark"] .fab-stack {
    background: rgba(36, 38, 64, 0.78);
    border-color: rgba(255, 255, 255, 0.10);
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.40),
        0 10px 28px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.10);
}
[data-theme="dark"] .fab-stack .fab { color: #dfe2f2; }
[data-theme="dark"] .fab-stack .fab + .fab { border-top-color: rgba(255, 255, 255, 0.10); }
[data-theme="dark"] .fab-stack .fab:hover  { background: rgba(255, 255, 255, 0.07); }
[data-theme="dark"] .fab-stack .fab:active { background: rgba(255, 255, 255, 0.12); }
[data-theme="dark"] .fab-stack .fab.active {
    background: rgba(255, 163, 107, 0.18);
    color: var(--color-accent-light);
}

/* 底部胶囊按钮（全览 / 新生导览）深色模式 */
[data-theme="dark"] .view-toggle,
[data-theme="dark"] .tour-btn {
    background: rgba(36, 38, 64, 0.78);
    border-color: rgba(255, 255, 255, 0.10);
    color: #dfe2f2;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.40),
        0 10px 28px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.10);
}
[data-theme="dark"] .tour-btn { color: #7FD8CC; }


/* ============================================================
   图例 · 可折叠玻璃卡
   ============================================================ */
.legend {
    position: absolute;
    bottom: 28px;
    left: 20px;
    background: var(--glass-bg);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    padding: 13px 16px;
    border-radius: 20px;
    box-shadow:
        var(--shadow-glass),
        inset 0 1px 0 rgba(255, 255, 255, 0.75);
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 12.5px;
    z-index: 400;
    animation: panel-rise 1s var(--ease-glass) both;
}

.legend::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: var(--edge-glow);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
            mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text-light);
}

.legend .dot {
    width: 13px;
    height: 13px;
    border-radius: 5px;
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.6),
        0 2px 5px rgba(30, 30, 60, 0.18);
}

.dot.gate      { background: var(--cat-gate); }
.dot.teaching  { background: var(--cat-teaching); }
.dot.training  { background: #3949AB; }
.dot.library   { background: var(--cat-library); }
.dot.canteen   { background: var(--cat-canteen); }
.dot.dorm      { background: var(--cat-dorm); }
.dot.faculty   { background: #F48FB1; }
.dot.sports    { background: var(--cat-sports); }
.dot.admin     { background: var(--cat-admin); }
.dot.service   { background: var(--cat-service); }
.dot.stage     { background: var(--cat-stage); }
.dot.landmark  { background: #4DD0E1; }
.dot.academic  { background: #EF5350; }

/* 图例折叠 */
.legend-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background: none;
    border: none;
    font-weight: 700;
    font-size: 12.5px;
    font-family: inherit;
    color: var(--color-text);
    cursor: pointer;
    padding: 0;
    letter-spacing: 0.5px;
}

.legend-arrow {
    transition: transform 0.25s;
    color: var(--color-text-muted);
}

.legend.collapsed .legend-arrow { transform: rotate(-90deg); }

.legend-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.legend.collapsed .legend-body { display: none; }

/* ============================================================
   弹窗 · 液态玻璃大卡
   ============================================================ */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(30, 32, 58, 0.32);
    -webkit-backdrop-filter: blur(10px) saturate(130%);
    backdrop-filter: blur(10px) saturate(130%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.modal-content {
    background: rgba(255, 255, 255, 0.72);
    -webkit-backdrop-filter: var(--glass-blur-strong);
    backdrop-filter: var(--glass-blur-strong);
    border-radius: 30px;
    padding: 32px;
    max-width: 448px;
    width: 90%;
    position: relative;
    box-shadow:
        0 8px 28px rgba(20, 22, 45, 0.18),
        0 36px 90px rgba(20, 22, 45, 0.32),
        0 24px 70px rgba(157, 123, 236, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.85);
    animation: modalIn 0.45s var(--ease-spring);
}

/* 弹窗发光描边 */
.modal-content::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.5px;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 1) 0%,
        rgba(255, 255, 255, 0.2) 35%,
        rgba(190, 205, 255, 0.35) 65%,
        rgba(255, 255, 255, 0.9) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
            mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}

@keyframes modalIn {
    from { transform: scale(0.88) translateY(26px); opacity: 0; }
    to   { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 18px;
    background: rgba(30, 30, 60, 0.08);
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: var(--color-text-light);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    transition: all 0.25s var(--ease-spring);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.modal-close:hover {
    background: var(--color-accent);
    color: #fff;
    transform: rotate(90deg);
    box-shadow: 0 6px 16px rgba(255, 122, 47, 0.4);
}

/* 弹窗内容 */
.info-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.info-icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.85);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 1),
        0 6px 16px rgba(30, 30, 60, 0.12),
        0 0 0 1px rgba(30, 30, 60, 0.04);
}

.info-title h2 {
    font-size: 22px;
    margin-bottom: 7px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.info-title .tag {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg,
        rgba(255, 138, 76, 0.95), rgba(255, 163, 107, 0.9));
    padding: 4px 13px;
    border-radius: 999px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.45),
        0 4px 12px rgba(255, 122, 47, 0.35);
    letter-spacing: 1px;
}

.info-desc {
    font-size: 14px;
    line-height: 1.85;
    color: #4a4a5e;
    margin-bottom: 18px;
    padding: 15px 17px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    border-left: 3px solid var(--color-primary);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        0 2px 8px rgba(30, 30, 60, 0.04);
}

.info-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 4px 0;
}

.info-meta-row {
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: 14px;
    color: var(--color-text);
}

.info-meta-row .meta-emoji {
    font-size: 17px;
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        0 2px 5px rgba(30, 30, 60, 0.06);
}

.info-meta-row .meta-label {
    color: var(--color-text-muted);
    min-width: 70px;
    font-size: 13px;
}

.info-actions {
    margin-top: 24px;
    display: flex;
    gap: 11px;
}

.info-actions button {
    flex: 1;
    padding: 13px;
    border: none;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.28s var(--ease-glass);
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.info-actions button::after {
    content: "";
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 42%;
    border-radius: 16px 16px 40px 40px;
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0));
    pointer-events: none;
}

.btn-nav {
    background: linear-gradient(145deg,
        rgba(255, 150, 80, 0.96), rgba(255, 110, 50, 0.92));
    color: #fff;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -8px 16px rgba(200, 80, 20, 0.25),
        0 8px 22px rgba(255, 122, 47, 0.4);
    text-shadow: 0 1px 2px rgba(120, 50, 0, 0.3);
}

.btn-nav:hover {
    transform: translateY(-2px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        inset 0 -8px 16px rgba(200, 80, 20, 0.25),
        0 12px 30px rgba(255, 122, 47, 0.55);
}

.btn-locate {
    background: linear-gradient(145deg,
        rgba(72, 200, 130, 0.96), rgba(40, 160, 100, 0.92));
    color: #fff;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -8px 16px rgba(20, 110, 65, 0.25),
        0 8px 22px rgba(52, 180, 124, 0.4);
    text-shadow: 0 1px 2px rgba(10, 80, 45, 0.3);
}

.btn-locate:hover {
    transform: translateY(-2px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        inset 0 -8px 16px rgba(20, 110, 65, 0.25),
        0 12px 30px rgba(52, 180, 124, 0.55);
}

/* ============================================================
   地图建筑标记 · 分类色圆点 + 按需名称牌
   ------------------------------------------------------------
   名称主力在底图（原版导视注记），marker 只做三件事：
   ① 分类色圆点常显 —— 可视、可点、颜色即分类
   ② 选中 / 搜索筛选命中时弹出名称牌（屏幕等大，任何缩放可读）
   ③ 筛选未命中的点淡出
   ============================================================ */
.poi {
    position: relative;
    width: 100%;
    height: 100%;
    cursor: pointer;
    transition: opacity 0.3s;
    -webkit-tap-highlight-color: transparent;
}

/* 分类色圆点（屏幕等大，缩放不变） */
.poi-dot {
    position: absolute;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: var(--c, #FF7A2F);
    border: 2px solid #fff;
    box-shadow:
        0 1px 4px rgba(20, 25, 50, 0.32),
        0 0 0 1px rgba(20, 25, 50, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    line-height: 1;
    transition: transform 0.25s var(--ease-spring), box-shadow 0.25s, opacity 0.3s;
}

/* 重点地点：大圆点 + 分类图标 */
.poi-key .poi-dot {
    width: 24px;
    height: 24px;
    bottom: 8px;
    font-size: 12px;
    border-width: 2.5px;
}

.poi:hover .poi-dot { transform: translateX(-50%) scale(1.15); }

/* 名称牌：默认隐藏，命中/选中时弹出（带小尾巴指向圆点） */
.poi-chip {
    display: none;
    position: absolute;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    max-width: 118px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10.5px;
    font-weight: 700;
    color: #fff;
    padding: 3px 8px;
    border-radius: 7px;
    background: var(--c, #FF7A2F);
    box-shadow: 0 2px 6px rgba(20, 25, 50, 0.3);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
    pointer-events: none;
    z-index: 2;
}

.poi-chip::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -4px;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--c, #FF7A2F);
    border-bottom: none;
}

.poi.show-name .poi-chip { display: block; }

/* 选中态：白 + 分类色双环高亮 */
.poi.selected .poi-dot {
    box-shadow:
        0 0 0 3px #fff,
        0 0 0 6px var(--c, #FF7A2F),
        0 3px 10px rgba(20, 25, 50, 0.4);
}

/* 搜索/筛选时：未命中标记淡出 */
.poi.dimmed {
    opacity: 0.12;
    pointer-events: none;
}

/* ============================================================
   地图去乱：按缩放层级显示圆点
   low（全览）只留重点地点；mid 隐藏生活服务小点；high 全显
   ============================================================ */
.poi { transition: opacity 0.35s; }

#map[data-tier="low"] .poi:not(.poi-key) {
    opacity: 0;
    pointer-events: none;
}

#map[data-tier="mid"] .poi-t2 {
    opacity: 0;
    pointer-events: none;
}

/* ============================================================
   Toast · 顶部玻璃药丸
   ============================================================ */
.toast-container {
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1500;
    pointer-events: none;
    align-items: center;
}

.toast {
    display: flex;
    align-items: center;
    gap: 9px;
    background: rgba(255, 255, 255, 0.72);
    -webkit-backdrop-filter: var(--glass-blur-strong);
    backdrop-filter: var(--glass-blur-strong);
    border-radius: 999px;
    padding: 11px 22px;
    font-size: 14px;
    font-weight: 600;
    box-shadow:
        0 8px 24px rgba(20, 22, 45, 0.16),
        0 16px 44px rgba(20, 22, 45, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    position: relative;
    animation: toastIn 0.4s var(--ease-spring);
}

.toast::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: var(--edge-glow);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
            mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}

.toast.success {
    color: #1d7a48;
    box-shadow:
        0 8px 24px rgba(20, 22, 45, 0.14),
        0 0 30px rgba(52, 180, 124, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.toast.error {
    color: #b3403a;
    box-shadow:
        0 8px 24px rgba(20, 22, 45, 0.14),
        0 0 30px rgba(240, 85, 107, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.toast.info {
    color: #a55a1e;
    box-shadow:
        0 8px 24px rgba(20, 22, 45, 0.14),
        0 0 30px rgba(255, 163, 107, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.toast.out { animation: toastOut 0.3s forwards; }

@keyframes toastIn {
    from { transform: translateY(-20px) scale(0.88); opacity: 0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes toastOut {
    from { transform: translateY(0) scale(1); opacity: 1; }
    to   { transform: translateY(-14px) scale(0.9); opacity: 0; }
}

/* ============================================================
   添加建筑面板 · 顶部中央玻璃卡
   ============================================================ */
.add-panel {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 308px;
    background: rgba(255, 255, 255, 0.7);
    -webkit-backdrop-filter: var(--glass-blur-strong);
    backdrop-filter: var(--glass-blur-strong);
    border-radius: var(--radius-md);
    box-shadow:
        0 4px 16px rgba(30, 30, 60, 0.08),
        0 20px 48px rgba(30, 30, 60, 0.18),
        0 0 44px rgba(245, 185, 61, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.85);
    z-index: 600;
    padding: 17px;
    animation: slideDown 0.35s var(--ease-glass);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.add-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: var(--edge-glow);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
            mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}

.add-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.add-header h4 {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.add-close { color: var(--color-text-light); }

.add-panel input {
    width: 100%;
    padding: 11px 15px;
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 14px;
    font-size: 14px;
    font-family: inherit;
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.55);
    outline: none;
    box-shadow:
        inset 0 1px 3px rgba(30, 30, 60, 0.06),
        0 1px 0 rgba(255, 255, 255, 0.6);
    transition: all 0.25s;
}

.add-panel input:focus {
    background: rgba(255, 255, 255, 0.85);
    box-shadow:
        0 0 0 3px rgba(245, 185, 61, 0.3),
        0 0 18px rgba(245, 185, 61, 0.25);
}

.add-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.add-cat {
    padding: 5px 13px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    color: var(--color-text-light);
    border: 1px solid rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.45);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
    transition: all 0.22s var(--ease-glass);
}

.add-cat:hover {
    background: rgba(255, 255, 255, 0.75);
    transform: translateY(-1px);
}

.add-cat.active {
    color: #fff;
    background: linear-gradient(135deg,
        rgba(255, 138, 76, 0.92), rgba(255, 163, 107, 0.86));
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.45),
        0 4px 12px rgba(255, 122, 47, 0.4);
}

.btn-sm { padding: 11px; font-size: 14px; }

/* 次要按钮（清除路线）· 玻璃幽灵按钮 */.btn-ghost {
    width: 100%;
    padding: 11px;
    background: rgba(255, 255, 255, 0.35);
    color: var(--color-text-light);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.22s var(--ease-glass);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
    letter-spacing: 1px;
}

.btn-ghost:hover {
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.7);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        0 4px 12px rgba(30, 30, 60, 0.1);
}

/* 空搜索结果 */
.empty-result {
    text-align: center;
    padding: 30px 16px;
    color: var(--color-text-muted);
    font-size: 14px;
    line-height: 1.8;
}

.empty-result small {
    color: #a5a5bb;
    font-size: 12px;
}

/* ============================================================
   工具类
   ============================================================ */
.hidden { display: none !important; }

/* ============================================================
   响应式：小屏幕 · App 化布局（底部 Tab 导航）
   ============================================================ */
@media (max-width: 768px) {
    body { background: var(--bg-cream, #F4EFE4); }

    #app {
        height: 100vh;
        min-height: 100vh;
        padding-bottom: 0;
        flex-direction: column;
    }

    html, body { height: 100%; margin: 0; padding: 0; overflow: hidden; }

    /* 页面切换：data-tab 控制显示 */
    body[data-tab="map"] #sidebar { display: none; }
    body[data-tab="list"] #map-container { display: none; }

    /* 地图页：#map-container 占满 */
    body[data-tab="map"] #map-container {
        flex: 1;
        width: 100%;
        min-height: 0;
    }

    /* 地图页全屏 */
    #map-container {
        margin: 0;
        border-radius: 0;
        box-shadow: none;
    }
    #map-container::before { display: none; }
    /* 关键：绝对定位填满，避免 flex column 下 height:100% 塌陷 */
    #map {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    /* 列表页全屏 */
    #sidebar {
        width: 100%;
        min-width: 0;
        margin: 0;
        border-radius: 0;
        max-height: none;
        position: relative;
        inset: auto;
        box-shadow: none;
        padding-bottom: calc(110px + env(safe-area-inset-bottom));
    }

    /* 手机端隐藏缩放控件（双指缩放即可，减少左上角堆叠） */
    .leaflet-control-zoom { display: none !important; }

    /* 顶部浮动搜索条（仅手机地图页） */
    .map-search-bar { display: flex; }

    /* 桌面侧边栏底部入口：手机隐藏（有 Tab 栏） */
    .sidebar-footer { display: none; }

    /* FAB 上移避开 Tab 栏 */
    .fab-stack { bottom: calc(96px + env(safe-area-inset-bottom)); right: 12px; width: 44px; }
    .fab-stack .fab { width: 44px; height: 44px; }
    .fab-stack .fab svg { width: 18px; height: 18px; }

    /* 图例贴 Tab 栏上方 */
    .legend {
        bottom: calc(96px + env(safe-area-inset-bottom));
        left: 12px;
        right: auto;
        padding: 9px 12px;
        font-size: 11.5px;
    }

    /* 视野模式切换胶囊（竖屏显示） */
    .view-toggle { display: flex; }

    /* 校园 logo 缩小 */
    .campus-logo {
        top: calc(12px + env(safe-area-inset-top));
        left: 12px;
        padding: 7px 12px 7px 8px;
    }
    .logo-title { font-size: 12px; }
    .logo-sub { font-size: 9px; }

    /* 指北针 */
    .compass {
        bottom: calc(296px + env(safe-area-inset-bottom));
        right: 18px;
        width: 40px; height: 40px;
    }

    /* 添加面板贴顶 */
    .add-panel {
        top: calc(12px + env(safe-area-inset-top));
        width: calc(100% - 32px);
        max-width: 308px;
    }

    /* 导航面板贴顶 */
    .nav-panel { top: calc(12px + env(safe-area-inset-top)); }

    /* 缩放控件 */
    .leaflet-control-zoom { margin-top: calc(52px + env(safe-area-inset-top)) !important; }

    /* 信息弹窗适配 */
    .modal-content { max-width: calc(100vw - 28px); max-height: 84dvh; }
}

/* 桌面：隐藏 Tab 栏与地图搜索条 */
@media (min-width: 769px) {
    #tabbar { display: none; }
    .map-search-bar { display: none; }
}

/* ============================================================
   Leaflet 弹出层 · 玻璃化
   ============================================================ */
.leaflet-popup-content-wrapper {
    border-radius: 18px !important;
    background: rgba(255, 255, 255, 0.82) !important;
    -webkit-backdrop-filter: var(--glass-blur) !important;
    backdrop-filter: var(--glass-blur) !important;
    box-shadow:
        0 8px 28px rgba(20, 22, 45, 0.18) !important,
        inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

.leaflet-popup-tip {
    background: rgba(255, 255, 255, 0.82) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    backdrop-filter: blur(10px) !important;
}

.leaflet-popup-content {
    margin: 13px 17px !important;
    font-family: inherit !important;
    font-size: 13px !important;
    color: var(--color-text) !important;
}

/* 减少动态效果偏好 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================================
   App 壳 · 底部 Tab 栏（手机 · Apple 液态玻璃胶囊）
   ============================================================ */
#tabbar {
    position: fixed;
    left: 14px;
    right: 14px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    z-index: 2000;
    display: none;
    height: 64px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    -webkit-backdrop-filter: blur(30px) saturate(185%);
    backdrop-filter: blur(30px) saturate(185%);
    box-shadow:
        0 2px 8px rgba(31, 35, 65, 0.06),
        0 16px 40px rgba(31, 35, 65, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* 渐变发光描边（液态玻璃 signature） */
#tabbar::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 999px;
    padding: 1.2px;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(255, 255, 255, 0.25) 35%,
        rgba(255, 163, 107, 0.28) 65%,
        rgba(255, 255, 255, 0.85) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
            mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}

@media (max-width: 768px) {
    #tabbar { display: flex; }
}

#tabbar .tab {
    flex: 1;
    position: relative;
    border: none;
    background: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    cursor: pointer;
    color: #9A8C77;
    font-family: inherit;
    transition: color 0.25s, transform 0.3s var(--ease-spring);
    -webkit-tap-highlight-color: transparent;
}

/* 激活态：暖橙 + 玻璃光斑药丸 */
#tabbar .tab.active { color: #F0782E; }
#tabbar .tab.active::before {
    content: "";
    position: absolute;
    top: 7px;
    bottom: 7px;
    left: 18%;
    right: 18%;
    border-radius: 999px;
    background: linear-gradient(160deg,
        rgba(255, 190, 130, 0.38) 0%,
        rgba(255, 138, 66, 0.16) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.65),
        0 4px 14px rgba(255, 122, 47, 0.22);
}

#tabbar .tab-ico {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    position: relative;
    z-index: 1;
    transition: transform 0.3s var(--ease-spring);
}

#tabbar .tab.active .tab-ico { transform: translateY(-1px) scale(1.06); }
#tabbar .tab-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
}

/* 中央添加钮：玻璃凸起圆 */
#tabbar .tab-center { flex: 0.9; }
#tabbar .tab-plus {
    width: 52px;
    height: 52px;
    margin-top: -30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--color-accent);
    box-shadow:
        0 1px 3px rgba(190, 70, 15, 0.25),
        0 8px 20px rgba(190, 70, 15, 0.30);
    transition: transform 0.3s var(--ease-spring);
}
#tabbar .tab-center:active .tab-plus { transform: scale(0.92); }
#tabbar .tab-plus svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: #fff;
    stroke-width: 2;
    stroke-linecap: round;
}

/* ============================================================
   地图页顶部浮动搜索条（手机）
   ============================================================ */
.map-search-bar {
    position: absolute;
    top: calc(12px + env(safe-area-inset-top));
    left: 12px;
    right: 12px;
    z-index: 450;
    display: none;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    border: none;
    border-radius: 18px;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    background: rgba(255, 252, 243, 0.9);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-shadow:
        0 6px 20px rgba(30, 30, 60, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.msb-icon { font-size: 15px; }
.msb-text { font-size: 13.5px; color: #A3937B; flex: 1; }

/* ============================================================
   覆盖式页面（个人中心 / 设置）
   ============================================================ */
.app-page {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: none;
    flex-direction: column;
    background: #F6F1E7;
    background-image:
        radial-gradient(60vw 40vw at 12% 6%, rgba(255, 163, 107, 0.20) 0%, transparent 100%),
        radial-gradient(50vw 40vw at 90% 12%, rgba(125, 190, 142, 0.22) 0%, transparent 100%);
    padding-top: env(safe-area-inset-top);
}

.app-page.open { display: flex; animation: page-in 0.32s var(--ease-glass) both; }

@keyframes page-in {
    from { opacity: 0; transform: translateX(24px); }
    to   { opacity: 1; transform: translateX(0); }
}

.ap-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 16px 12px;
}

.ap-header h2 {
    font-size: 17px;
    font-weight: 800;
    color: #4A3F30;
    letter-spacing: 0.5px;
}

.ap-back {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.75);
    box-shadow: 0 3px 10px rgba(139, 90, 43, 0.10);
    font-size: 22px;
    line-height: 1;
    color: #F0782E;
    cursor: pointer;
    transition: transform 0.25s var(--ease-spring);
}
.ap-back:active { transform: scale(0.92); }

/* ---------- 个人中心 ---------- */
.app-page > .profile-card,
.app-page > .stat-row,
.app-page > .profile-section,
.app-page > .entry-list {
    margin: 0 16px 14px;
}

.app-page::-webkit-scrollbar,
.settings-scroll::-webkit-scrollbar,
.ps-list::-webkit-scrollbar { width: 0; }

.profile-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 6px 22px rgba(139, 90, 43, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.profile-avatar {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    border: none;
    border-radius: 50%;
    font-size: 30px;
    cursor: pointer;
    background: linear-gradient(145deg, #FFE3C2 0%, #FFD1A3 100%);
    box-shadow:
        inset 0 2px 3px rgba(255, 255, 255, 0.8),
        0 6px 16px rgba(255, 122, 47, 0.28);
    transition: transform 0.3s var(--ease-spring);
}
.profile-avatar:active { transform: scale(0.9) rotate(-8deg); }

.profile-info { flex: 1; min-width: 0; }

.profile-nickname {
    width: 100%;
    border: none;
    background: none;
    font-family: inherit;
    font-size: 18px;
    font-weight: 800;
    color: #4A3F30;
    padding: 2px 0;
    border-bottom: 1.5px dashed rgba(240, 120, 46, 0.35);
    outline: none;
}

.profile-sub {
    margin-top: 5px;
    font-size: 12px;
    color: #A3937B;
}

.stat-row {
    display: flex;
    gap: 12px;
}

.stat-cell {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 14px 8px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 4px 14px rgba(139, 90, 43, 0.08);
}

.stat-cell b { font-size: 20px; font-weight: 800; color: #F0782E; }
.stat-cell span { font-size: 11px; color: #A3937B; }

.profile-section {
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 4px 14px rgba(139, 90, 43, 0.08);
    overflow: hidden;
}

.ps-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 16px 9px;
    font-size: 13.5px;
    font-weight: 700;
    color: #6B5C46;
}

.ps-action {
    border: none;
    background: none;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    color: #F0782E;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 9px;
    transition: background 0.2s;
}
.ps-action:active { background: rgba(255, 122, 47, 0.12); }

.ps-list { max-height: 220px; overflow-y: auto; padding-bottom: 6px; }

.ps-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 8px 16px;
    transition: background 0.2s;
}
.ps-item:active { background: rgba(255, 122, 47, 0.07); }

.ps-item-icon {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    border-radius: 11px;
}

.ps-item-name {
    flex: 1;
    min-width: 0;
    font-size: 13.5px;
    font-weight: 600;
    color: #4A3F30;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ps-item-btn {
    border: none;
    background: none;
    font-size: 16px;
    cursor: pointer;
    padding: 6px;
    border-radius: 9px;
    transition: background 0.2s, transform 0.2s var(--ease-spring);
}
.ps-item-btn:active { transform: scale(0.88); background: rgba(0, 0, 0, 0.05); }

.ps-del { opacity: 0.75; }

.ps-empty {
    padding: 22px 16px;
    text-align: center;
    font-size: 12.5px;
    color: #B8AA92;
    line-height: 1.7;
}

/* ---------- 入口列表 ---------- */
.entry-list {
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 4px 14px rgba(139, 90, 43, 0.08);
    overflow: hidden;
    margin-bottom: calc(20px + env(safe-area-inset-bottom));
}

.entry-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: none;
    background: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: #4A3F30;
    cursor: pointer;
    transition: background 0.2s;
    text-align: left;
}
.entry-item:active { background: rgba(255, 122, 47, 0.08); }
.entry-item + .entry-item { border-top: 1px solid rgba(139, 90, 43, 0.08); }

.ei-icon { font-size: 17px; }
.ei-arrow { margin-left: auto; color: #C9BCA4; font-size: 16px; }

/* ---------- 设置页 ---------- */
.settings-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 4px 16px calc(24px + env(safe-area-inset-bottom));
}

.set-group {
    margin-bottom: 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 4px 14px rgba(139, 90, 43, 0.08);
    overflow: hidden;
}

.set-group-title {
    padding: 13px 16px 7px;
    font-size: 12px;
    font-weight: 800;
    color: #A3937B;
    letter-spacing: 1px;
}

.set-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    border: none;
    background: none;
    font-family: inherit;
    cursor: default;
    text-align: left;
    transition: background 0.2s;
}
.set-item + .set-item { border-top: 1px solid rgba(139, 90, 43, 0.07); }

.set-btn { cursor: pointer; }
.set-btn:active { background: rgba(255, 122, 47, 0.08); }
.set-btn .ei-arrow { margin-left: auto; color: #C9BCA4; }

.set-text { flex: 1; min-width: 0; }
.set-name { font-size: 14px; font-weight: 700; color: #4A3F30; }
.set-desc {
    margin-top: 3px;
    font-size: 11.5px;
    color: #A3937B;
    line-height: 1.55;
}

/* 开关 */
.switch {
    position: relative;
    width: 48px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    background: #E4DAC6;
    transition: background 0.3s;
    box-shadow: inset 0 2px 4px rgba(139, 90, 43, 0.18);
}

.switch::after {
    content: "";
    position: absolute;
    top: 2.5px;
    left: 3px;
    width: 23px;
    height: 23px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
    transition: transform 0.3s var(--ease-spring);
}

.switch.on { background: linear-gradient(145deg, #FFA04D, #FF7A2F); }
.switch.on::after { transform: translateX(19px); }

/* 权限徽标 */
.perm-badge {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 11px;
    border-radius: 999px;
    letter-spacing: 0.5px;
}
.perm-badge.granted { color: #1D8A4E; background: #D9F2E3; }
.perm-badge.denied  { color: #C62828; background: #FBDDDB; }
.perm-badge.prompt  { color: #B0761E; background: #FCEFCF; }
.perm-badge.checking { color: #8A8A8A; background: #ECECEC; }

.set-danger { color: #C62828; }
.set-danger:active { background: rgba(198, 40, 40, 0.07); }

/* ============================================================
   我的位置标记（蓝色脉冲圆点）
   ============================================================ */
.user-location { position: relative; }

.ul-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #7EC8FF 0%, #1E88E5 60%, #1565C0 100%);
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(21, 101, 192, 0.5);
    z-index: 2;
}

.ul-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border-radius: 50%;
    background: rgba(30, 136, 229, 0.28);
    animation: ul-pulse-anim 2s ease-out infinite;
    z-index: 1;
}

@keyframes ul-pulse-anim {
    0%   { transform: scale(0.35); opacity: 0.9; }
    100% { transform: scale(1.15); opacity: 0; }
}

.ul-label {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 10.5px;
    font-weight: 700;
    color: #fff;
    padding: 3px 9px;
    border-radius: 8px;
    background: linear-gradient(180deg, #4DA3F0 0%, #1E88E5 100%);
    box-shadow: 0 3px 8px rgba(21, 101, 192, 0.4);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

/* ============================================================
   弹窗内收藏 / 删除按钮
   ============================================================ */
.btn-fav {
    margin-left: auto;
    border: none;
    background: none;
    font-size: 24px;
    cursor: pointer;
    color: #C9BCA4;
    transition: transform 0.25s var(--ease-spring), color 0.25s;
    padding: 4px;
}
.btn-fav:active { transform: scale(0.85); }
.btn-fav.faved { color: #F5A623; text-shadow: 0 2px 8px rgba(245, 166, 35, 0.45); }

.btn-delete {
    width: 100%;
    border: none;
    border-radius: 14px;
    padding: 11px 0;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 700;
    color: #C62828;
    cursor: pointer;
    background: rgba(198, 40, 40, 0.08);
    transition: background 0.25s;
}
.btn-delete:active { background: rgba(198, 40, 40, 0.16); }

.info-actions-danger { margin-top: 8px; }

/* ============================================================
   桌面侧边栏底部入口
   ============================================================ */
.sidebar-footer {
    display: flex;
    gap: 8px;
    padding: 12px 14px 14px;
    border-top: 1px solid rgba(139, 90, 43, 0.10);
    background: rgba(255, 252, 243, 0.5);
}

.side-entry {
    flex: 1;
    border: none;
    border-radius: 13px;
    padding: 10px 8px;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    color: #6B5C46;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 2px 8px rgba(139, 90, 43, 0.08);
    transition: transform 0.25s var(--ease-spring), background 0.25s;
}
.side-entry:hover {
    background: #fff;
    transform: translateY(-1px);
}

/* ============================================================
   启动屏（冷启动过渡 · 液态玻璃质感）
   ============================================================ */
#splash {
    position: fixed;
    inset: 0;
    z-index: 6000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background:
        radial-gradient(70vw 50vw at 20% 8%, rgba(255, 196, 138, 0.35) 0%, transparent 100%),
        radial-gradient(60vw 45vw at 85% 90%, rgba(125, 190, 142, 0.22) 0%, transparent 100%),
        linear-gradient(165deg, #FFF9F0 0%, #FFEFDD 100%);
    animation: splash-out 0.45s ease 0.95s forwards;
    pointer-events: none;
}

#splash.gone { display: none; }

.splash-mark {
    width: 96px;
    height: 96px;
    border-radius: 26px;
    overflow: hidden;
    box-shadow:
        0 18px 44px rgba(255, 122, 47, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    animation: splash-pop 0.7s var(--ease-spring) both;
}
.splash-mark img { width: 100%; height: 100%; display: block; }

.splash-name {
    font-size: 19px;
    font-weight: 800;
    color: #4A3F30;
    letter-spacing: 2px;
    animation: splash-rise 0.6s var(--ease-glass) 0.15s both;
}

.splash-sub {
    font-size: 12px;
    color: #A3937B;
    letter-spacing: 3px;
    animation: splash-rise 0.6s var(--ease-glass) 0.28s both;
}

@keyframes splash-pop {
    from { transform: scale(0.6); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}
@keyframes splash-rise {
    from { transform: translateY(12px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}
@keyframes splash-out {
    to { opacity: 0; visibility: hidden; }
}

/* ============================================================
   首次使用引导（全屏玻璃卡）
   ============================================================ */
#onboard {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(70vw 50vw at 18% 10%, rgba(255, 196, 138, 0.4) 0%, transparent 100%),
        radial-gradient(60vw 45vw at 85% 88%, rgba(125, 190, 142, 0.25) 0%, transparent 100%),
        linear-gradient(165deg, #FFF9F0 0%, #FFEEDC 100%);
}

.ob-deco {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    opacity: 0.55;
}
.ob-d1 {
    width: 220px; height: 220px;
    top: 8%; left: -60px;
    background: radial-gradient(circle at 35% 30%, rgba(255, 178, 102, 0.5), rgba(255, 178, 102, 0.08));
}
.ob-d2 {
    width: 260px; height: 260px;
    bottom: 6%; right: -70px;
    background: radial-gradient(circle at 35% 30%, rgba(125, 190, 142, 0.4), rgba(125, 190, 142, 0.06));
}

.ob-card {
    position: relative;
    width: min(420px, 100%);
    border-radius: 32px;
    padding: 40px 28px 24px;
    text-align: center;
    background: rgba(255, 255, 255, 0.62);
    -webkit-backdrop-filter: blur(30px) saturate(185%);
    backdrop-filter: blur(30px) saturate(185%);
    box-shadow:
        0 24px 70px rgba(90, 60, 25, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.ob-slides { position: relative; min-height: 218px; }

.ob-slide {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    opacity: 0;
    transform: translateX(26px);
    transition: opacity 0.35s var(--ease-glass), transform 0.35s var(--ease-glass);
    pointer-events: none;
}
.ob-slide.active { opacity: 1; transform: translateX(0); pointer-events: auto; }
.ob-slide.leaving { opacity: 0; transform: translateX(-26px); }

.ob-emoji {
    width: 84px;
    height: 84px;
    border-radius: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    background: linear-gradient(160deg, rgba(255, 214, 165, 0.9), rgba(255, 178, 102, 0.55));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        0 12px 30px rgba(255, 122, 47, 0.25);
}

.ob-slide h2 { font-size: 20px; font-weight: 800; color: #4A3F30; letter-spacing: 1px; }
.ob-slide p { font-size: 13.5px; color: #8A7B66; line-height: 1.8; max-width: 280px; }

.ob-dots { display: flex; justify-content: center; gap: 7px; margin: 18px 0 16px; }
.ob-dots i {
    width: 7px; height: 7px;
    border-radius: 999px;
    background: rgba(122, 100, 70, 0.25);
    transition: all 0.3s var(--ease-glass);
}
.ob-dots i.active { width: 20px; background: #FF7A2F; }

.ob-skip {
    margin-top: 12px;
    border: none;
    background: none;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: #A3937B;
    cursor: pointer;
    padding: 6px 14px;
}

/* ============================================================
   设置页补充（检查更新按钮 / 求助描述）
   ============================================================ */
.set-check {
    flex-shrink: 0;
    border: none;
    border-radius: 999px;
    padding: 7px 16px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    color: #F0782E;
    background: rgba(240, 120, 46, 0.12);
    cursor: pointer;
    transition: transform 0.25s var(--ease-spring);
}
.set-check:active { transform: scale(0.94); }
.set-check.busy { color: #A3937B; background: rgba(163, 147, 123, 0.14); }

.entry-item .ei-desc {
    margin-left: auto;
    font-size: 11px;
    color: #B8AA92;
}
.entry-item .ei-desc + .ei-arrow { margin-left: 8px; }

/* SOS 求助按钮强调色 */
.entry-item.sos .ei-icon { filter: hue-rotate(-8deg); }

/* ============================================================
   协议/政策 弹层（玻璃卡）
   ============================================================ */
.doc-layer {
    position: fixed;
    inset: 0;
    z-index: 5500;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(40, 34, 24, 0.35);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}
.doc-layer.open { display: flex; }

.doc-card {
    width: min(420px, 100%);
    border-radius: 26px;
    padding: 26px 22px 20px;
    background: rgba(255, 252, 245, 0.92);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    backdrop-filter: blur(24px) saturate(180%);
    box-shadow:
        0 24px 60px rgba(60, 45, 25, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    text-align: left;
}
.doc-title { font-size: 17px; font-weight: 800; color: #4A3F30; margin-bottom: 12px; letter-spacing: 1px; }
.doc-body { font-size: 13px; color: #6B5C46; line-height: 1.9; margin-bottom: 18px; }

/* ============================================================
   紧凑搜索入口（手机 · 玻璃胶囊）+ 全屏搜索浮层
   ============================================================ */
.search-fab {
    position: absolute;
    top: calc(64px + env(safe-area-inset-top));
    left: 12px;
    z-index: 450;
    display: none;
    align-items: center;
    gap: 7px;
    padding: 9px 16px 9px 12px;
    border: none;
    border-radius: 999px;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    color: #8A7B66;
    background: rgba(255, 255, 255, 0.62);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    backdrop-filter: blur(24px) saturate(180%);
    box-shadow:
        0 4px 16px rgba(31, 35, 65, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.25s var(--ease-spring);
}
.search-fab:active { transform: scale(0.95); }
.search-fab svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: #F0782E;
    stroke-width: 2.2;
    stroke-linecap: round;
}

@media (max-width: 768px) {
    .search-fab { display: inline-flex; }
}

/* ---- 全屏搜索浮层 ---- */
.search-overlay {
    position: fixed;
    inset: 0;
    z-index: 4500;
    display: none;
    padding: calc(10px + env(safe-area-inset-top)) 12px 12px;
    background: rgba(40, 34, 24, 0.28);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
.search-overlay.open { display: block; animation: fadeIn 0.25s; }

.so-panel {
    border-radius: 26px;
    overflow: hidden;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    background: rgba(255, 252, 245, 0.9);
    -webkit-backdrop-filter: blur(30px) saturate(185%);
    backdrop-filter: blur(30px) saturate(185%);
    box-shadow:
        0 24px 70px rgba(60, 45, 25, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.so-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 14px 10px;
}

.so-inputwrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.85);
    box-shadow:
        inset 0 1px 3px rgba(30, 30, 60, 0.07),
        0 1px 0 rgba(255, 255, 255, 0.7);
}
.so-inputwrap svg {
    width: 16px; height: 16px;
    fill: none; stroke: #F0782E;
    stroke-width: 2.2; stroke-linecap: round;
    flex-shrink: 0;
}
.so-inputwrap input {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    font-family: inherit;
    font-size: 14.5px;
    color: #4A3F30;
}
.so-inputwrap input::placeholder { color: #B8AA92; }

.so-clear {
    border: none;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: rgba(74, 63, 48, 0.12);
    color: #8A7B66;
    font-size: 11px;
    cursor: pointer;
    flex-shrink: 0;
}

/* 搜索按钮 · 主色胶囊（浮层头部，点击直达首个结果） */
.so-go {
    border: none;
    border-radius: 14px;
    padding: 10px 14px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #FFA04D, #FF7A2F);
    box-shadow: 0 4px 12px rgba(255, 122, 47, 0.35);
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.22s var(--ease-glass);
}
.so-go:hover {
    filter: brightness(1.06);
    box-shadow: 0 6px 16px rgba(255, 122, 47, 0.45);
}
.so-go:active {
    transform: scale(0.95);
}

.so-close {
    border: none;
    background: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    color: #F0782E;
    cursor: pointer;
    padding: 6px 4px;
}

.so-cats {
    display: flex;
    gap: 7px;
    padding: 4px 14px 10px;
    overflow-x: auto;
    scrollbar-width: none;
}
.so-cats::-webkit-scrollbar { display: none; }

.so-cat {
    flex-shrink: 0;
    padding: 6px 13px;
    border-radius: 999px;
    border: none;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    color: #8A7B66;
    background: rgba(255, 255, 255, 0.75);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.22s var(--ease-glass);
}
.so-cat.active {
    color: #fff;
    background: linear-gradient(135deg, #FFA04D, #FF7A2F);
    box-shadow: 0 4px 12px rgba(255, 122, 47, 0.35);
}

.so-results {
    flex: 1;
    overflow-y: auto;
    padding: 2px 10px 16px;
}

.so-result {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: 16px;
    cursor: pointer;
    transition: background 0.2s;
}
.so-result:active { background: rgba(255, 122, 47, 0.09); }

.so-result-icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 2px 8px rgba(139, 90, 43, 0.10);
}
.so-result-name { font-size: 14px; font-weight: 700; color: #4A3F30; }
.so-result-desc {
    font-size: 11.5px;
    color: #A3937B;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 240px;
}
.so-empty { padding: 34px 0; text-align: center; color: #B8AA92; font-size: 13px; }

/* ============================================================
   V3.1 · 途经点 / 转向指引 / 搜索历史 / 地点备注 / 新生导览
   ============================================================ */

/* 导航面板 · 途经点行 */
.nav-way-row { display: flex; align-items: center; gap: 8px; }
.nav-way-row label {
    font-size: 11.5px; color: var(--color-text-muted);
    font-weight: 600; letter-spacing: 1px; flex-shrink: 0;
}
.nav-way-row select {
    flex: 1; padding: 9px 12px; border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 12px; font-size: 13px; font-family: inherit; color: #4A3F30;
    background: rgba(255, 255, 255, 0.5); outline: none;
}
.nav-way-del {
    width: 26px; height: 26px; flex-shrink: 0;
    border: none; border-radius: 50%;
    background: rgba(198, 40, 40, 0.10); color: #C62828;
    font-size: 12px; cursor: pointer;
}
.btn-way { margin-bottom: 12px; padding: 9px; font-size: 12.5px; }

/* 转向指引列表 */
.nav-steps {
    margin-top: 12px;
    max-height: 180px;
    overflow-y: auto;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.6);
}
.steps-title { font-size: 12.5px; font-weight: 800; color: #6B5C46; margin-bottom: 8px; letter-spacing: 1px; }
.steps-row {
    display: flex; align-items: flex-start; gap: 8px;
    font-size: 12.5px; color: #4A3F30; line-height: 1.5;
    padding: 4px 0;
}
.steps-row i {
    flex-shrink: 0; width: 18px; height: 18px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(240, 120, 46, 0.14); color: #F0782E;
    border-radius: 50%; font-size: 10px; font-weight: 800; font-style: normal;
    margin-top: 1px;
}
.steps-icon { flex-shrink: 0; }

/* 搜索历史 */
.so-hist { padding: 2px 14px 6px; }
.so-hist-head {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 11px; color: #B8AA92; letter-spacing: 1px;
}
.so-hist-head button {
    border: none; background: none; font-family: inherit;
    font-size: 11px; color: #F0782E; cursor: pointer;
}
.so-hist-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.so-hist-chip {
    padding: 5px 11px; border: none; border-radius: 999px;
    font-family: inherit; font-size: 12px; color: #6B5C46;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
    cursor: pointer;
}
.so-hist-chip:active { background: rgba(240, 120, 46, 0.12); }

/* 地点备注（详情弹窗内） */
.info-note {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.55);
    box-shadow: inset 0 1px 3px rgba(30, 30, 60, 0.06);
}
.info-note label {
    display: block; font-size: 12px; font-weight: 700;
    color: #6B5C46; margin-bottom: 7px; letter-spacing: 0.5px;
}
.info-note textarea {
    width: 100%;
    border: none; outline: none; resize: none;
    font-family: inherit; font-size: 13px; color: #4A3F30;
    background: transparent; line-height: 1.6;
}
.info-note textarea::placeholder { color: #C9BCA4; }
.note-hint { font-size: 10.5px; color: #34B47C; }

/* 新生导览按钮 + 进行中卡片 */
.tour-btn {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(134px + env(safe-area-inset-bottom));
    z-index: 455;
    display: none;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border: 1px solid rgba(30, 30, 60, 0.08);
    border-radius: 999px;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: #2F8F85;
    background: rgba(255, 255, 255, 0.78);
    -webkit-backdrop-filter: blur(20px) saturate(170%);
    backdrop-filter: blur(20px) saturate(170%);
    box-shadow:
        0 1px 3px rgba(30, 30, 60, 0.10),
        0 8px 24px rgba(30, 30, 60, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.25s var(--ease-spring);
}
.tour-btn svg { width: 14px; height: 14px; flex: none; }
.tour-btn:active { transform: translateX(-50%) scale(0.95); }
@media (max-width: 768px) { .tour-btn { display: inline-flex; } }
.tour-btn.hidden { display: none !important; }

.tour-card {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: calc(78px + env(safe-area-inset-bottom));
    z-index: 470;
    border-radius: 22px;
    padding: 16px 18px 14px;
    background: rgba(255, 252, 245, 0.94);
    -webkit-backdrop-filter: blur(26px) saturate(180%);
    backdrop-filter: blur(26px) saturate(180%);
    box-shadow:
        0 18px 50px rgba(60, 45, 25, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    animation: slideDown 0.35s var(--ease-glass);
}
.tour-card.hidden { display: none !important; }
.tour-exit {
    position: absolute; top: 10px; right: 12px;
    width: 26px; height: 26px; border-radius: 50%;
    border: none; background: rgba(74, 63, 48, 0.1);
    color: #8A7B66; font-size: 12px; cursor: pointer;
}
.tour-step { font-size: 11px; font-weight: 800; color: #3E9E94; letter-spacing: 2px; }
.tour-name { font-size: 18px; font-weight: 800; color: #4A3F30; margin: 4px 0 2px; }
.tour-tip { font-size: 12.5px; color: #8A7B66; line-height: 1.6; margin-bottom: 12px; }
.tour-actions { display: flex; gap: 10px; }
.tour-actions .btn-ghost, .tour-actions .btn-primary { flex: 1; padding: 10px; font-size: 13.5px; letter-spacing: 1px; }
.tour-actions .btn-primary { border-radius: 12px; }

/* FAQ */
.faq-item { margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px dashed rgba(139, 90, 43, 0.18); }
.faq-item:last-child { border-bottom: none; margin-bottom: 0; }
.faq-q { font-size: 13.5px; font-weight: 700; color: #4A3F30; margin-bottom: 4px; }
.faq-a { font-size: 12.5px; color: #6B5C46; line-height: 1.75; }

/* ============================================================
   v3.2 新增组件：主题分段控件 / 头像选择器 / 个性签名 / 编辑面板
   ============================================================ */

/* 主题分段控件（跟随系统 / 浅色 / 深色） */
.seg {
    display: flex;
    gap: 4px;
    margin: 2px 14px 12px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(139, 90, 43, 0.10);
}
.seg-btn {
    flex: 1;
    border: none;
    border-radius: 999px;
    padding: 9px 0;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: #8A7B66;
    background: none;
    cursor: pointer;
    transition: background 0.22s var(--ease-glass), color 0.22s, box-shadow 0.22s;
}
.seg-btn.active {
    background: #fff;
    color: #4A3F30;
    box-shadow: 0 2px 8px rgba(139, 90, 43, 0.16);
}

/* 头像选择网格 */
.avatar-picker {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin: 10px 16px 0;
    padding: 14px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 8px 28px rgba(139, 90, 43, 0.14);
    animation: page-in 0.25s var(--ease-glass) both;
}
.av-cell {
    border: none;
    background: none;
    font-size: 24px;
    padding: 7px 0;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.18s var(--ease-spring), background 0.18s;
}
.av-cell:hover { background: rgba(255, 122, 47, 0.10); transform: scale(1.12); }
.av-cell.active { background: rgba(255, 122, 47, 0.16); box-shadow: 0 0 0 2px rgba(255, 122, 47, 0.45) inset; }

/* 个性签名输入 */
.profile-bio {
    width: 100%;
    border: none;
    background: none;
    font-family: inherit;
    font-size: 12.5px;
    color: #8A7B66;
    outline: none;
    padding: 0;
    margin-top: 2px;
}
.profile-bio:focus { color: #6B5C46; }

/* 编辑面板补充（复用 .add-panel 玻璃卡片骨架） */
.edit-panel textarea {
    width: 100%;
    padding: 11px 15px;
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 14px;
    font-size: 13.5px;
    font-family: inherit;
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.55);
    outline: none;
    resize: none;
    margin-top: 10px;
    box-shadow: inset 0 1px 3px rgba(30, 30, 60, 0.06);
}
.edit-panel textarea:focus {
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 0 0 3px rgba(245, 185, 61, 0.3);
}
.edit-panel .btn-ghost,
.edit-panel .btn-primary { width: 100%; margin-top: 10px; }
.edit-panel-foot {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}
.edit-panel-foot .btn-delete { margin-top: 0; }
.edit-panel-foot .btn-ghost { margin-top: 0; flex: 1; }
.edit-panel-foot .btn-delete { flex: 1; }
.btn-delete.armed { background: rgba(198, 40, 40, 0.22); }
.set-check.armed { background: rgba(198, 40, 40, 0.16); color: #C62828; }

/* 信息弹窗「编辑地点」按钮 */
.btn-edit {
    background: linear-gradient(145deg,
        rgba(120, 160, 240, 0.96), rgba(78, 130, 220, 0.92));
    color: #fff;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -8px 16px rgba(30, 70, 160, 0.25),
        0 8px 22px rgba(78, 155, 230, 0.4);
    text-shadow: 0 1px 2px rgba(15, 50, 120, 0.3);
}
.btn-edit:hover { transform: translateY(-2px); }
.info-actions-manage { margin-top: 8px; }
.info-actions-manage .btn-delete { width: auto; padding: 11px 16px; }

/* ============================================================
   深色主题（[data-theme="dark"]，由设置页/跟随系统切换）
   底图纸面与 POI 圆点保持原色，只改 UI 层
   ============================================================ */
[data-theme="dark"] {
    --glass-bg:        rgba(28, 30, 42, 0.62);
    --glass-bg-strong: rgba(32, 34, 48, 0.78);
    --glass-bg-soft:   rgba(24, 26, 38, 0.45);
    --color-text:        #F0F0F7;
    --color-text-light:  #C4C4D6;
    --color-text-muted:  #9090A6;
    --edge-glow: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.38) 0%,
        rgba(255, 255, 255, 0.07) 38%,
        rgba(255, 255, 255, 0.03) 62%,
        rgba(255, 255, 255, 0.24) 100%
    );
    --shadow-glass:
        0 2px 8px rgba(0, 0, 0, 0.32),
        0 12px 32px rgba(0, 0, 0, 0.42),
        0 24px 64px rgba(20, 30, 70, 0.20);
    --shadow-glass-hover:
        0 4px 12px rgba(0, 0, 0, 0.38),
        0 18px 44px rgba(0, 0, 0, 0.48),
        0 32px 80px rgba(20, 30, 70, 0.28);
    color-scheme: dark;
}

[data-theme="dark"] body { background: #0F1119; }

/* 极光背景层 → 暗夜版 */
[data-theme="dark"] #app {
    background:
        radial-gradient(46vw 42vw at 8% 12%,
            rgba(70, 100, 190, 0.34) 0%, transparent 100%),
        radial-gradient(40vw 46vw at 22% 88%,
            rgba(110, 80, 190, 0.28) 0%, transparent 100%),
        radial-gradient(44vw 40vw at 50% 30%,
            rgba(200, 110, 60, 0.16) 0%, transparent 100%),
        radial-gradient(38vw 42vw at 88% 78%,
            rgba(40, 130, 100, 0.22) 0%, transparent 100%),
        radial-gradient(30vw 30vw at 78% 10%,
            rgba(180, 70, 120, 0.18) 0%, transparent 100%),
        linear-gradient(150deg, #141824 0%, #10141f 45%, #161320 100%);
}

/* 玻璃面板镜面高光调暗 */
[data-theme="dark"] .liquid-glass {
    box-shadow:
        var(--shadow-glass),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
[data-theme="dark"] .liquid-glass::after {
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.10) 0%,
        rgba(255, 255, 255, 0.02) 100%
    );
}

/* 覆盖式页面（个人中心 / 设置） */
[data-theme="dark"] .app-page {
    background: #131521;
    background-image:
        radial-gradient(60vw 40vw at 12% 6%, rgba(255, 140, 80, 0.10) 0%, transparent 100%),
        radial-gradient(50vw 40vw at 90% 12%, rgba(90, 160, 120, 0.10) 0%, transparent 100%);
}

/* 暖棕文字 → 暗夜可读色 */
[data-theme="dark"] .ap-header h2,
[data-theme="dark"] .profile-nickname,
[data-theme="dark"] .stat-cell b,
[data-theme="dark"] .ps-title,
[data-theme="dark"] .entry-item,
[data-theme="dark"] .set-name,
[data-theme="dark"] .doc-title,
[data-theme="dark"] .ob-slide h2,
[data-theme="dark"] .faq-q,
[data-theme="dark"] .sidebar-header h1,
[data-theme="dark"] .set-group-title { color: #EDE8DE; }

[data-theme="dark"] .profile-sub,
[data-theme="dark"] .stat-cell span,
[data-theme="dark"] .set-desc,
[data-theme="dark"] .perm-badge.checking,
[data-theme="dark"] .ob-skip,
[data-theme="dark"] .msb-text { color: #A9A292; }

[data-theme="dark"] .doc-body,
[data-theme="dark"] .ob-slide p,
[data-theme="dark"] .faq-a,
[data-theme="dark"] .ps-empty,
[data-theme="dark"] .profile-bio,
[data-theme="dark"] .so-hist-head { color: #BDB5A4; }

[data-theme="dark"] .ei-arrow,
[data-theme="dark"] .set-btn .ei-arrow { color: #7E7668; }

/* 卡片 / 列表项背景 */
[data-theme="dark"] .profile-card {
    background: rgba(34, 36, 50, 0.85);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .ob-card {
    background: rgba(30, 32, 46, 0.72);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .doc-card {
    background: rgba(30, 32, 46, 0.94);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .avatar-picker {
    background: rgba(34, 36, 50, 0.92);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}
[data-theme="dark"] .av-cell:hover { background: rgba(255, 255, 255, 0.08); }
[data-theme="dark"] .av-cell.active { background: rgba(255, 150, 80, 0.18); }

/* 开关 */
[data-theme="dark"] .switch { background: #3A3D4C; }
[data-theme="dark"] .switch::after { background: #E8E8F0; }

/* 分段控件 */
[data-theme="dark"] .seg { background: rgba(255, 255, 255, 0.07); }
[data-theme="dark"] .seg-btn { color: #A9A292; }
[data-theme="dark"] .seg-btn.active {
    background: rgba(255, 255, 255, 0.14);
    color: #F0EBE0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

/* 输入控件（添加/编辑面板、导航下拉） */
[data-theme="dark"] .add-panel input,
[data-theme="dark"] .edit-panel textarea {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}
[data-theme="dark"] .add-panel input:focus,
[data-theme="dark"] .edit-panel textarea:focus {
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 3px rgba(245, 185, 61, 0.28);
}
[data-theme="dark"] .add-panel input::placeholder,
[data-theme="dark"] .edit-panel textarea::placeholder { color: #7E7E92; }

/* 权限徽章 → 暗夜半透明 */
[data-theme="dark"] .perm-badge.granted { color: #6FDAA5; background: rgba(60, 180, 120, 0.16); }
[data-theme="dark"] .perm-badge.denied  { color: #FF8A80; background: rgba(220, 80, 70, 0.16); }
[data-theme="dark"] .perm-badge.prompt  { color: #FFD08A; background: rgba(220, 160, 60, 0.16); }
[data-theme="dark"] .perm-badge.checking { color: #9090A6; background: rgba(255, 255, 255, 0.08); }

/* 侧边栏入口 hover */
[data-theme="dark"] .side-entry:hover { background: rgba(255, 255, 255, 0.08); }

/* 小地图外框 */
[data-theme="dark"] .map-overview { background: #1C1E2A; }

/* Leaflet 缩放控件 */
[data-theme="dark"] .leaflet-bar a {
    background: rgba(30, 32, 46, 0.92);
    color: #E8E8F0;
    border-bottom-color: rgba(255, 255, 255, 0.10);
}
[data-theme="dark"] .leaflet-bar a:hover { background: rgba(44, 46, 62, 0.95); }

/* 启动屏 */
[data-theme="dark"] #splash { background: #12141e; }
[data-theme="dark"] .splash-name { color: #EDE8DE; }
[data-theme="dark"] .splash-sub { color: #A9A292; }

/* ============================================================
   v3.3 高德导航按钮 + 移动端编辑面板可用性修复
   ============================================================ */

/* 高德导航按钮（品牌蓝玻璃） */
.btn-amap {
    width: 100%;
    border: none;
    border-radius: 14px;
    padding: 11px 16px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(145deg,
        rgba(48, 145, 252, 0.96), rgba(24, 110, 220, 0.92));
    color: #fff;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -8px 16px rgba(10, 60, 150, 0.25),
        0 8px 22px rgba(38, 145, 252, 0.4);
    text-shadow: 0 1px 2px rgba(8, 50, 130, 0.3);
    transition: transform 0.22s var(--ease-spring), box-shadow 0.22s;
}
.btn-amap:hover { transform: translateY(-2px); }
.btn-amap:active { transform: translateY(0); }
.btn-amap-sm { margin-top: 12px; font-size: 13px; padding: 10px 14px; }

/* 编辑/添加面板：层级提到 Tab 栏之上（Tab 栏 z-index:2000），
   小屏手机限制高度并可滚动，避免底部按钮被 Tab 栏挡住 */
.add-panel { z-index: 2100; }
@media (max-width: 768px) {
    .add-panel {
        max-height: calc(100dvh - 120px - env(safe-area-inset-bottom));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ============================================================
   v3.4 深色模式全面修复（浅色文字 + 白色硬编码背景 = 看不清）
   原则：所有白色半透明面板 → 深色玻璃；硬编码深色文字 → 浅色
   ============================================================ */

/* ---- 详情弹窗（最严重：--color-text 已变浅，白底上直接隐形） ---- */
[data-theme="dark"] .modal-content {
    background: rgba(28, 30, 44, 0.94);
    box-shadow:
        0 8px 28px rgba(0, 0, 0, 0.5),
        0 36px 90px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
[data-theme="dark"] .modal-content::before {
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.35) 0%,
        rgba(255, 255, 255, 0.06) 35%,
        rgba(120, 140, 220, 0.18) 65%,
        rgba(255, 255, 255, 0.28) 100%);
}
[data-theme="dark"] .info-title h2 { color: #F0EBE0; }
[data-theme="dark"] .info-desc {
    color: #D8D2C4;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .info-note { background: rgba(255, 255, 255, 0.05); }
[data-theme="dark"] .info-note label { color: #BDB5A4; }
[data-theme="dark"] .info-note textarea { color: #EDE8DE; }
[data-theme="dark"] .info-note textarea::placeholder { color: #6E6858; }

/* ---- 侧边栏建筑列表 ---- */
[data-theme="dark"] .building-item {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.10);
}
[data-theme="dark"] .building-item:hover {
    background: rgba(255, 255, 255, 0.13);
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(255, 163, 107, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
[data-theme="dark"] .building-icon {
    background: rgba(255, 255, 255, 0.10);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.14),
        0 4px 12px rgba(0, 0, 0, 0.3);
}
[data-theme="dark"] .empty-result small { color: #8A8398; }

/* ---- 桌面搜索框 ---- */
[data-theme="dark"] .search-box input {
    background: rgba(255, 255, 255, 0.08);
    box-shadow:
        inset 0 1px 3px rgba(0, 0, 0, 0.35),
        0 1px 0 rgba(255, 255, 255, 0.10);
}
[data-theme="dark"] .search-box input:focus {
    background: rgba(255, 255, 255, 0.13);
    box-shadow:
        inset 0 1px 2px rgba(0, 0, 0, 0.3),
        0 0 0 3.5px rgba(255, 122, 47, 0.28),
        0 0 24px rgba(255, 122, 47, 0.20);
}

/* ---- 分类选择 chip（添加/编辑面板） ---- */
[data-theme="dark"] .add-cat {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .add-cat:hover { background: rgba(255, 255, 255, 0.14); }

/* ---- 底部 Tab 栏 ---- */
[data-theme="dark"] #tabbar {
    background: rgba(24, 26, 38, 0.78);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.4),
        0 16px 40px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
[data-theme="dark"] #tabbar::before {
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.32) 0%,
        rgba(255, 255, 255, 0.06) 35%,
        rgba(255, 163, 107, 0.16) 65%,
        rgba(255, 255, 255, 0.26) 100%);
}
[data-theme="dark"] #tabbar .tab { color: #8F8894; }
[data-theme="dark"] #tabbar .tab.active { color: #FF9A55; }

/* ---- 新手引导（浅字 + 浅底 = 隐形） ---- */
[data-theme="dark"] #onboard {
    background:
        radial-gradient(70vw 50vw at 18% 10%, rgba(255, 150, 80, 0.14) 0%, transparent 100%),
        radial-gradient(60vw 45vw at 85% 88%, rgba(90, 160, 120, 0.10) 0%, transparent 100%),
        linear-gradient(165deg, #161824 0%, #12141E 100%);
}

/* ---- 移动端搜索浮层 ---- */
[data-theme="dark"] .search-overlay { background: rgba(8, 10, 16, 0.55); }
[data-theme="dark"] .so-panel {
    background: rgba(26, 28, 40, 0.96);
    box-shadow:
        0 24px 70px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.10);
}
[data-theme="dark"] .so-inputwrap {
    background: rgba(255, 255, 255, 0.08);
    box-shadow:
        inset 0 1px 3px rgba(0, 0, 0, 0.35),
        0 1px 0 rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .so-inputwrap input { color: #EDE8DE; }
[data-theme="dark"] .so-inputwrap input::placeholder { color: #6E6858; }
[data-theme="dark"] .so-clear { background: rgba(255, 255, 255, 0.14); color: #A9A292; }
[data-theme="dark"] .so-result:active { background: rgba(255, 150, 80, 0.14); }
[data-theme="dark"] .so-result-icon {
    background: rgba(255, 255, 255, 0.10);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
[data-theme="dark"] .so-result-name { color: #EDE8DE; }
[data-theme="dark"] .so-result-desc { color: #8F8894; }
[data-theme="dark"] .so-empty { color: #8F8894; }
[data-theme="dark"] .so-hist-chip {
    color: #C9C2B2;
    background: rgba(255, 255, 255, 0.10);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10);
}
[data-theme="dark"] .so-hist-chip:active { background: rgba(255, 150, 80, 0.18); }

/* ---- 导航面板下拉 & 步骤 ---- */
[data-theme="dark"] .nav-point select,
[data-theme="dark"] .nav-way-row select {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.08);
    color: #EDE8DE;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}
[data-theme="dark"] .nav-point select:focus {
    background: rgba(255, 255, 255, 0.13);
    box-shadow: 0 0 0 3px rgba(52, 180, 124, 0.3);
}
[data-theme="dark"] .nav-point select option,
[data-theme="dark"] .nav-way-row select option { background: #1C1E2C; color: #EDE8DE; }
[data-theme="dark"] .nav-steps {
    background: rgba(255, 255, 255, 0.06);
    color: #D8D2C4;
}

/* ---- Toast ---- */
[data-theme="dark"] .toast {
    background: rgba(30, 32, 46, 0.92);
    color: #EDE8DE;
}
[data-theme="dark"] .toast.success { color: #6FDAA5; }
[data-theme="dark"] .toast.error   { color: #FF8A80; }
[data-theme="dark"] .toast.info    { color: #FFB35C; }

/* ---- 幽灵按钮 ---- */
[data-theme="dark"] .btn-ghost {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .btn-ghost:hover {
    background: rgba(255, 255, 255, 0.14);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 4px 12px rgba(0, 0, 0, 0.35);
}

/* ---- 深色下底图压暗：圆点/路线更突出，不刺眼 ---- */
[data-theme="dark"] .leaflet-image-layer {
    filter: brightness(0.78) saturate(0.92);
}
[data-theme="dark"] .poi-chip {
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(0, 0, 0, 0.2);
}

/* ============================================================
   v3.4 可视化交互增强
   ============================================================ */

/* 选中地点：扩散光环脉冲（浅色/深色都生效） */
.poi.selected .poi-dot::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 3px var(--c, #FF7A2F);
    animation: poi-pulse 1.6s var(--ease-glass) infinite;
    pointer-events: none;
}
@keyframes poi-pulse {
    0%   { opacity: 0.85; transform: translate(-50%, -50%) scale(1); }
    70%  { opacity: 0;    transform: translate(-50%, -50%) scale(2.6); }
    100% { opacity: 0;    transform: translate(-50%, -50%) scale(2.6); }
}

/* 名称牌弹出动画 */
.poi.show-name .poi-chip { animation: chip-pop 0.3s var(--ease-spring) both; }
@keyframes chip-pop {
    from { opacity: 0; transform: translate(-50%, 6px) scale(0.85); }
    to   { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

/* 主题切换过渡（避免生硬跳变） */
body, .liquid-glass, .app-page, #tabbar, .modal-content, .so-panel {
    transition: background-color 0.35s ease, background 0.35s ease,
                color 0.35s ease, box-shadow 0.35s ease;
}

/* 尊重系统减少动效设置 */
@media (prefers-reduced-motion: reduce) {
    .poi.selected .poi-dot::after { animation: none; }
    .poi.show-name .poi-chip { animation: none; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.15s !important;
    }
}

/* ============================================
 * v3.5 新增：分享按钮 / 搜索高亮 / 键盘导航
 * ============================================ */

/* 分享按钮（蓝绿渐变，与高德按钮区分） */
.btn-share {
    width: 100%;
    border: none;
    border-radius: 14px;
    padding: 11px 16px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(145deg,
        rgba(52, 180, 124, 0.96), rgba(28, 148, 96, 0.92));
    color: #fff;
    box-shadow: 0 4px 14px rgba(52, 180, 124, 0.32);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-share:hover { transform: translateY(-2px); }
.btn-share:active { transform: translateY(0); }
.info-actions .btn-amap + .btn-share { margin-top: 8px; }

/* 搜索结果关键词高亮 */
.building-name mark, .building-desc mark,
.so-result-name mark, .so-result-desc mark {
    background: rgba(255, 213, 79, 0.55);
    color: inherit;
    border-radius: 3px;
    padding: 0 1px;
}
[data-theme="dark"] .building-name mark,
[data-theme="dark"] .building-desc mark,
[data-theme="dark"] .so-result-name mark,
[data-theme="dark"] .so-result-desc mark {
    background: rgba(255, 193, 7, 0.32);
}

/* 键盘 ↑↓ 导航高亮项 */
.building-item.kb-active,
.so-result.kb-active {
    outline: 2px solid var(--color-primary);
    outline-offset: -2px;
    border-radius: 12px;
}
[data-theme="dark"] .building-item.kb-active,
[data-theme="dark"] .so-result.kb-active {
    outline-color: rgba(52, 180, 124, 0.85);
}

/* ============================================
 * v3.8 高级弹窗交互：手势抽屉 / 锚定气泡 / 拖拽排序
 * ============================================ */

/* ---- 12.1 手势底部抽屉 ---- */
.sheet-handle {
    display: none;
}

@media (max-width: 768px) {
    /* 弹窗容器：底部对齐，遮罩保留玻璃模糊 */
    #info-modal.modal {
        align-items: flex-end;
        padding: 0;
    }
    #info-modal .modal-content {
        width: 100%;
        max-width: 100%;
        max-height: 86vh;
        border-radius: 26px 26px 0 0;
        padding: 10px 20px calc(24px + env(safe-area-inset-bottom));
        animation: sheetUp 0.4s var(--ease-spring) both;
        transition: max-height 0.42s var(--ease-spring), border-radius 0.3s ease, transform 0.4s var(--ease-spring);
        will-change: transform;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }
    @keyframes sheetUp {
        from { transform: translateY(100%); opacity: 0.4; }
        to   { transform: translateY(0);    opacity: 1; }
    }
    /* 全屏吸附态 = 卡片展开到全屏：直角铺满，内容可滚动 */
    #info-modal .modal-content.sheet-full {
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
        padding-top: 14px;
    }
    .sheet-handle {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 6px 0 10px;
        margin: -4px -20px 8px;
        cursor: grab;
        touch-action: none;
        user-select: none;
        -webkit-user-select: none;
    }
    .sheet-handle:active { cursor: grabbing; }
    .sheet-grip {
        width: 44px;
        height: 5px;
        border-radius: 3px;
        background: rgba(30, 30, 60, 0.22);
        transition: background 0.25s, width 0.25s;
    }
    .sheet-handle:active .sheet-grip {
        background: rgba(30, 30, 60, 0.38);
        width: 56px;
    }
    .modal-close {
        top: 14px;
        right: 14px;
    }
}

/* ---- 12.2 锚定浮动气泡 ---- */
.poi-popover {
    position: fixed;
    z-index: 2600;
    transform: translate(-50%, -100%);
    min-width: 168px;
    background: rgba(255, 255, 255, 0.78);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    backdrop-filter: blur(22px) saturate(160%);
    border-radius: 16px;
    padding: 6px;
    box-shadow:
        0 6px 20px rgba(20, 22, 45, 0.16),
        0 18px 44px rgba(20, 22, 45, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    animation: popIn 0.28s var(--ease-spring) both;
    transform-origin: 50% 100%;
}
.poi-popover::after {          /* 指向标记的小箭头（玻璃质感） */
    content: "";
    position: absolute;
    bottom: -7px;
    left: 50%;
    width: 14px;
    height: 14px;
    background: inherit;
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    backdrop-filter: blur(22px) saturate(160%);
    transform: translateX(-50%) rotate(45deg);
    border-radius: 3px;
    box-shadow: 4px 4px 10px rgba(20, 22, 45, 0.08);
}
.poi-popover.below {
    transform: translate(-50%, 0);
    transform-origin: 50% 0;
}
.poi-popover.below::after {
    bottom: auto;
    top: -7px;
    box-shadow: none;
}
@keyframes popIn {
    from { transform: translate(-50%, calc(-100% + 6px)) scale(0.82); opacity: 0; }
    to   { transform: translate(-50%, -100%) scale(1);               opacity: 1; }
}
.poi-popover.below { animation-name: popInBelow; }
@keyframes popInBelow {
    from { transform: translate(-50%, -6px) scale(0.82); opacity: 0; }
    to   { transform: translate(-50%, 0) scale(1);                   opacity: 1; }
}
.poi-popover.closing {
    animation: popOut 0.16s ease-in both;
}
@keyframes popOut {
    from { opacity: 1; }
    to   { opacity: 0; transform: translate(-50%, -100%) scale(0.9); }
}
.poi-popover button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 500;
    color: #2c2e4a;
    padding: 10px 12px;
    border-radius: 11px;
    cursor: pointer;
    transition: background 0.15s, transform 0.12s;
    text-align: left;
}
.poi-popover button:hover { background: rgba(96, 118, 255, 0.1); }
.poi-popover button:active { transform: scale(0.96); background: rgba(96, 118, 255, 0.16); }
.poi-popover button + button { margin-top: 1px; }

/* ---- 收藏拖拽排序 ---- */
.ps-title-hint {
    margin-left: auto;
    font-size: 11px;
    font-weight: 400;
    color: rgba(60, 64, 100, 0.45);
}
.ps-list.reordering {
    user-select: none;
    -webkit-user-select: none;
}
.ps-list .ps-item { touch-action: pan-y; }
.ps-item.fav-dragging {
    position: relative;
    z-index: 5;
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 26px rgba(20, 22, 45, 0.28);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    pointer-events: none;
}

/* ---- 深色主题适配 ---- */
[data-theme="dark"] .sheet-grip { background: rgba(255, 255, 255, 0.28); }
[data-theme="dark"] .sheet-handle:active .sheet-grip { background: rgba(255, 255, 255, 0.45); }
[data-theme="dark"] .poi-popover {
    background: rgba(34, 36, 62, 0.86);
    box-shadow:
        0 6px 20px rgba(0, 0, 0, 0.4),
        0 18px 44px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
[data-theme="dark"] .poi-popover button { color: #e8eaf6; }
[data-theme="dark"] .poi-popover button:hover { background: rgba(130, 148, 255, 0.16); }
[data-theme="dark"] .poi-popover button:active { background: rgba(130, 148, 255, 0.24); }
[data-theme="dark"] .ps-item.fav-dragging {
    background: rgba(44, 46, 76, 0.96);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5);
}
[data-theme="dark"] .ps-title-hint { color: rgba(232, 234, 246, 0.4); }

/* ---- 降级：减少动效 ---- */
@media (prefers-reduced-motion: reduce) {
    .poi-popover, .poi-popover.below, .poi-popover.closing { animation: none; }
    #info-modal .modal-content { animation: none; transition: none; }
    .ps-item.fav-dragging { transform: none; transition: none; }
}
.poi-popover.below.closing { animation-name: popOutBelow; }
@keyframes popOutBelow {
    from { opacity: 1; }
    to   { opacity: 0; transform: translate(-50%, 0) scale(0.9); }
}

/* ============================================================
   13. 权限中心（v3.11）
   13.1 预授权引导卡片：先引导，后弹窗
   ============================================================ */
.perm-prime-backdrop {
    position: fixed;
    inset: 0;
    z-index: 3200;
    background: rgba(30, 28, 45, 0.28);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    animation: permFadeIn 0.3s var(--ease-glass, ease);
}
.perm-prime-backdrop.closing { animation: permFadeOut 0.24s ease forwards; }

.perm-prime-card {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 3210;
    width: min(320px, calc(100vw - 48px));
    padding: 26px 22px 18px;
    border-radius: 20px;
    border: 1px solid rgba(30, 30, 60, 0.08);
    background: rgba(255, 255, 255, 0.78);
    -webkit-backdrop-filter: blur(24px) saturate(170%);
    backdrop-filter: blur(24px) saturate(170%);
    box-shadow:
        0 1px 3px rgba(30, 30, 60, 0.10),
        0 16px 44px rgba(30, 30, 60, 0.20),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    text-align: center;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    animation: permPrimeIn 0.55s var(--ease-spring);
    transition: transform 0.5s var(--ease-spring), box-shadow 0.3s ease;
}
.perm-prime-card.dragging {
    transition: none;   /* 拖动中跟手，松手后由 transition 弹簧回中 */
    box-shadow:
        0 2px 5px rgba(30, 30, 60, 0.12),
        0 24px 60px rgba(30, 30, 60, 0.26),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.perm-prime-card.closing { animation: permPrimeOut 0.24s ease forwards; }

@keyframes permPrimeIn {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes permPrimeOut {
    from { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    to   { opacity: 0; transform: translate(-50%, -50%) scale(0.88); }
}
@keyframes permFadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes permFadeOut { from { opacity: 1; } to { opacity: 0; } }

.perm-prime-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 12px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-accent);
    background: rgba(255, 122, 47, 0.12);
    border: 1px solid rgba(255, 122, 47, 0.18);
}
.perm-prime-icon svg { width: 26px; height: 26px; }
.perm-prime-title {
    font-size: 17px;
    font-weight: 700;
    color: #2E2820;
    letter-spacing: 0.3px;
}
.perm-prime-desc {
    margin: 8px 2px 18px;
    font-size: 13px;
    line-height: 1.7;
    color: #6B6152;
}
.perm-prime-actions { display: flex; gap: 10px; }
.perm-prime-btn {
    flex: 1;
    padding: 11px 0;
    border-radius: 999px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.2s var(--ease-spring), background 0.2s ease;
}
.perm-prime-btn:active { transform: scale(0.95); }
.perm-prime-btn.primary {
    border: none;
    color: #fff;
    background: var(--color-accent);
    box-shadow: 0 1px 3px rgba(190, 70, 15, 0.25), 0 6px 16px rgba(190, 70, 15, 0.28);
}
.perm-prime-btn.ghost {
    border: 1px solid rgba(30, 30, 60, 0.10);
    color: #4A4234;
    background: rgba(255, 255, 255, 0.55);
}
.perm-prime-btn.ghost:active { background: rgba(255, 255, 255, 0.85); }

/* ============================================================
   13.2 隐私与权限页：权限卡片列表
   ============================================================ */
.perm-list { display: flex; flex-direction: column; gap: 10px; }
.perm-card {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 14px;
    border: 1px solid rgba(30, 30, 60, 0.07);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.62);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    backdrop-filter: blur(18px) saturate(160%);
    box-shadow: 0 1px 3px rgba(30, 30, 60, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.2s var(--ease-spring), box-shadow 0.2s ease;
}
.perm-card:active { transform: scale(0.98); }
.perm-card-icon {
    flex: none;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5A5040;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(30, 30, 60, 0.06);
}
.perm-card-icon svg { width: 20px; height: 20px; }
.perm-card-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.perm-card-name { font-size: 14px; font-weight: 700; color: #2E2820; }
.perm-card-desc { font-size: 11.5px; line-height: 1.55; color: #8A7F6C; }
.perm-note-text { line-height: 1.9; }

/* ============================================================
   13.3 拒绝后的锚定指引气泡（去设置开启）
   ============================================================ */
.perm-pop {
    position: fixed;
    z-index: 3100;
    transform: translateX(-50%);
    width: min(300px, calc(100vw - 40px));
    padding: 14px 16px 12px;
    border-radius: 16px;
    border: 1px solid rgba(30, 30, 60, 0.08);
    background: rgba(255, 255, 255, 0.85);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    backdrop-filter: blur(22px) saturate(160%);
    box-shadow:
        0 1px 3px rgba(30, 30, 60, 0.10),
        0 12px 32px rgba(30, 30, 60, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    animation: permPopIn 0.35s var(--ease-spring);
}
.perm-pop.below { animation-name: permPopInBelow; }
@keyframes permPopIn {
    from { opacity: 0; transform: translateX(-50%) translateY(6px) scale(0.92); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
@keyframes permPopInBelow {
    from { opacity: 0; transform: translateX(-50%) translateY(-6px) scale(0.92); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
.perm-pop-title { font-size: 13.5px; font-weight: 700; color: #2E2820; margin-bottom: 6px; }
.perm-pop-steps { font-size: 12px; line-height: 1.8; color: #6B6152; margin-bottom: 10px; }
.perm-pop-btn {
    width: 100%;
    padding: 8px 0;
    border: none;
    border-radius: 999px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: var(--color-accent);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.2s var(--ease-spring);
}
.perm-pop-btn:active { transform: scale(0.96); }
.perm-pop-arrow {
    position: absolute;
    left: 50%;
    bottom: -6px;
    width: 12px;
    height: 12px;
    transform: translateX(-50%) rotate(45deg);
    background: rgba(255, 255, 255, 0.85);
    border-right: 1px solid rgba(30, 30, 60, 0.08);
    border-bottom: 1px solid rgba(30, 30, 60, 0.08);
}
.perm-pop.below .perm-pop-arrow {
    bottom: auto;
    top: -6px;
    border: none;
    border-left: 1px solid rgba(30, 30, 60, 0.08);
    border-top: 1px solid rgba(30, 30, 60, 0.08);
}

/* ---- 深色模式 ---- */
[data-theme="dark"] .perm-prime-card,
[data-theme="dark"] .perm-pop {
    background: rgba(36, 38, 64, 0.82);
    border-color: rgba(255, 255, 255, 0.10);
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.40),
        0 16px 44px rgba(0, 0, 0, 0.50),
        inset 0 1px 0 rgba(255, 255, 255, 0.10);
}
[data-theme="dark"] .perm-prime-title,
[data-theme="dark"] .perm-pop-title { color: #EDEFFA; }
[data-theme="dark"] .perm-prime-desc,
[data-theme="dark"] .perm-pop-steps { color: #A9ADC8; }
[data-theme="dark"] .perm-prime-btn.ghost {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    color: #DFE2F2;
}
[data-theme="dark"] .perm-prime-icon {
    background: rgba(255, 163, 107, 0.16);
    border-color: rgba(255, 163, 107, 0.22);
    color: var(--color-accent-light);
}
[data-theme="dark"] .perm-card {
    background: rgba(36, 38, 64, 0.62);
    border-color: rgba(255, 255, 255, 0.09);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .perm-card-icon {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.10);
    color: #C6CADE;
}
[data-theme="dark"] .perm-card-name { color: #EDEFFA; }
[data-theme="dark"] .perm-card-desc { color: #8F94B2; }
[data-theme="dark"] .perm-pop-arrow {
    background: rgba(36, 38, 64, 0.82);
    border-color: rgba(255, 255, 255, 0.10);
}

/* ---- 降级：减少动效 ---- */
@media (prefers-reduced-motion: reduce) {
    .perm-prime-card, .perm-prime-card.closing,
    .perm-prime-backdrop, .perm-prime-backdrop.closing,
    .perm-pop, .perm-pop.below { animation: none; transition: none; }
}
