/*
 * 媒体资源页：列表、详情弹框、城市选择、投放清单抽屉。
 * 版式按 mediamall 媒体资源页实测值还原（卡片圆角 20、图片 325×203、名称 15/700、标签 11/700、按钮 40 高圆角 12）。
 */
.mr-page,
.mr-modal,
.mr-drawer,
.mr-cart-fab {
    --mr-blue: #155dfc;
    --mr-blue-soft: rgba(21, 93, 252, 0.06);
    --mr-blue-line: rgba(21, 93, 252, 0.18);
    --mr-ink: #080f1f;
    --mr-muted: #475569;
    --mr-faint: #94a3b8;
    --mr-line: rgba(15, 23, 42, 0.06);
    --mr-bg: #f7f8fa;
    --mr-font: -apple-system, "system-ui", "SF Pro Text", "PingFang SC", "Helvetica Neue", "Microsoft YaHei", Arial, sans-serif;
    font-family: var(--mr-font);
    color: var(--mr-ink);
}

/* 页头 .ty-header 固定定位、高 104px，内容从其下方开始 */
.mr-page { background: var(--mr-bg); padding: 124px 0 72px; min-height: 100vh; box-sizing: border-box; }
/* 与 mediamall 一致：内容区最宽 1480（含左右 40 内边距共 1560）；≥1536 五列、1280–1535 四列、1024–1279 三列 */
.mr-wrap { max-width: 1560px; margin: 0 auto; padding: 0 40px; box-sizing: border-box; }
.mr-page button, .mr-modal button, .mr-drawer button, .mr-cart-fab { font-family: inherit; cursor: pointer; }
.mr-page svg, .mr-modal svg, .mr-drawer svg, .mr-cart-fab svg {
    fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* ---- 筛选栏 ---- */
.mr-filterbar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 18px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 4px 20px rgba(31, 31, 31, 0.04);
    backdrop-filter: blur(12px);
}

.mr-tabs { flex: 1; min-width: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.mr-tabs::-webkit-scrollbar { display: none; }

.mr-tab {
    flex: none;
    height: 36px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 9999px;
    background: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--mr-muted);
    transition: background .2s, color .2s;
}

.mr-tab:hover { color: var(--mr-ink); background: rgba(255, 255, 255, 0.8); }
.mr-tab[aria-selected="true"] {
    border-color: transparent;
    background: var(--mr-blue);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(21, 93, 252, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.mr-city-btn {
    flex: none;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    max-width: 240px;
    padding: 0 12px 0 16px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 500;
    color: var(--mr-ink);
}

.mr-city-btn svg { width: 16px; height: 16px; flex: none; color: var(--mr-muted); stroke-width: 1.6; }
.mr-city-btn .mr-chevron { width: 14px; height: 14px; }
.mr-city-btn.is-active { color: var(--mr-blue); border-color: var(--mr-blue-line); }
.mr-city-btn.is-active svg { color: var(--mr-blue); }
.mr-city-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.mr-subbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 20px 4px; min-height: 34px; }
.mr-count { margin: 0; font-size: 13px; font-weight: 500; color: var(--mr-muted); }
.mr-sorts { display: flex; align-items: center; gap: 8px; }

.mr-sort {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    height: 34px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 9999px;
    background: none;
    font-size: 13px;
    font-weight: 500;
    color: var(--mr-muted);
}

.mr-sort[aria-pressed="true"] {
    border-color: var(--mr-blue-line);
    background: rgba(255, 255, 255, 0.7);
    color: var(--mr-blue);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(21, 93, 252, 0.08);
}

.mr-sort[hidden] { display: none; }
.mr-sort svg { width: 14px; height: 14px; stroke-width: 2; }
.mr-sort svg path { opacity: .45; }
.mr-sort[data-dir="asc"] svg .up,
.mr-sort[data-dir="desc"] svg .down { opacity: 1; }

/* ---- 列表 / 地图 切换 ---- */
.mr-views { display: flex; gap: 2px; margin-left: 8px; padding: 4px; border-radius: 14px; background: rgba(15, 23, 42, 0.05); }
.mr-views[hidden] { display: none; }
.mr-view {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 14px;
    border: 0;
    border-radius: 10px;
    background: none;
    font-size: 13px;
    font-weight: 500;
    color: var(--mr-muted);
}

.mr-view svg { width: 15px; height: 15px; stroke-width: 1.8; }
.mr-view[aria-pressed="true"] { background: #fff; color: var(--mr-blue); font-weight: 600; box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08); }

/* ---- 地图 ---- */
.mr-map-wrap {
    position: relative;
    height: calc(100vh - 200px);
    min-height: 520px;
    border: 1px solid var(--mr-line);
    border-radius: 20px;
    background: #eef2f6;
    overflow: hidden;
}

.mr-map-wrap[hidden] { display: none; }
.mr-map { position: absolute; inset: 0; }

.mr-map-chip {
    position: absolute;
    top: 16px;
    z-index: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
    font-size: 12px;
    font-weight: 600;
    color: var(--mr-ink);
    pointer-events: none;
}

.mr-map-chip:empty { display: none; }
.mr-map-chip.left { left: 16px; }
.mr-map-chip.right { right: 16px; color: var(--mr-blue); }
.mr-map-chip.right i { width: 7px; height: 7px; border-radius: 50%; background: #10b981; }

.mr-map-msg {
    position: absolute;
    inset: 0;
    z-index: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(238, 242, 246, 0.85);
    color: var(--mr-muted);
    font-size: 14px;
    text-align: center;
}

.mr-map-msg[hidden] { display: none; }

.mr-divicon { background: none !important; border: 0 !important; overflow: visible !important; }
.mr-bubble {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    cursor: pointer;
    user-select: none;
}

.mr-bubble b {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #3b7bff, #155dfc 60%, #0f47c7);
    box-shadow: 0 0 0 6px rgba(21, 93, 252, 0.18), 0 8px 18px rgba(21, 93, 252, 0.35);
    color: #fff;
    font-family: var(--mr-font, sans-serif);
    font-size: 14px;
    font-weight: 700;
    transition: transform .15s ease;
}

.mr-bubble:hover b { transform: scale(1.08); }
.mr-bubble span {
    margin-top: 8px;
    padding: 1px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
    font-family: var(--mr-font, sans-serif);
    font-size: 12px;
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
}

/* ---- 卡片 ---- */
.mr-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }

.mr-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--mr-line);
    border-radius: 20px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 4px 20px rgba(31, 31, 31, 0.04);
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease;
}

.mr-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(31, 31, 31, 0.1); }

.mr-cover {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 325 / 203;
    padding: 0;
    border: 0;
    background: #eef2f7 url(../img/media-placeholder.svg) center / cover no-repeat;
    overflow: hidden;
}

.mr-page .mr-cover img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.mr-card:hover .mr-cover img { transform: scale(1.04); }

.mr-loc {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 24px 14px 12px;
    background: linear-gradient(to top, rgba(31, 31, 31, 0.75), rgba(0, 0, 0, 0));
    color: rgba(255, 255, 255, 0.95);
    font-size: 13px;
    font-weight: 500;
    line-height: 19.5px;
    text-align: left;
}

.mr-loc svg { width: 16px; height: 16px; flex: none; stroke-width: 1.8; }
.mr-loc span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.mr-body { display: flex; flex: 1; flex-direction: column; padding: 14px 14px 16px; }

.mr-name {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    min-height: 40.5px;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    font-size: 15px;
    font-weight: 700;
    line-height: 20.25px;
    color: var(--mr-ink);
    text-align: left;
    overflow: hidden;
    overflow-wrap: anywhere;
}

.mr-name:hover { color: var(--mr-blue); }

.mr-tags { display: flex; flex-wrap: wrap; gap: 6px; height: 25px; margin-top: 10px; overflow: hidden; }

.mr-tag {
    max-width: 100%;
    padding: 3px 10px;
    border: 1px solid var(--mr-blue-line);
    border-radius: 10px;
    background: var(--mr-blue-soft);
    color: var(--mr-blue);
    font-size: 11px;
    font-weight: 700;
    line-height: 16.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
}

.mr-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
    padding-top: 14px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.mr-price-num { display: flex; align-items: baseline; gap: 6px; min-width: 0; white-space: nowrap; }
.mr-price-num strong { font-size: 16px; font-weight: 700; line-height: 16px; }
.mr-price-num small { font-size: 12px; font-weight: 500; line-height: 18px; color: var(--mr-muted); overflow: hidden; text-overflow: ellipsis; }
.mr-price-num { min-height: 18px; }
.mr-price-num .mr-ask { font-size: 15px; line-height: 18px; color: var(--mr-muted); }

.mr-ref { display: inline-flex; align-items: center; gap: 3px; flex: none; color: var(--mr-blue); font-size: 11px; font-weight: 700; line-height: 16.5px; cursor: help; }
.mr-ref svg { width: 12px; height: 12px; stroke-width: 2; }

.mr-add {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    height: 40px;
    margin-top: 16px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: var(--mr-blue);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    transition: background .2s, color .2s, border-color .2s;
}

.mr-add svg { width: 16px; height: 16px; stroke-width: 1.8; }
.mr-add:hover { background: #0f4fe0; }
.mr-add.is-added { background: var(--mr-blue-soft); border-color: var(--mr-blue-line); color: var(--mr-blue); }
.mr-add.is-added:hover { background: rgba(21, 93, 252, 0.1); }

/* ---- 加载 / 空 / 错误 / 到底 ---- */
.mr-skeleton .mr-cover,
.mr-skeleton .mr-line {
    background: linear-gradient(90deg, #eef1f5 25%, #f6f8fa 50%, #eef1f5 75%);
    background-size: 200% 100%;
    animation: mr-shimmer 1.2s infinite;
}

.mr-skeleton:hover { transform: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 4px 20px rgba(31, 31, 31, 0.04); }
.mr-line { height: 14px; border-radius: 6px; margin-top: 12px; }
.mr-line.w40 { width: 40%; }
.mr-line.w60 { width: 60%; }
.mr-line.btn { height: 40px; border-radius: 12px; margin-top: 18px; }

@keyframes mr-shimmer { to { background-position: -200% 0; } }

.mr-state {
    padding: 72px 20px;
    border: 1px dashed rgba(15, 23, 42, 0.12);
    border-radius: 20px;
    background: #fff;
    color: var(--mr-muted);
    font-size: 14px;
    text-align: center;
}

.mr-state button, .mr-btn-ghost {
    margin-top: 14px;
    padding: 8px 22px;
    border: 1px solid var(--mr-blue-line);
    border-radius: 9999px;
    background: #fff;
    color: var(--mr-blue);
    font-size: 13px;
    font-weight: 600;
}

.mr-sentinel { height: 1px; }
.mr-end, .mr-loading-more { margin: 28px 0 0; color: var(--mr-faint); font-size: 13px; text-align: center; }
.mr-more { margin: 36px 0 0; text-align: center; font-size: 14px; }
.mr-more a { color: var(--mr-blue); }

/* ---- 投放清单悬浮按钮 ---- */
.mr-cart-fab {
    position: fixed;
    right: 32px;
    bottom: 32px;
    z-index: 1500;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 48px;
    padding: 0 10px 0 16px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    color: var(--mr-ink);
    font-size: 14px;
    font-weight: 600;
}

.mr-cart-fab svg { width: 20px; height: 20px; color: var(--mr-blue); stroke-width: 1.8; }
.mr-cart-count {
    min-width: 26px;
    height: 26px;
    padding: 0 7px;
    border-radius: 9999px;
    background: var(--mr-blue-soft);
    color: var(--mr-blue);
    font-size: 13px;
    line-height: 26px;
    text-align: center;
    box-sizing: border-box;
}

.mr-cart-fab.has-items .mr-cart-count { background: var(--mr-blue); color: #fff; }
.mr-cart-fab.bump { animation: mr-bump .35s ease; }
@keyframes mr-bump { 50% { transform: scale(1.08); } }

/* ---- 弹层通用 ---- */
html.mr-lock, html.mr-lock body { overflow: hidden; }
.mr-mask { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.45); backdrop-filter: blur(6px); }

.mr-x {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.45);
    color: #fff;
}

.mr-x svg { width: 16px; height: 16px; stroke-width: 2.2; }
.mr-x:hover { background: rgba(15, 23, 42, 0.65); }
.mr-x.light { background: rgba(15, 23, 42, 0.05); color: var(--mr-muted); }
.mr-x.light:hover { background: rgba(15, 23, 42, 0.1); }

/* ---- 详情弹框 ---- */
.mr-modal { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 75px 24px 25px; }
.mr-modal[hidden] { display: none; }

.mr-dialog {
    position: relative;
    display: flex;
    width: 100%;
    max-width: 880px;
    max-height: min(800px, 100%);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
    overflow: hidden;
    outline: none;
    animation: mr-pop .2s ease-out;
}

@keyframes mr-pop { from { opacity: 0; transform: translateY(12px) scale(.985); } }

.mr-dialog > .mr-x { position: absolute; top: 16px; right: 16px; z-index: 3; }

/* 照片固定在顶部，下面的价格和媒体信息单独滚动（与 mediamall 一致） */
.mr-dialog-main { display: flex; flex: 1; flex-direction: column; min-width: 0; min-height: 0; background: #fff; }
.mr-hero { flex: none; }
.mr-dialog-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }

/* 参考价 + 加入资源清单：照片下方、媒体信息上方 */
.mr-buybar { display: flex; align-items: center; gap: 16px; margin: 20px 26px 0; padding: 16px 16px 16px 20px; border-radius: 16px; background: #f5f8fc; }

.mr-hero { position: relative; height: 246px; background: #e9eef5; overflow: hidden; }
.mr-hero img { display: block; width: 100%; height: 100%; object-fit: cover; }

.mr-hero-nav {
    position: absolute;
    top: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-top: -17px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.45);
    color: #fff;
}

.mr-hero-nav svg { width: 16px; height: 16px; stroke-width: 2.2; }
.mr-hero-nav:hover { background: rgba(15, 23, 42, 0.65); }
.mr-hero-nav.prev { left: 16px; }
.mr-hero-nav.next { right: 16px; }

.mr-hero-count {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 2px 10px;
    border-radius: 9999px;
    background: rgba(15, 23, 42, 0.45);
    color: #fff;
    font-size: 12px;
    line-height: 22px;
}

.mr-hero-title {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 56px 26px 22px;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0));
    color: #fff;
}

.mr-hero-title h3 { margin: 0; font-size: 24px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.25); }
.mr-hero-title p { display: flex; align-items: center; gap: 4px; margin: 6px 0 0; font-size: 14px; opacity: .9; }
.mr-hero-title p svg { width: 15px; height: 15px; stroke-width: 1.8; }

.mr-info { padding: 22px 26px 30px; }
.mr-info-title { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; font-size: 13px; font-weight: 700; }
.mr-info-title::after { content: ''; flex: 1; height: 1px; background: rgba(15, 23, 42, 0.08); }

.mr-cells { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.mr-cell { min-width: 0; padding: 11px 12px; border-radius: 10px; background: #f5f7fa; }
.mr-cell.span2 { grid-column: span 2; }
.mr-cell.wide { grid-column: 1 / -1; }
.mr-cell span { display: block; font-size: 10px; color: var(--mr-faint); line-height: 15px; }
.mr-cell p { margin: 4px 0 0; font-size: 13px; font-weight: 500; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }

.mr-price-card { flex: 1; min-width: 0; }
.mr-price-card > span { display: block; font-size: 12px; font-weight: 700; }
.mr-price-card > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.mr-price-card strong { font-size: 30px; font-weight: 800; letter-spacing: -.5px; }
.mr-price-card small { font-size: 12px; color: var(--mr-faint); }
.mr-price-card .mr-ask { font-size: 22px; color: var(--mr-muted); font-weight: 700; }

.mr-side-add {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    gap: 8px;
    width: 220px;
    height: 48px;
    border: 1px solid transparent;
    border-radius: 14px;
    background: linear-gradient(135deg, #155dfc, #0b2fa8);
    box-shadow: 0 10px 24px rgba(21, 93, 252, 0.28);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
}

.mr-side-add svg { width: 17px; height: 17px; stroke-width: 1.8; }
.mr-side-add.is-added { background: #fff; border-color: var(--mr-blue-line); box-shadow: none; color: var(--mr-blue); }

.mr-dialog-msg { display: flex; flex: 1; align-items: center; justify-content: center; padding: 40px; color: var(--mr-muted); font-size: 14px; }

/* ---- 城市选择 ---- */
.mr-city-dialog {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 720px;
    height: 540px;
    max-height: 100%;
    border-radius: 28px;
    background: #f5f7fa;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
    overflow: hidden;
    animation: mr-pop .2s ease-out;
}

.mr-city-head { display: flex; align-items: center; gap: 10px; padding: 18px 22px 0; }
.mr-city-head h4 { margin: 0; font-size: 12px; font-weight: 600; color: var(--mr-blue); }
.mr-city-chip { padding: 4px 12px; border: 1px solid var(--mr-blue-line); border-radius: 9999px; background: var(--mr-blue-soft); color: var(--mr-blue); font-size: 12px; font-weight: 600; }
.mr-city-head .mr-x { margin-left: auto; }

.mr-city-search { position: relative; margin: 14px 22px; }
.mr-city-search svg { position: absolute; left: 14px; top: 50%; width: 15px; height: 15px; margin-top: -7.5px; color: var(--mr-faint); }
.mr-city-search input {
    width: 100%;
    height: 38px;
    padding: 0 14px 0 38px;
    border: 0;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.05);
    font: inherit;
    font-size: 13px;
    color: var(--mr-ink);
    outline: none;
    box-sizing: border-box;
}

.mr-city-search input:focus { box-shadow: 0 0 0 2px var(--mr-blue-line); }

.mr-city-body { display: flex; flex: 1; min-height: 0; border-top: 1px solid rgba(15, 23, 42, 0.06); border-bottom: 1px solid rgba(15, 23, 42, 0.06); }
.mr-city-list { flex: none; width: 150px; margin: 0; padding: 8px 0; list-style: none; overflow-y: auto; border-right: 1px solid rgba(15, 23, 42, 0.06); }
.mr-city-list button {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 9px 12px 9px 18px;
    border: 0;
    border-right: 2px solid transparent;
    background: none;
    font-size: 13px;
    color: var(--mr-ink);
    text-align: left;
}

.mr-city-list button em { font-style: normal; font-size: 11px; color: var(--mr-faint); }
.mr-city-list button:hover { background: rgba(255, 255, 255, 0.7); }
.mr-city-list button[aria-selected="true"] { border-right-color: var(--mr-blue); background: rgba(21, 93, 252, 0.08); color: var(--mr-blue); font-weight: 600; }

.mr-district-panel { flex: 1; min-width: 0; padding: 16px 18px; overflow-y: auto; }
.mr-district-empty { display: flex; height: 100%; align-items: center; justify-content: center; color: var(--mr-faint); font-size: 13px; }
.mr-districts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.mr-districts button {
    padding: 7px 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 9999px;
    background: #fff;
    font-size: 13px;
    color: var(--mr-ink);
}

.mr-districts button em { margin-left: 4px; font-style: normal; font-size: 11px; color: var(--mr-faint); }
.mr-districts button[aria-pressed="true"] { border-color: var(--mr-blue); background: var(--mr-blue); color: #fff; }
.mr-districts button[aria-pressed="true"] em { color: rgba(255, 255, 255, 0.75); }

.mr-city-foot { display: flex; align-items: center; gap: 12px; padding: 14px 22px; }
.mr-city-foot p { flex: 1; min-width: 0; margin: 0; font-size: 12px; color: var(--mr-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mr-city-foot .reset { width: 120px; height: 44px; border: 1px solid rgba(15, 23, 42, 0.08); border-radius: 14px; background: #fff; font-size: 14px; font-weight: 600; color: var(--mr-ink); }
.mr-city-foot .apply { width: 180px; height: 44px; border: 0; border-radius: 14px; background: var(--mr-blue); box-shadow: 0 8px 20px rgba(21, 93, 252, 0.3); font-size: 14px; font-weight: 700; color: #fff; }

/* ---- 投放清单抽屉 ---- */
.mr-drawer { position: fixed; inset: 0; z-index: 2100; }
.mr-drawer[hidden] { display: none; }

.mr-drawer-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    width: 420px;
    max-width: 100%;
    background: #f7f8fa;
    box-shadow: -20px 0 60px rgba(15, 23, 42, 0.18);
    animation: mr-slide .25s ease-out;
}

@keyframes mr-slide { from { transform: translateX(40px); opacity: 0; } }

.mr-drawer-head { display: flex; align-items: center; gap: 10px; padding: 20px 20px 16px; border-bottom: 1px solid rgba(15, 23, 42, 0.06); background: #fff; }
.mr-drawer-head h4 { margin: 0; font-size: 17px; font-weight: 700; }
.mr-drawer-head em { font-style: normal; font-size: 13px; color: var(--mr-muted); }
.mr-drawer-head .mr-x { margin-left: auto; }

.mr-drawer-list { flex: 1; margin: 0; padding: 14px 16px; list-style: none; overflow-y: auto; }
.mr-drawer-item { position: relative; display: flex; gap: 12px; padding: 10px; margin-bottom: 10px; border: 1px solid var(--mr-line); border-radius: 16px; background: #fff; }
.mr-drawer-item img { flex: none; width: 104px; height: 65px; border-radius: 10px; object-fit: cover; background: #eef2f7; }
.mr-drawer-item div { min-width: 0; flex: 1; padding-right: 22px; }
.mr-drawer-item h5 { margin: 0; font-size: 14px; font-weight: 700; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mr-drawer-item p { margin: 3px 0 0; font-size: 12px; color: var(--mr-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mr-drawer-item .price { font-size: 13px; font-weight: 700; color: var(--mr-ink); }
.mr-drawer-item .price small { font-weight: 500; color: var(--mr-muted); }
.mr-drawer-item .remove { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; }
.mr-drawer-item .remove svg { width: 12px; height: 12px; }

.mr-drawer-empty { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--mr-faint); font-size: 13px; }
.mr-drawer-empty svg { width: 42px; height: 42px; stroke-width: 1.4; color: #cbd5e1; }

.mr-drawer-foot { display: flex; gap: 12px; padding: 16px 20px 20px; border-top: 1px solid rgba(15, 23, 42, 0.06); background: #fff; }
.mr-drawer-foot .clear { width: 110px; height: 44px; border: 1px solid rgba(15, 23, 42, 0.1); border-radius: 14px; background: #fff; font-size: 14px; font-weight: 600; color: var(--mr-muted); }
.mr-drawer-foot .export { display: flex; flex: 1; align-items: center; justify-content: center; gap: 8px; height: 44px; border: 0; border-radius: 14px; background: var(--mr-blue); box-shadow: 0 8px 20px rgba(21, 93, 252, 0.3); font-size: 14px; font-weight: 700; color: #fff; }
.mr-drawer-foot .export svg { width: 17px; height: 17px; }
.mr-drawer-foot button:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

/* ---- 滚动条（Windows 默认滚动条粗且带箭头，弹层内统一为细圆角样式） ---- */
.mr-dialog-scroll,
.mr-city-list,
.mr-district-panel,
.mr-drawer-list {
    scrollbar-gutter: stable;
}

.mr-dialog-scroll::-webkit-scrollbar,
.mr-city-list::-webkit-scrollbar,
.mr-district-panel::-webkit-scrollbar,
.mr-drawer-list::-webkit-scrollbar { width: 10px; height: 10px; background: transparent; border-radius: 0; }

.mr-dialog-scroll::-webkit-scrollbar-track,
.mr-city-list::-webkit-scrollbar-track,
.mr-district-panel::-webkit-scrollbar-track,
.mr-drawer-list::-webkit-scrollbar-track { background: transparent; }

/* 底部避开弹框 28px 圆角 */
.mr-dialog-scroll::-webkit-scrollbar-track { margin: 6px 0 22px; }

.mr-dialog-scroll::-webkit-scrollbar-thumb,
.mr-city-list::-webkit-scrollbar-thumb,
.mr-district-panel::-webkit-scrollbar-thumb,
.mr-drawer-list::-webkit-scrollbar-thumb {
    border: 3px solid transparent;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.18) padding-box;
}

.mr-dialog-scroll::-webkit-scrollbar-thumb:hover,
.mr-city-list::-webkit-scrollbar-thumb:hover,
.mr-district-panel::-webkit-scrollbar-thumb:hover,
.mr-drawer-list::-webkit-scrollbar-thumb:hover { background-color: rgba(15, 23, 42, 0.32); }

.mr-dialog-scroll::-webkit-scrollbar-button,
.mr-city-list::-webkit-scrollbar-button,
.mr-district-panel::-webkit-scrollbar-button,
.mr-drawer-list::-webkit-scrollbar-button { display: none; width: 0; height: 0; }

.mr-dialog-scroll::-webkit-scrollbar-corner { background: transparent; }

/* Firefox 只支持标准属性（Chromium 设了标准属性会忽略上面的 ::-webkit-scrollbar，所以只给 Firefox） */
@supports (-moz-appearance: none) {
    .mr-dialog-scroll,
    .mr-city-list,
    .mr-district-panel,
    .mr-drawer-list { scrollbar-width: thin; scrollbar-color: rgba(15, 23, 42, 0.22) transparent; }
}

/* ---- 响应式 ---- */
@media (max-width: 1535px) { .mr-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1279px) { .mr-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1023px) { .mr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

@media (max-width: 980px) {
    .mr-wrap { padding: 0 20px; }
    .mr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
    .mr-cells { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    .mr-page { padding-top: 116px; }
    .mr-wrap { padding: 0 16px; }
    .mr-filterbar { padding: 8px; gap: 8px; border-radius: 16px; }
    .mr-tab { padding: 0 14px; }
    .mr-city-btn { padding: 0 10px 0 12px; max-width: 120px; }
    .mr-grid { grid-template-columns: minmax(0, 1fr); }
    .mr-cart-fab { right: 16px; bottom: 16px; }
    .mr-modal { padding: 0; }
    .mr-dialog { height: 100%; max-height: none; border-radius: 0; border: 0; }
    .mr-buybar { flex-direction: column; align-items: stretch; gap: 12px; margin: 16px 16px 0; padding: 14px 16px; }
    .mr-side-add { width: 100%; }
    .mr-dialog > .mr-x { top: 14px; right: 14px; }
    .mr-hero { height: 240px; }
    .mr-hero-title { padding: 48px 18px 16px; }
    .mr-hero-title h3 { font-size: 20px; }
    .mr-info { padding: 18px 16px 28px; }
    .mr-city-dialog { height: 100%; border-radius: 0; max-width: none; }
    .mr-city-list { width: 118px; }
    .mr-city-foot .reset { width: 90px; }
    .mr-city-foot .apply { width: 120px; }
    .mr-city-foot p { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .mr-card, .mr-cover img, .mr-dialog, .mr-city-dialog, .mr-drawer-panel { transition: none; animation: none; }
    .mr-skeleton .mr-cover, .mr-skeleton .mr-line { animation: none; }
}
