/* ===========================================================================
   viewer.css —— 查看页：顶栏、地图标记、照片查看器、壁纸模式、移动端适配。
   =========================================================================== */

body.viewer {
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
}

.app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
}

/* ---------------------------------------------------------------- 顶栏 */

.topbar {
    position: relative;
    z-index: var(--z-header);
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    height: var(--header-h);
    padding: 0 var(--sp-4);
    padding-top: var(--safe-top);
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.brand {
    display: flex;
    align-items: baseline;
    gap: var(--sp-2);
    font-size: var(--fs-md);
    font-weight: 600;
    color: var(--text);
    letter-spacing: 0.01em;
    white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand-sub { font-size: var(--fs-xs); font-weight: 400; color: var(--muted); }

.topbar-spacer { flex: 1; }

/* 专辑模式提示 */
.album-chip {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
    max-width: 260px;
}
.album-chip strong {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    width: min(320px, 34vw);
}
.search .input { min-height: 32px; padding-left: var(--sp-5); }
.search-icon {
    position: absolute;
    left: var(--sp-2);
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
}
/* 候选列表与图钉样式已挪到 base.css（管理端也要用） */
.toolbar { display: flex; align-items: center; gap: var(--sp-1); }
.toolbar .sep { width: 1px; height: 20px; background: var(--line); margin: 0 var(--sp-1); }

/* 图层下拉 */
.menu-wrap { position: relative; }
.menu {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    min-width: 172px;
    padding: var(--sp-1);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-3);
    z-index: var(--z-sheet);
}
.menu-item {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    width: 100%;
    padding: var(--sp-2) var(--sp-3);
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    text-align: left;
    font-size: var(--fs-sm);
    cursor: pointer;
}
.menu-item:hover { background: var(--surface-2); }
.menu-item.is-active { color: var(--accent); }
.menu-item.is-active::after { content: "✓"; margin-left: auto; }

/* ---------------------------------------------------------------- 地图 */

.map-wrap { position: relative; flex: 1; min-height: 0; }
#map { position: absolute; inset: 0; background: var(--surface-2); }
.leaflet-container { font-family: var(--font); }
.leaflet-control-attribution { font-size: 10px; background: rgba(255, 255, 255, 0.7); }
/* 地图控件（署名、缩放按钮）的层级取夹缝值 500：
   - 高于 Leaflet 自己的 .leaflet-map-pane(400)，所以不会被聚合/照片标记盖住
   - 低于抽屉(600)、查看器(800)、弹窗(900)，所以不会盖住业务面板 */
.leaflet-top, .leaflet-bottom { z-index: 500 !important; }
/* 点过路线后浏览器会给 SVG 路径画焦点框（就是那条"包围框"），去掉它 */
.leaflet-container svg path:focus,
.leaflet-container svg path { outline: none !important; }
.leaflet-container .leaflet-marker-icon:focus { outline: none !important; }

.map-overlay {
    position: absolute;
    left: 50%;
    top: var(--sp-4);
    transform: translateX(-50%);
    z-index: 400;
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-2) var(--sp-4);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-2);
    font-size: var(--fs-sm);
}

/* 照片标记 */
.mk {
    line-height: 0;
    border-radius: var(--radius);
    overflow: hidden;
    border: 2px solid #fff;
    background: var(--surface-2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
    cursor: pointer;
    transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
        opacity 380ms var(--ease);
}
.mk:hover { transform: scale(1.06); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28); z-index: 999; }
.mk.is-faded { opacity: 0; pointer-events: none; }
.mk img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover !important;
    object-position: center;
}

/* 聚合：一张代表图 + 数量徽标 */
.cluster {
    position: relative;
    width: 86px;
    height: 86px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.cluster > img {
    display: block;
    width: 62px !important;
    height: 62px !important;
    max-width: none !important;
    object-fit: cover !important;
    object-position: center;
    border-radius: var(--radius);
    border: 2px solid #fff;
    background: var(--surface-2);
    box-shadow: 0 0 0 3px rgba(63, 107, 92, 0.16), 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: transform var(--dur) var(--ease);
}
.cluster:hover > img { transform: scale(1.06); }
.cluster-icon { transition: opacity 380ms var(--ease); }
.cluster-icon.is-faded { opacity: 0; pointer-events: none; }
.cluster-count {
    position: absolute;
    right: 4px;
    bottom: 6px;
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-pill);
    background: var(--accent);
    color: #fff;
    font-size: var(--fs-xs);
    font-weight: 600;
    border: 2px solid #fff;
    box-shadow: var(--shadow-1);
}

/* 搜索定位标记 */
.search-marker {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    border: 3px solid #fff;
    box-shadow: 0 0 0 4px rgba(63, 107, 92, 0.25);
}

/* 路线列表 */
.route-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: 1px;
}

/* 点击地图上的路线弹出的详情卡片 */
.leaflet-popup-content-wrapper {
    border-radius: var(--radius);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-3);
    padding: 0;
}
.leaflet-popup-content {
    margin: 0;
    font-family: var(--font);
    font-size: var(--fs-sm);
    line-height: 1.6;
}
.leaflet-popup-tip { box-shadow: none; }
.leaflet-container a.leaflet-popup-close-button {
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--muted);
    font-size: 17px;
    font-weight: 400;
    line-height: 1;
    transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.leaflet-container a.leaflet-popup-close-button:hover {
    background: var(--surface-2);
    color: var(--text);
}

/* 小卡片：途经点 / 起终点 */
.popup-mini {
    padding: var(--sp-3) calc(var(--sp-4) + 6px) var(--sp-3) var(--sp-4);
}
.popup-mini-title {
    font-size: var(--fs-xs);
    color: var(--muted);
    letter-spacing: 0.02em;
    margin-bottom: 3px;
}
.popup-mini-name {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--text);
    line-height: 1.5;
    word-break: break-word;
}
/* 详情面板里的导航块：和 .detail-row 的节奏对齐 */
.pv-detail-extra { margin-top: var(--sp-3); padding-top: var(--sp-3); border-top: 1px solid var(--line); }
.pv-detail-extra .popup-nav { margin-top: 0; }

.popup-nav { margin-top: var(--sp-2); }
.popup-nav-btn {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    font: inherit;
    font-size: var(--fs-xs);
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: border-color var(--dur) var(--ease);
}
.popup-nav-btn:hover, .popup-nav-btn.is-open { border-color: var(--accent); }
/* 竖排：弹层窄，横排会挤成两行且宽度不固定 */
.popup-nav-list { display: flex; flex-direction: column; align-items: stretch; gap: 6px; margin-top: var(--sp-2); }
.popup-nav-link {
    padding: 3px 8px;
    text-align: center;
    font-size: var(--fs-xs);
    color: var(--text-2);
    text-decoration: none;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.popup-nav-link:hover { color: var(--accent); border-color: var(--accent); }

.popup-mini-meta {
    margin-top: 4px;
    font-size: var(--fs-xs);
    color: var(--text-2);
}

/* 路线详情卡片 */
.route-popup { padding: var(--sp-4) calc(var(--sp-4) + 8px) var(--sp-4) var(--sp-4); }
.route-popup h4 { padding-right: 18px; }
.route-popup h4 { font-size: var(--fs-md); margin-bottom: var(--sp-1); }
.route-popup-desc { color: var(--text-2); margin-bottom: var(--sp-2); }
.route-popup-facts {
    display: flex;
    gap: var(--sp-3);
    color: var(--muted);
    font-size: var(--fs-xs);
    margin-bottom: var(--sp-2);
}
.route-popup-block { margin-top: var(--sp-2); }
.route-popup-block > strong {
    display: block;
    font-size: var(--fs-xs);
    color: var(--text-2);
    font-weight: 500;
    margin-bottom: 2px;
}
.route-popup-waypoints { margin: 0; padding-left: 18px; max-height: 168px; overflow: auto; }
.route-popup-waypoints li { margin-bottom: 2px; }
.route-end-badge {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--fs-sm);
    font-weight: 600;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ---- 路线名牌：45° 折线 + 水平线连到文本框（分析框样式），点框才弹详情 ---- */
.route-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}
.route-label-leader { flex: none; display: block; }
.route-label-box {
    margin-left: -1px;
    padding: 4px 10px;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--line);
    border-left: 3px solid var(--pin, var(--accent));
    border-radius: 3px;
    font-size: var(--fs-xs);
    font-weight: 500;
    line-height: 1.5;
    white-space: nowrap;
    box-shadow: var(--shadow-2);
    transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.route-label:hover .route-label-box { color: var(--pin, var(--accent)); }

/* 图钉样式已挪到 base.css（管理端的预览地图 / 选点弹窗也要用） */

/* ------------------------------------------------------------ 照片查看器 */

.pv {
    position: fixed;
    inset: 0;
    z-index: var(--z-viewer);
    display: flex;
    flex-direction: column;
    background: var(--photo-bg);
    opacity: 0;
    visibility: hidden;
    transition: opacity 200ms var(--ease), visibility 200ms var(--ease);
}
.pv.is-open { opacity: 1; visibility: visible; }

.pv-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
    padding: calc(var(--sp-3) + var(--safe-top)) var(--sp-4) var(--sp-3);
    color: #f5f4f2;
}
.pv-title { font-size: var(--fs-sm); color: rgba(245, 244, 242, 0.72); }
.pv-tools { display: flex; align-items: center; gap: var(--sp-2); }
.pv .icon-btn { color: rgba(245, 244, 242, 0.85); border-color: rgba(255, 255, 255, 0.18); }
.pv .icon-btn:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

.pv-stage {
    position: relative;
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.pv-img {
    max-width: 96%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    transition: transform 220ms var(--ease), opacity 220ms var(--ease);
    will-change: transform;
    touch-action: pan-y;
}
.pv-img.is-dragging { transition: none; }
/* 新图还没到位：把旧图压下去（浏览器会一直显示上一张，这就是"闪现"的来源），亮加载环 */
.pv-img.is-loading { opacity: 0; transition: none; }
.pv-loading {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;          /* 别挡住左右切换按钮 */
}
.pv-loading .spinner {
    width: 28px;
    height: 28px;
    border-width: 3px;
    border-color: rgba(255, 255, 255, 0.22);   /* 暗底上用白色的环 */
    border-top-color: #fff;
}
/* 双指捏合期间关掉过渡，否则跟手会飘 */
.pv-img.is-pinching { transition: none; }
/* 查看器打开时，容器内的触摸手势全交给 JS（含双指缩放照片），不再缩放整页；
   需要滚动的地方单独放开 */
.pv.is-open { touch-action: none; }
.pv-detail { touch-action: pan-y; }
.pv-strip { touch-action: pan-x; }
/* 键盘/按钮切换时用更从容的入场动画 */
.pv-img.is-entering {
    transition: transform 420ms cubic-bezier(0.22, 0.61, 0.36, 1), opacity 340ms var(--ease);
}

.pv-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    cursor: pointer;
    transition: background var(--dur) var(--ease);
}
.pv-nav:hover { background: rgba(0, 0, 0, 0.6); }
.pv-prev { left: var(--sp-4); }
.pv-next { right: var(--sp-4); }

.pv-strip {
    display: flex;
    gap: var(--sp-2);
    padding: var(--sp-2) var(--sp-4) calc(var(--sp-2) + var(--safe-bottom));
    overflow-x: auto;
    scrollbar-width: none;
}
.pv-strip::-webkit-scrollbar { display: none; }
.strip-item {
    flex: none;
    width: 54px;
    height: 54px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid transparent;
    opacity: 0.5;
    cursor: pointer;
    transition: opacity var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.strip-item img { width: 100%; height: 100%; object-fit: cover; }
.strip-item:hover { opacity: 0.85; }
.strip-item.is-active { opacity: 1; border-color: #fff; }

.pv-detail {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    width: min(340px, 86vw);
    padding: var(--sp-5) var(--sp-4);
    background: var(--surface);
    border-left: 1px solid var(--line);
    overflow: auto;
    transform: translateX(100%);
    opacity: 0;
    transition: transform 220ms var(--ease), opacity 180ms var(--ease);
}
.pv-detail.is-open { transform: none; opacity: 1; }
.pv-detail h3 { margin-bottom: var(--sp-4); }
/* .detail-row 已挪到 base.css（管理端概览也在用） */

/* ------------------------------------------------------------ 壁纸模式 */

.wp {
    position: fixed;
    inset: 0;
    z-index: var(--z-viewer);
    overflow: hidden;
    background: #000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 400ms var(--ease), visibility 400ms var(--ease);
    cursor: none;
}
.wp.is-open { opacity: 1; visibility: visible; }
.wp.is-showing-ui { cursor: default; }

.wp-layer { position: absolute; inset: 0; }

.wp-frame {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 620ms var(--ease);
}
.wp-frame.is-visible { opacity: 1; }
.wp-frame.is-instant { transition: none; }

.wp-bg {
    position: absolute;
    inset: -40px;
    background-size: cover;
    background-position: center;
    filter: blur(20px) brightness(0.78) saturate(1.1);
}

/* 前景照片：整体缩放由 JS 通过 max-width/max-height 控制 */
.wp-fg {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.98);
    transition: transform 800ms var(--ease);
}
.wp-frame.is-visible .wp-fg { transform: translate(-50%, -50%) scale(1); }
/* 不勾动效时：照片直接就位 —— 既不淡入（frame 已是 is-instant），也不做 0.98→1 的放大 */
.wp-frame.is-instant .wp-fg { transform: translate(-50%, -50%) scale(1); transition: none; }
.wp-fg img {
    display: block;
    border-radius: var(--radius);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.wp-info,
.wp-exit-hint,
.wp-controls {
    position: absolute;
    z-index: 3;
    opacity: 0;
    transition: opacity 250ms var(--ease);
}
.wp.is-showing-ui .wp-info,
.wp.is-showing-ui .wp-controls { opacity: 1; }

.wp-info {
    left: var(--sp-5);
    bottom: var(--sp-5);
    color: rgba(255, 255, 255, 0.88);
    font-size: var(--fs-sm);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

.wp-exit-hint {
    left: 50%;
    transform: translateX(-50%);
    bottom: var(--sp-5);
    padding: 2px var(--sp-4);
    border-radius: var(--radius-pill);
    background: rgba(0, 0, 0, 0.45);
    color: rgba(255, 255, 255, 0.85);
    font-size: var(--fs-xs);
    transition: opacity 600ms var(--ease);
}

.wp-controls {
    right: var(--sp-5);
    bottom: var(--sp-5);
    display: flex;
    align-items: center;
    gap: var(--sp-2);
}
.wp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 var(--sp-3);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: var(--radius-pill);
    background: rgba(0, 0, 0, 0.42);
    color: #fff;
    font-size: var(--fs-sm);
    cursor: pointer;
    transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.wp-btn:hover { background: rgba(0, 0, 0, 0.65); }
.wp-btn.is-active { border-color: rgba(255, 255, 255, 0.6); background: rgba(255, 255, 255, 0.2); }
.wp-btn-text { padding: 0 var(--sp-4); }

.wp-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.16);
}
.wp-progress span { display: block; height: 100%; width: 0; background: rgba(255, 255, 255, 0.8); }

.wp-map {
    position: absolute;
    right: var(--sp-5);
    top: var(--sp-5);
    z-index: 3;
    width: 260px;
    height: 176px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: var(--shadow-3);
    opacity: 1;
    transition: opacity 900ms var(--ease);
}
/* 控件显示时地图完全清晰；控件淡出后降到 60%，不喧宾夺主 */
.wp:not(.is-showing-ui) .wp-map { opacity: 0.6; }

/* 全屏浮层打开时隐藏地图控件（缩放按钮、版权行、比例尺） */
body.pv-open .leaflet-bottom.leaflet-right,
body.wp-open .leaflet-bottom.leaflet-right,
body.pv-open .leaflet-top.leaflet-left,
body.wp-open .leaflet-top.leaflet-left {
    display: none !important;
}

/* 时间旅行的告示牌 */
.signboard { animation: signboard-drop 420ms var(--ease); transform-origin: bottom center; }
.signboard-card {
    width: 156px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 3px solid #fff;
    background: #fff;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}
.signboard-card img {
    display: block;
    /* 必须带 !important：Leaflet 自带 `.leaflet-container ... img { width: auto !important }`
       否则图片会按自然尺寸渲染，窄照片就会露出底色 */
    width: 100% !important;
    height: auto !important;
    max-width: none !important;
    object-fit: cover;
    background: var(--surface-3);
}
.signboard-meta {
    padding: 3px 6px;
    font-size: 11px;
    line-height: 1.35;
    color: #3d3a37;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.signboard-post { width: 3px; height: 26px; margin: 0 auto; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); }
.signboard-ground {
    width: 16px;
    height: 5px;
    margin: 0 auto;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.28);
}
@keyframes signboard-drop {
    from { opacity: 0; transform: translateY(-22px) scale(0.86); }
    to { opacity: 1; transform: none; }
}

/* 时间旅行面板 */
.tl {
    position: fixed;
    left: 50%;
    bottom: calc(var(--sp-5) + var(--safe-bottom));
    transform: translate(-50%, 8px);
    z-index: var(--z-sheet);
    width: min(680px, calc(100vw - 32px));
    padding: var(--sp-3) var(--sp-4);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-3);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease),
        visibility var(--dur) var(--ease);
}
.tl.is-open { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.tl-row { display: flex; align-items: center; gap: var(--sp-3); }
.tl-row + .tl-row { margin-top: var(--sp-2); }
.tl-range { flex: 1; accent-color: var(--accent); }
.tl-date { font-size: var(--fs-sm); color: var(--text-2); min-width: 92px; }

/* ------------------------------------------------------------ 移动端 */

@media (max-width: 760px) {
    :root { --header-h: 52px; }

    .topbar { gap: var(--sp-2); padding: 0 var(--sp-3); padding-top: var(--safe-top); }
    .brand { font-size: var(--fs-base); }
    .brand-sub { display: none; }

    .search {
        position: absolute;
        left: var(--sp-3);
        right: var(--sp-3);
        top: calc(var(--header-h) + var(--safe-top) + 6px);
        width: auto;
        display: none;
        z-index: var(--z-sheet);
    }
    .search.is-open { display: flex; }
    .search .input {
        min-height: 40px;
        box-shadow: var(--shadow-2);
    }

    /* 专辑模式下把提示条压窄：只留图标 + 专辑名，给右侧按钮让位 */
    .album-chip { max-width: 38vw; padding: 0 var(--sp-2); }
    .album-chip-label { display: none; }
    .toolbar { gap: 0; }

    .mk { border-radius: var(--radius-sm); }

    .pv-top { padding: calc(var(--sp-2) + var(--safe-top)) var(--sp-3) var(--sp-2); }
    .pv-title { display: none; }
    .pv-nav { width: 40px; height: 40px; background: rgba(0, 0, 0, 0.3); }
    .pv-prev { left: var(--sp-2); }
    .pv-next { right: var(--sp-2); }
    .pv-strip { padding: var(--sp-2) var(--sp-3) calc(var(--sp-2) + var(--safe-bottom)); }
    .strip-item { width: 44px; height: 44px; }

    .pv-detail {
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        width: auto;
        max-height: 62vh;
        border-left: 0;
        border-top: 1px solid var(--line);
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        padding-bottom: calc(var(--sp-5) + var(--safe-bottom));
        transform: translateY(100%);
    }
    .pv-detail.is-open { transform: none; }

    .sheet {
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        bottom: 0 !important;
        width: auto !important;
        max-height: 68vh;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        border-bottom: 0;
        transform: translateY(100%);
    }
    .sheet.is-open { transform: none; }

    .map-overlay { font-size: var(--fs-xs); padding: var(--sp-1) var(--sp-3); }
    .wp-meta { left: var(--sp-4); bottom: calc(var(--sp-5) + var(--safe-bottom)); }
    .wp-controls { right: var(--sp-4); bottom: calc(var(--sp-5) + var(--safe-bottom)); }
    /* 竖屏也保留地理显示，只是放小一点 */
    .wp-map {
        display: block;
        width: 42vw;
        height: 30vw;
        min-width: 132px;
        min-height: 96px;
        max-width: 220px;
        max-height: 160px;
        right: var(--sp-3);
        top: calc(var(--sp-3) + var(--safe-top));
    }
}

@media (min-width: 761px) {
    .sheet { width: 300px; max-height: 60vh; }
    .sheet-albums { top: calc(var(--header-h) + var(--safe-top) + 12px); right: var(--sp-4); }
    .sheet-routes { top: calc(var(--header-h) + var(--safe-top) + 12px); right: var(--sp-4); }
}
