/* ==========================================================================
   北京人像点位 · 主样式
   风格：Apple / iOS —— 深色工作区 + 浅色地图画布
     · 顶栏、筛选条、左侧列表：深色（iOS Dark Mode）
     · 右侧地图：保持浅色矢量图，保证找位置的辨识度
     · 地图上的浮层卡片：深色毛玻璃
   分类：外景(绿) / 室内(橙) / 棚子(紫)
   ========================================================================== */

:root {
  /* ---- 深色工作区（iOS Dark Mode 标准值）---- */
  --bg: #000000;                      /* systemBackground (dark) */
  --surface: #1c1c1e;                 /* secondarySystemBackground (dark) */
  --surface-2: #2c2c2e;               /* tertiarySystemBackground */
  --surface-3: #3a3a3c;
  --text: #ffffff;
  --text-2: rgba(235, 235, 245, .62);  /* secondaryLabel */
  --text-3: rgba(235, 235, 245, .38);  /* tertiaryLabel */
  --text-4: rgba(235, 235, 245, .22);
  --line: rgba(84, 84, 88, .5);        /* separator (dark) */
  --line-2: rgba(84, 84, 88, .8);

  /* ---- iOS Dark Mode 系统色 ---- */
  --accent: #0a84ff;                  /* systemBlue (dark) */
  --accent-dark: #409cff;
  --green: #30d158;                   /* systemGreen (dark) */
  --orange: #ff9f0a;                  /* systemOrange (dark) */
  --purple: #bf5af2;                  /* systemPurple (dark) */
  --red: #ff453a;

  /* ---- 浅色画布（地图区）---- */
  --canvas: #f2f2f7;

  /* ---- 侧栏（比纯黑浅一档，和卡片拉开层次）---- */
  --sidebar: #1a1a1c;

  /* ---- 浮层 ---- */
  --float: rgba(28, 28, 30, .88);

  --radius: 12px;
  --radius-sm: 9px;
  --radius-lg: 16px;

  --shadow-card: 0 1px 3px rgba(0, 0, 0, .35), 0 0 0 .5px rgba(255, 255, 255, .04);
  --shadow-float: 0 6px 20px rgba(0, 0, 0, .38), 0 1px 3px rgba(0, 0, 0, .3);

  --ease: cubic-bezier(.4, 0, .2, 1);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
          "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0; height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color-scheme: dark;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ============================== 顶栏（深色毛玻璃）============================== */
.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 0 20px;
  background: rgba(0, 0, 0, .72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: .5px solid var(--line);
  position: relative;
  z-index: 20;
}
.brand {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.02em;
  white-space: nowrap;
  color: #fff;
}
.brand .dot { color: var(--accent); }
.brand-sub {
  font-size: 12px;
  color: var(--text-3);
  padding-left: 10px;
  border-left: .5px solid var(--line-2);
  white-space: nowrap;
}
.topbar .spacer { flex: 1; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: none;
  background: var(--surface-2);
  color: var(--text);
  border-radius: 980px;
  padding: 8px 15px;
  font-size: 14px;
  font-weight: 500;
  transition: transform .12s var(--ease), background .15s;
  white-space: nowrap;
}
.btn:active { transform: scale(.95); }
.btn svg {
  width: 14px; height: 14px;
  fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(10, 132, 255, .35);
}
.btn-primary:hover { background: var(--accent-dark); }

/* ============================== 筛选层（深色）============================== */
.filters {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px 10px;
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--bg);
  border-bottom: .5px solid var(--line);
  position: relative;
  z-index: 15;
}
.filters::-webkit-scrollbar { display: none; }

/* iOS 深色分段控件 */
.segmented {
  display: inline-flex;
  background: var(--surface-2);
  border-radius: 9px;
  padding: 2px;
  gap: 2px;
  flex: 0 0 auto;
}
.segmented button {
  border: none;
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  transition: background .22s var(--ease), color .22s var(--ease), box-shadow .22s var(--ease);
}
.segmented button .dot {
  width: 7px; height: 7px; border-radius: 50%; display: inline-block;
  transition: transform .22s var(--ease);
}
.segmented button[data-scope="outdoor"] .dot { background: var(--green); }
.segmented button[data-scope="indoor"] .dot { background: var(--orange); }
.segmented button[data-scope="studio"] .dot { background: var(--purple); }
.segmented button[aria-selected="true"] {
  background: #636366;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .45);
}
.segmented button[aria-selected="true"] .dot { transform: scale(1.15); }

.filters select {
  border: none;
  background-color: var(--surface-2);
  border-radius: 980px;
  padding: 7px 30px 7px 13px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'><path d='M2 4l3 3 3-3' stroke='%23EBEBF5' stroke-opacity='.45' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 11px center;
  transition: transform .12s var(--ease);
}
.filters select:active { transform: scale(.97); }
.filters select:focus { outline: none; box-shadow: 0 0 0 3px rgba(10, 132, 255, .35); }
.filters select option { background: var(--surface-2); color: #fff; }

.count {
  margin-left: auto;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-3);
  white-space: nowrap;
  padding-left: 12px;
}

/* ============================== 主体两栏 ============================== */
.shell {
  display: grid;
  grid-template-columns: 390px 1fr;
  height: calc(100% - 56px - 55px);
}
.list-pane {
  overflow-y: auto;
  padding: 4px 16px 40px;
  background: var(--sidebar);
}
.map-pane { position: relative; background: var(--canvas); }
#map { position: absolute; inset: 0; background: var(--canvas); }

/* 白色遮罩：让底图退到背景，突出点位 */
.map-veil {
  position: absolute;
  inset: 0;
  background: #ffffff;
  opacity: .18;
  pointer-events: none;
  z-index: 350;
}

/* ============================== 卡片（深色）============================== */
.card {
  background: #232326;
  border-radius: var(--radius);
  padding: 14px 15px 13px;
  margin-bottom: 9px;
  cursor: pointer;
  border: .5px solid rgba(255, 255, 255, .07);
  transition: transform .13s var(--ease), background .16s var(--ease), box-shadow .16s var(--ease);
}
.card:hover { background: #2c2c30; }
.card:active { transform: scale(.985); }
.card.active {
  background: var(--surface-2);
  box-shadow: 0 0 0 2px var(--accent);
}

.card-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 8px;
}
.card-name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.022em;
  line-height: 1.3;
  flex: 1;
  color: #fff;
}
.card-district {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  background: var(--surface-3);
  border-radius: 6px;
  padding: 3px 8px;
  white-space: nowrap;
}

/* 标签：彩色小字 + 圆点分隔 */
.tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: -.01em;
  white-space: nowrap;
  background: none;
  border: none;
  padding: 0;
}
.tag .swatch {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block; flex: 0 0 auto;
}
.tag + .tag::before {
  content: "";
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--text-4);
  margin-right: 8px;
  display: inline-block;
}
.tag.key { font-weight: 600; color: #fff; }
.tag.scope-outdoor { color: var(--green); }
.tag.scope-outdoor .swatch { background: var(--green); }
.tag.scope-indoor { color: var(--orange); }
.tag.scope-indoor .swatch { background: var(--orange); }
.tag.scope-studio { color: var(--purple); }
.tag.scope-studio .swatch { background: var(--purple); }
.tag.free { color: var(--green); }
.tag.paid { color: var(--orange); }
.tag.commercial-ok { color: #64d2ff; }
.tag.commercial-no { color: #ff6482; }

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 8px;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.55;
}
.card-meta .sep { color: var(--text-4); }

.card-foot {
  border-top: .5px solid var(--line);
  margin-top: 10px;
  padding-top: 8px;
  font-size: 12px;
  color: var(--text-3);
}
.demo-flag {
  background: var(--surface-3);
  color: var(--text-2);
  border-radius: 5px;
  padding: 1px 6px;
  font-size: 11px;
}

/* ============================== 列表底部提示 ============================== */
.list-footer {
  margin: 18px 2px 0;
  padding: 16px 16px 17px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .04);
  border: .5px dashed rgba(255, 255, 255, .12);
  text-align: center;
}
.list-footer p {
  margin: 0 0 11px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-2);
}
.list-footer .lf-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--accent);
  color: #fff;
  border-radius: 980px;
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 600;
  transition: transform .12s var(--ease), background .15s;
}
.list-footer .lf-btn:hover { background: var(--accent-dark); }
.list-footer .lf-btn:active { transform: scale(.95); }
.list-footer .lf-btn svg {
  width: 13px; height: 13px;
  fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round;
}

/* ============================== 地图标记（圆点）============================== */
.pin-wrap { background: transparent; border: none; }
.pin {
  border-radius: 50%;
  border: 2.5px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .35), 0 0 0 .5px rgba(0, 0, 0, .08);
  transition: transform .15s var(--ease), box-shadow .15s var(--ease);
  transform-origin: 50% 50%;
}
.pin.scope-outdoor { background: #34c759; }
.pin.scope-indoor { background: #ff9500; }
.pin.scope-studio { background: #af52de; }
.pin.scope-unknown { background: #8e8e93; }
.pin.is-active {
  box-shadow: 0 0 0 4px rgba(10, 132, 255, .3), 0 2px 8px rgba(0, 0, 0, .4);
  z-index: 800;
}

/* ============================== 地图信息条（深色浮层）============================== */
.map-card {
  position: absolute;
  left: 14px; bottom: 14px;
  z-index: 500;
  width: 300px;
  background: var(--float);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border: .5px solid rgba(255, 255, 255, .1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-float);
  padding: 15px 16px;
  display: none;
  color: #fff;
}
.map-card.show { display: block; cursor: pointer; }
.map-card:active { transform: scale(.99); }
.map-card .mc-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.02em;
  margin-bottom: 4px;
}
.map-card .mc-sub { font-size: 13px; color: var(--text-2); line-height: 1.55; }
.map-card .mc-open {
  display: inline-block;
  margin-top: 11px;
  background: var(--accent);
  color: #fff;
  border-radius: 980px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
}

/* ============================== 空状态 ============================== */
.empty {
  text-align: center;
  padding: 46px 22px;
  color: var(--text-3);
  font-size: 14px;
  line-height: 1.85;
}
.empty strong { display: block; color: var(--text); font-size: 16px; font-weight: 600; margin-bottom: 6px; }

/* ============================== 详情 / 投稿 页 ============================== */
#detail { max-width: 720px; margin: 0 auto; padding: 22px 20px 90px; }
.back {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 34px;
  padding: 0 13px 0 9px;
  margin-bottom: 18px;
  border-radius: 980px;
  background: var(--surface-2);
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -.01em;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s var(--ease), transform .12s var(--ease);
}
.back svg {
  width: 17px; height: 17px;
  flex: 0 0 auto; display: block;
  fill: none; stroke: currentColor; stroke-width: 2.6;
  stroke-linecap: round; stroke-linejoin: round;
  margin-left: -2px;
}
.back:hover { background: var(--surface-3); }
.back:active { transform: scale(.95); }

/* 详情页头部：返回 + 复制地址，同一行两端对齐 */
.d-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.d-head .back { margin-bottom: 0; }
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 13px;
  border: none;
  border-radius: 980px;
  background: var(--surface-2);
  color: var(--accent);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -.01em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s var(--ease), color .15s var(--ease), transform .12s var(--ease);
}
.copy-btn svg {
  width: 15px; height: 15px;
  flex: 0 0 auto; display: block;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.copy-btn:hover { background: var(--surface-3); }
.copy-btn:active { transform: scale(.95); }
.copy-btn.done { color: var(--green); background: rgba(48, 209, 88, .16); }

.d-title {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -.028em;
  line-height: 1.2;
  margin: 0 0 8px;
  color: #fff;
}
.d-sub { font-size: 14px; color: var(--text-3); margin-bottom: 14px; }
.d-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 20px; }

.d-map {
  height: 250px;
  border-radius: var(--radius);
  overflow: hidden;
  border: .5px solid var(--line);
  margin-bottom: 20px;
  position: relative;
  background: var(--canvas);
}

.d-section {
  background: var(--surface);
  border-radius: var(--radius);
  border: .5px solid rgba(255, 255, 255, .05);
  padding: 0 16px;
  margin-bottom: 16px;
  overflow: hidden;
}
.d-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 14px;
  padding: 13px 0;
  border-bottom: .5px solid var(--line);
}
.d-row:last-child { border-bottom: none; }
.d-row dt { color: var(--text-3); font-size: 14px; }
.d-row dd { margin: 0; font-size: 15px; line-height: 1.6; color: var(--text); }
.d-row dd.hl { color: var(--orange); font-weight: 600; }

.d-foot {
  margin-top: 20px;
  padding-top: 14px;
  border-top: .5px solid var(--line);
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.85;
}
.d-foot a { color: var(--accent); }

/* ============================== 投稿页 ============================== */
.notice-title, .notice-lead, .notice-box, .notice-cta {
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}
.notice-title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -.028em;
  text-align: center;
  margin: 4px auto 10px;
  color: #fff;
}
.notice-lead {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--text-2);
  text-align: center;
  margin: 0 auto 26px;
}
.notice-box {
  background: var(--surface);
  border-radius: var(--radius);
  border: .5px solid rgba(255, 255, 255, .05);
  padding: 18px 20px 20px;
  margin-bottom: 14px;
  text-align: left;
}
.notice-box h2 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.015em;
  margin: 0 0 8px;
  color: #fff;
}
.notice-box h2:not(:first-child) { margin-top: 18px; }
.notice-box ul { margin: 0; padding-left: 18px; }
.notice-box li {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--text-2);
  margin-bottom: 3px;
}
.notice-box li b { color: #fff; }
.notice-box p { font-size: 14.5px; line-height: 1.75; color: var(--text-2); margin: 0; }
.notice-box code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  background: var(--surface-3);
  border-radius: 5px;
  padding: 1.5px 5px;
  color: #fff;
}
.notice-cta {
  margin-top: 24px;
  padding-top: 22px;
  border-top: .5px solid var(--line);
  text-align: center;
}
.btn-lg {
  display: inline-block;
  padding: 13px 28px;
  font-size: 16px;
  border-radius: 980px;
}
.cta-off {
  background: rgba(255, 159, 10, .12);
  border: .5px solid rgba(255, 159, 10, .3);
  border-radius: var(--radius);
  padding: 15px 17px;
  font-size: 14px;
  color: var(--orange);
  font-weight: 600;
  line-height: 1.65;
  text-align: left;
}
.cta-off span { font-weight: 400; color: var(--text-2); font-size: 12.5px; }
.notice-cta p { margin-top: 12px; font-size: 13px; color: var(--text-3); }
.notice-cta p a { color: var(--accent); }

.mobile-map-btn { display: none; }

/* ============================== 手机 ============================== */
@media (max-width: 860px) {
  .brand-sub { display: none; }
  .shell {
    grid-template-columns: 1fr;
    height: calc(100% - 56px - 55px - 58px);
  }
  .map-pane { display: none; }
  body.map-open .map-pane {
    display: block;
    position: fixed;
    inset: 56px 0 0 0;
    z-index: 30;
  }
  body.map-open .shell { height: auto; }

  .mobile-map-btn {
    display: block;
    position: fixed;
    left: 16px; right: 16px; bottom: 16px;
    z-index: 40;
    padding: 14px;
    border: none;
    border-radius: 980px;
    background: var(--accent);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    box-shadow: var(--shadow-float);
    transition: transform .12s var(--ease);
  }
  .mobile-map-btn:active { transform: scale(.97); }
  body.map-open .mobile-map-btn { background: var(--surface-2); color: var(--text); }

  .map-card { left: 12px; right: 12px; bottom: 78px; width: auto; }
  #detail { padding: 16px 14px 90px; }
  .d-title { font-size: 25px; }
  .d-row { grid-template-columns: 84px 1fr; gap: 10px; }
  .notice-title { font-size: 27px; }
  .notice-lead { font-size: 15px; }
  .notice-box { padding: 16px; }
}
