/* ============================================================
 * 5号机车 · 设计系统（深色工业风 · 移动端优先）
 * ============================================================ */

:root {
  --bg: #0E1014;
  --bg-soft: #14171D;
  --card: #171A20;
  --card-hi: #1D212A;
  --line: rgba(255, 255, 255, .08);
  --line-hi: rgba(255, 255, 255, .16);
  --text: #E9EBEF;
  --text-2: #9AA2B1;
  --text-3: #6B7280;
  --brand: #FF7A1A;
  --brand-2: #FFB020;
  --brand-dim: rgba(255, 122, 26, .12);
  --ok: #22C55E;
  --danger: #F2542D;
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --tabbar-h: 58px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Helvetica Neue", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }

.wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 16px calc(var(--tabbar-h) + 32px + env(safe-area-inset-bottom));
}

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 12px;
  height: 52px; padding: 0 16px;
  background: rgba(14, 16, 20, .88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar .back {
  width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--line);
  font-size: 18px; color: var(--text-2); flex: none;
}
.topbar h1 { flex: 1; margin: 0; font-size: 16px; font-weight: 600; }
.topbar .spacer { width: 32px; flex: none; }

/* ---------- Hero ---------- */
.hero { padding: 22px 0 8px; }
.hero .brand {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px; border-radius: 999px;
  background: var(--brand-dim); border: 1px solid rgba(255, 122, 26, .28);
  color: var(--brand); font-size: 12px; letter-spacing: .08em; font-weight: 600;
}
.hero h2 {
  margin: 14px 0 6px; font-size: 30px; line-height: 1.25; font-weight: 700; letter-spacing: -.01em;
}
.hero h2 em { font-style: normal; color: var(--brand); }
.hero p { margin: 0; color: var(--text-2); font-size: 14px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 20px 0 4px; }
.stat {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 12px 6px; text-align: center;
}
.stat .n { font-size: 20px; font-weight: 700; line-height: 1.2; color: var(--text); }
.stat .l { font-size: 11px; color: var(--text-3); margin-top: 2px; }

/* ---------- 区块标题 ---------- */
.sec-head { display: flex; align-items: baseline; gap: 10px; margin: 28px 0 12px; }
.sec-head h3 { margin: 0; font-size: 17px; font-weight: 650; }
.sec-head .sub { font-size: 12px; color: var(--text-3); }
.sec-head .more { margin-left: auto; font-size: 13px; color: var(--brand); }

/* ---------- 区域网格 ---------- */
.region-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.region-card {
  position: relative; overflow: hidden;
  border-radius: var(--r); padding: 14px;
  border: 1px solid var(--line);
  background: var(--card);
  transition: transform .15s ease, border-color .15s ease;
}
.region-card:active { transform: scale(.98); border-color: var(--line-hi); }
.region-card .bar {
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
}
.region-card .n { font-size: 17px; font-weight: 650; }
.region-card .en { font-size: 11px; color: var(--text-3); letter-spacing: .06em; text-transform: uppercase; }
.region-card .t { font-size: 12px; color: var(--text-2); margin-top: 6px; }
.region-card .c { font-size: 11px; color: var(--text-3); margin-top: 6px; }

/* ---------- 点位卡片 ---------- */
.spot-card {
  display: flex; gap: 12px; padding: 12px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); margin-bottom: 10px;
  transition: border-color .15s ease;
}
.spot-card:active { border-color: var(--line-hi); }
.spot-card .thumb {
  width: 88px; height: 88px; flex: none; border-radius: var(--r-sm);
  overflow: hidden; position: relative; background: var(--card-hi);
}
.spot-card .body { flex: 1; min-width: 0; }
.spot-card .title {
  font-size: 15px; font-weight: 600; margin: 0 0 4px;
  display: flex; align-items: center; gap: 6px;
}
.spot-card .meta { font-size: 12px; color: var(--text-3); }
.spot-card .sum {
  font-size: 12px; color: var(--text-2); margin-top: 6px;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.spot-card .foot { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.energy {
  font-size: 11px; color: var(--brand-2); font-weight: 600;
  background: rgba(255, 176, 32, .1); padding: 2px 7px; border-radius: 6px;
}

/* ---------- 标签 ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 6px 14px; border-radius: 999px; font-size: 13px;
  background: var(--card); border: 1px solid var(--line); color: var(--text-2);
  transition: all .15s ease;
}
.chip.on { background: var(--brand); border-color: var(--brand); color: #1A1208; font-weight: 600; }

.tag {
  display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 6px;
  background: var(--card-hi); color: var(--text-2); border: 1px solid var(--line);
  margin: 0 6px 6px 0;
}
.tag.vip { background: rgba(255, 122, 26, .14); color: var(--brand); border-color: rgba(255, 122, 26, .3); }

/* ---------- 占位图 ---------- */
.ph {
  position: relative; width: 100%; height: 100%;
  display: grid; place-items: center; overflow: hidden;
}
.ph::after {
  content: ''; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.045) 0 8px, transparent 8px 16px);
}
.ph .ic { font-size: 22px; opacity: .55; position: relative; z-index: 1; }
.ph .badge {
  position: absolute; left: 6px; bottom: 6px; z-index: 1;
  font-size: 10px; padding: 1px 6px; border-radius: 4px;
  background: rgba(0, 0, 0, .45); color: #fff;
}

/* ---------- 相册 ---------- */
.album { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.album .cell { position: relative; aspect-ratio: 1; border-radius: var(--r-sm); overflow: hidden; }
.album .cell:first-child { grid-column: span 3; aspect-ratio: 16 / 10; }

/* ---------- 按钮 ---------- */
.btn {
  display: block; width: 100%; padding: 13px; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--card-hi);
  color: var(--text); font-size: 15px; font-weight: 600; text-align: center;
  cursor: pointer; transition: opacity .15s ease;
}
.btn:active { opacity: .8; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #1A1208; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 9px 14px; font-size: 13px; width: auto; display: inline-block; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.field label .req { color: var(--brand); }
.inp, .ta, .sel {
  width: 100%; padding: 12px 14px; border-radius: var(--r-sm);
  background: var(--card); border: 1px solid var(--line);
  color: var(--text); outline: none; transition: border-color .15s ease;
}
.inp:focus, .ta:focus, .sel:focus { border-color: var(--brand); }
.ta { min-height: 84px; resize: vertical; }
.sel { appearance: none; }

.uploader { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.up-cell {
  aspect-ratio: 1; border-radius: var(--r-sm); overflow: hidden;
  border: 1px dashed var(--line-hi); background: var(--card);
  display: grid; place-items: center; color: var(--text-3); font-size: 22px;
  cursor: pointer; position: relative;
}
.up-cell img { width: 100%; height: 100%; object-fit: cover; }
.up-cell .del {
  position: absolute; right: 4px; top: 4px; width: 20px; height: 20px;
  border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff;
  font-size: 13px; display: grid; place-items: center;
}

/* ---------- 会员锁 ---------- */
.lock-mask {
  margin-top: 14px; padding: 20px 16px; text-align: center;
  border: 1px dashed rgba(255, 122, 26, .35); border-radius: var(--r);
  background: linear-gradient(180deg, rgba(255, 122, 26, .07), transparent);
}
.lock-mask .t { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.lock-mask .d { font-size: 12px; color: var(--text-2); margin-bottom: 14px; }

/* ---------- 会员卡 ---------- */
.member-card {
  border-radius: var(--r-lg); padding: 20px; margin-top: 4px;
  background: linear-gradient(135deg, #2A1A08, #171A20 60%);
  border: 1px solid rgba(255, 176, 32, .28);
}
.member-card .t { font-size: 13px; color: var(--brand-2); letter-spacing: .1em; }
.member-card .s { font-size: 22px; font-weight: 700; margin: 8px 0 2px; }
.member-card .e { font-size: 12px; color: var(--text-2); }

/* ---------- 底部 Tab ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(14, 16, 20, .94);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: 10px; color: var(--text-3);
}
.tabbar a.on { color: var(--brand); }
.tabbar a .ti { width: 22px; height: 22px; }

/* ---------- 提示 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%);
  background: rgba(28, 32, 39, .96); border: 1px solid var(--line-hi);
  color: var(--text); padding: 10px 18px; border-radius: 999px;
  font-size: 13px; z-index: 200; opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-6px); }

.empty { text-align: center; padding: 60px 20px; color: var(--text-3); font-size: 14px; }

/* ---------- 列表行 ---------- */
.row {
  display: flex; align-items: center; gap: 12px; padding: 14px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); margin-bottom: 10px;
}
.row .main { flex: 1; min-width: 0; }
.row .t { font-size: 14px; font-weight: 600; }
.row .d { font-size: 12px; color: var(--text-3); margin-top: 2px; }

.status {
  font-size: 11px; padding: 2px 8px; border-radius: 6px; flex: none;
}
.status.pending  { background: rgba(255, 176, 32, .14); color: var(--brand-2); }
.status.approved { background: rgba(34, 197, 94, .14);  color: var(--ok); }
.status.rejected { background: rgba(242, 84, 45, .14);  color: var(--danger); }

.map-note {
  margin-top: 10px; padding: 10px 12px; border-radius: var(--r-sm);
  background: var(--card); border: 1px solid var(--line);
  font-size: 12px; color: var(--text-2);
}
