/* ============================================================
   使劲兜住 · 网页版设计系统
   移动优先；≥1024px 时容器加宽，「附近厕所」变为地图/列表双栏
   ============================================================ */

:root {
  --brand: #059669;
  --brand-deep: #047857;
  --brand-bright: #34D399;
  --brand-soft: #ECFDF5;
  --brand-line: #A7F3D0;
  --blue: #2563EB;
  --blue-soft: #EFF6FF;
  --warn: #F59E0B;
  --warn-soft: #FFF7ED;
  --warn-line: #FDE4B3;
  --danger: #EF4444;
  --danger-soft: #FEF2F2;
  --danger-line: #FBCFCF;

  --ink: #0F172A;
  --ink-2: #475569;
  --ink-3: #94A3B8;
  --ink-4: #CBD5E1;
  --line: #E7ECF3;
  --line-2: #F1F5F9;
  --bg: #F3F6FA;
  --card: #FFFFFF;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 26px;

  --sh-sm: 0 2px 8px rgba(15, 23, 42, .05);
  --sh-md: 0 10px 28px -8px rgba(15, 23, 42, .14);
  --sh-lg: 0 22px 48px -16px rgba(5, 150, 105, .28);

  --top: 54px;
  --tab: 62px;

  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    "Helvetica Neue", Arial, sans-serif;
}

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

html, body { height: 100%; }

body {
  font-family: var(--font);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
  background: #EBEFF5;
  background-image:
    radial-gradient(900px 500px at 18% -10%, #D7F3E7 0%, transparent 60%),
    radial-gradient(760px 460px at 92% 8%, #E6EDFB 0%, transparent 62%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}

button { font-family: inherit; border: none; background: none; cursor: pointer; color: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
img, svg { display: block; }

/* ---------------- 应用外壳 ---------------- */
.app {
  position: relative;
  width: 100%;
  max-width: 520px;
  height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(22, 32, 44, .05), 0 24px 60px -20px rgba(16, 32, 52, .22);
}

/* ---------------- 顶栏 ---------------- */
.topbar {
  flex-shrink: 0;
  height: var(--top);
  padding-top: env(safe-area-inset-top);
  box-sizing: content-box;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 8px;
  padding-right: 8px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 20;
}
.topbar.is-hidden { display: none; }
.tb-btn {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  color: var(--ink);
  flex-shrink: 0;
  transition: background .15s;
}
.tb-btn:active { background: #F1F5F9; }
.tb-btn svg { width: 21px; height: 21px; }
.tb-title {
  flex: 1;
  min-width: 0;
  font-size: 16.5px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 4px;
}
.tb-title .tb-sub {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--ink-3);
  line-height: 1.3;
  margin-top: -1px;
}
.tb-spacer { width: 38px; flex-shrink: 0; }

/* ---------------- 视图容器 ---------------- */
.view {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  position: relative;
}
.view::-webkit-scrollbar { width: 0; }
.pg { min-height: 100%; padding-bottom: 28px; }

/* 页面进场交给 GSAP（js/anim.js → App.anim.pageIn）。
   原先的 .pg-enter CSS 动画已移除：animation-fill-mode:both 的优先级高于内联样式，
   会盖掉 GSAP 逐帧写入的 transform，两者不能共存。 */

/* ---------------- 底部导航 ---------------- */
.tabbar {
  flex-shrink: 0;
  height: var(--tab);
  padding-bottom: env(safe-area-inset-bottom);
  box-sizing: content-box;
  display: flex;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-top: 1px solid var(--line);
  z-index: 20;
}
.tabbar.is-hidden { display: none; }
.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--ink-3);
  font-size: 11px;
  transition: color .15s;
}
.tab svg { width: 22px; height: 22px; }
.tab.is-on { color: var(--brand); }
.tab.is-on svg { stroke-width: 2.15; }

/* ---------------- 通用卡片 ---------------- */
.card {
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
  padding: 16px;
}
.card + .card, .card + .banner, .banner + .card { margin-top: 12px; }
.card-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
}
.card-note { font-size: 11px; color: var(--ink-3); font-weight: 400; }

.pad { padding-left: 16px; padding-right: 16px; }

/* 区块标题 */
.sect { margin: 22px 16px 0; }
.sect-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 10px;
}
.sect-head h3 { font-size: 17px; font-weight: 800; line-height: 1.25; letter-spacing: -.2px; }
.sect-head h3 small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--ink-3);
  margin-top: 2px;
}
.sect-link { font-size: 12.5px; color: var(--brand); white-space: nowrap; }

/* ---------------- 标签 ---------------- */
.tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 11px;
  font-size: 11.5px;
  line-height: 1;
  background: #F1F5F9;
  color: var(--ink-2);
  margin: 0 6px 6px 0;
}
.tag-brand { background: var(--brand-soft); color: var(--brand-deep); }
.tag-blue { background: var(--blue-soft); color: var(--blue); }
.tag-warn { background: var(--warn-soft); color: #B4761A; }
.tag-danger { background: var(--danger-soft); color: var(--danger); }
.tag-plain { background: transparent; color: var(--ink-3); padding: 0; }

.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.dot-fresh { background: var(--brand); }
.dot-warn { background: var(--warn); }
.dot-stale { background: var(--danger); }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 22px;
  border-radius: var(--r-md);
  font-size: 15px;
  font-weight: 600;
  background: var(--brand);
  color: #fff;
  box-shadow: 0 6px 16px -9px rgba(15, 23, 42, .4);
  transition: transform .12s, opacity .12s, box-shadow .12s;
}
.btn:active { transform: scale(.98); opacity: .92; }
.btn-ghost { background: #F1F5F9; color: var(--ink-2); font-weight: 500; box-shadow: none; }
.btn-outline { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); font-weight: 500; }
.btn-blue { background: var(--blue); }
.btn-danger { background: var(--danger); }
.btn-danger-soft { background: var(--danger-soft); color: var(--danger); }
.btn-block { width: 100%; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; border-radius: 10px; }
.btn[disabled], .btn.is-off { background: #CBD5E1; pointer-events: none; }

/* ---------------- 首页 ---------------- */
.hero {
  position: relative;
  background: linear-gradient(150deg, #34D399 0%, #059669 55%, #047857 100%);
  border-radius: 0 0 26px 26px;
  padding: 18px 20px 66px;
  overflow: hidden;
  color: #fff;
}
.hero::before {
  content: "";
  position: absolute;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .3), transparent 70%);
  top: -120px; right: -90px;
}
.hero > * { position: relative; }
.brand-row { display: flex; align-items: center; }
.brand-logo {
  width: 44px; height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .22);
  border: 1px solid rgba(255, 255, 255, .36);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700;
  margin-right: 11px;
  flex-shrink: 0;
}
.brand-name { font-size: 21px; font-weight: 700; letter-spacing: 1px; line-height: 1.2; }
.brand-slogan { font-size: 11.5px; color: rgba(255, 255, 255, .84); }

.loc-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  max-width: 100%;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .3);
  font-size: 12px;
  color: #fff;
}
.loc-chip .lc-text { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 200px; }
.loc-chip .lc-act {
  padding-left: 8px;
  margin-left: 2px;
  border-left: 1px solid rgba(255, 255, 255, .32);
  color: rgba(255, 255, 255, .88);
  font-size: 11px;
  white-space: nowrap;
}

.hstats {
  display: flex;
  margin-top: 18px;
  padding: 13px 0;
  border-radius: 15px;
  background: rgba(255, 255, 255, .16);
}
.hstat { flex: 1; text-align: center; }
.hstat b { display: block; font-size: 23px; font-weight: 700; line-height: 1.15; }
.hstat b i { font-size: 12px; font-style: normal; font-weight: 600; }
.hstat span { font-size: 10.5px; color: rgba(255, 255, 255, .78); }
.hstat + .hstat { border-left: 1px solid rgba(255, 255, 255, .22); }

.acts {
  position: relative;
  margin: -50px 16px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.act-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: #fff;
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  text-align: left;
  transition: transform .14s;
}
.act-card:active { transform: scale(.985); }
.act-ico {
  width: 46px; height: 46px;
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 23px;
  flex-shrink: 0;
}
.act-ico.g { background: var(--brand-soft); }
.act-ico.b { background: var(--blue-soft); }
.act-body { flex: 1; min-width: 0; }
.act-body b { display: block; font-size: 16px; font-weight: 600; }
.act-body span { font-size: 11.5px; color: var(--ink-3); }
.act-go { color: #CBD5E1; font-size: 20px; }

.tipcard {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 16px 0;
  padding: 14px;
  border-radius: var(--r-lg);
  background: linear-gradient(120deg, #EFF6FF, #ECFDF5);
  border: 1px solid #CFEBDD;
  text-align: left;
  width: calc(100% - 32px);
}
.tipcard .e { font-size: 22px; }
.tipcard b { display: block; font-size: 14px; font-weight: 600; }
.tipcard span { font-size: 11px; color: var(--ink-2); }

.footnote {
  text-align: center;
  font-size: 11px;
  color: var(--ink-4);
  padding: 26px 24px 6px;
  line-height: 1.7;
}

/* ---------------- 厕所卡片 ---------------- */
.tcard {
  display: flex;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 12px;
  background: #fff;
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
  transition: transform .14s, box-shadow .14s;
}
.tcard:active { transform: scale(.99); }
.tcard + .tcard { margin-top: 12px; }
.tcard.is-selected { box-shadow: 0 0 0 2px var(--brand), var(--sh-md); }

.thumb {
  position: relative;
  width: 84px; height: 84px;
  border-radius: var(--r-md);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 34px;
  overflow: hidden;
}
.thumb .trust {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: rgba(10, 25, 20, .55);
  color: #fff;
  font-size: 10px;
  text-align: center;
  padding: 2px 0;
}
.thumb .trust b { font-weight: 700; }
/* 有实拍图的卡片：图铺满缩略格，图标垫底（图裂了也不开天窗） */
.thumb-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb-img + .trust { z-index: 1; }

.tbody { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tbody h4 {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.34;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tmeta {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 5px;
  font-size: 11px;
  color: var(--ink-3);
}
.tmeta .pill {
  background: var(--brand-soft);
  color: var(--brand-deep);
  border-radius: 5px;
  padding: 1px 6px;
  font-size: 10.5px;
}
.tmeta .sep { color: #CBD5E1; }
.ttags { display: flex; flex-wrap: wrap; margin-top: 7px; }
.ttags span {
  font-size: 10.5px;
  color: var(--ink-2);
  background: #F1F5F9;
  border-radius: 5px;
  padding: 2px 6px;
  margin: 0 5px 0 0;
}
.tfoot {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.tdist { font-size: 14.5px; font-weight: 700; color: var(--brand); white-space: nowrap; }
.tdist i { font-style: normal; font-size: 10.5px; color: var(--ink-3); font-weight: 400; margin-left: 6px; }
.tfresh { font-size: 10.5px; display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.tfresh.f { color: var(--brand-deep); }
.tfresh.w { color: #B4761A; }
.tfresh.s { color: var(--danger); }

/* ---------------- 地图页 ----------------
   两套底图是**叠**在一起的，不是一个换掉另一个：
     .map-base   —— 真实底图（高德）的容器，绝对定位铺满，在最底下
     .map-canvas —— 自绘层，绝对定位铺满，压在 .map-base 之上
   自绘模式下 .map-base 是个空壳、pointer-events:none（不挡画布拖拽）；
   js/map-tiles.js 挂上高德后给外层加 .is-tiled，两者交换指针事件的归属。

   关于 z-index：这里**刻意不给 .map-canvas 写正整数**。
   绝对定位元素之间 z-index:auto 与 0 同档，按文档顺序决定上下 ——
   base 在前、canvas 居中、四个浮层控件在后，正好是我们要的三层。
   一旦给 canvas 写上 z-index:1，它会跳到所有浮层之上：
   半径分段控件和地图/列表切换就被一块透明画布盖住，点不动也看不见。 */
.map-shell { position: relative; background: #EDF1F8; }
.map-base {
  position: absolute; inset: 0; z-index: 0;
  overflow: hidden;
  /* z-index:0 + 定位 → 自成层叠上下文，把高德内部的 z-index（它的
     logo 是 100 一档）关在这层里，不会跑到自绘层上面去 */
  pointer-events: none;      /* 空壳阶段别挡画布；挂上高德后由 .is-tiled 打开 */
}
.map-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%; display: block;
  cursor: grab;
}
.map-canvas.is-dragging { cursor: grabbing; }

/* 高德接管后：画布彻底不接指针事件，拖拽/滚轮/双击/捏合全归高德；
   点选改由高德的 click 事件回传画布坐标（见 map.js 的 _clickAt）。 */
.is-tiled > .map-canvas { pointer-events: none; }
.is-tiled > .map-base { pointer-events: auto; }

/* 投稿页的选点小地图：与 .map-shell 同构，只是盒子固定、光标是十字。
   原先这两层是一片内联样式 —— 挪进类里是因为叠层要求两层都定位，
   而内联的 static 画布会被绝对定位的 .map-base 盖住。 */
.map-pick {
  position: relative; height: 200px;
  border-radius: 12px; overflow: hidden;
  background: #EDF1F8;
}
.map-pick .map-canvas { cursor: crosshair; }
.map-base.is-picking { cursor: crosshair; }

.map-overlay-tl {
  position: absolute; top: 12px; left: 12px;
  display: flex; gap: 8px; align-items: flex-start;
  max-width: calc(100% - 24px);
}
.map-overlay-tr {
  position: absolute; top: 12px; right: 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.map-overlay-bl {
  position: absolute; left: 12px; bottom: 84px;
  display: flex; gap: 8px; align-items: center;
}
.map-overlay-br {
  position: absolute; right: 12px; bottom: 84px;
  display: flex; align-items: center; gap: 8px;
}

.seg {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--sh-sm);
}
.seg button {
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.2;
  color: var(--ink-2);
  white-space: nowrap;
  transition: all .15s;
}
.seg button.is-on { background: var(--brand); color: #fff; font-weight: 600; }
.seg.seg-dark button.is-on { background: var(--ink); }

.map-fab {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #fff;
  color: var(--ink-2);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--sh-md);
  transition: transform .14s;
}
.map-fab:active { transform: scale(.94); }
.map-fab svg { width: 19px; height: 19px; }
.map-fab.is-primary { background: var(--brand); color: #fff; }
.map-fab.is-loading { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.map-hint {
  font-size: 10.5px;
  color: var(--ink-2);
  background: rgba(255, 255, 255, .92);
  border-radius: 999px;
  padding: 4px 10px;
  box-shadow: var(--sh-sm);
}

/* 选中卡片 */
.sel-card {
  margin: 0 16px 16px;
  padding: 14px;
  background: #fff;
  border-radius: var(--r-lg);
  box-shadow: var(--sh-md);
  animation: selIn .24s cubic-bezier(.2, .7, .3, 1) both;
}
@keyframes selIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.sel-head { display: flex; align-items: flex-start; gap: 10px; }
.sel-head h4 { font-size: 15.5px; font-weight: 600; flex: 1; line-height: 1.35; }
.sel-close { color: var(--ink-3); font-size: 18px; line-height: 1; padding: 2px 4px; }
.sel-actions { display: flex; gap: 8px; margin-top: 12px; }
.sel-actions .btn { flex: 1; }

/* ---------------- 详情页 ---------------- */
.detail-hero {
  position: relative;
  height: 216px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 88px;
}
.detail-hero .mask {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .16), transparent 42%, rgba(0, 0, 0, .18));
}
.detail-hero .badge {
  position: absolute;
  left: 16px; bottom: 40px;
  display: flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .95);
  font-size: 12px;
  font-weight: 500;
}
.detail-body {
  position: relative;
  margin-top: -26px;
  padding: 18px 16px 0;
  border-radius: 22px 22px 0 0;
  background: var(--bg);
}
.d-name { font-size: 21px; font-weight: 700; line-height: 1.34; }
.d-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); margin-top: 8px; }
.d-meta .pill {
  background: var(--brand-soft); color: var(--brand-deep);
  border-radius: 6px; padding: 2px 7px; font-size: 11px;
}
.d-dist { display: flex; align-items: baseline; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.d-dist b { font-size: 22px; color: var(--brand); }
.d-dist span { font-size: 12px; color: var(--ink-3); }
.d-addr { font-size: 12px; color: var(--ink-2); margin-top: 5px; line-height: 1.6; }

.banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 13px 14px;
  border-radius: var(--r-md);
}
.banner .bn-body { flex: 1; min-width: 0; }
.banner b { display: block; font-size: 14px; }
.banner span { font-size: 11px; color: var(--ink-2); }
.banner-fresh { background: var(--brand-soft); border: 1px solid var(--brand-line); }
.banner-fresh b { color: var(--brand-deep); }
.banner-warn { background: var(--warn-soft); border: 1px solid var(--warn-line); }
.banner-warn b { color: #B4761A; }
.banner-stale { background: var(--danger-soft); border: 1px solid var(--danger-line); }
.banner-stale b { color: #D33A3A; }
.banner .btn-sm {
  flex-shrink: 0;
  background: var(--brand);
  color: #fff;
}
.banner-warn .btn-sm { background: var(--warn); }
.banner-stale .btn-sm { background: var(--danger); }
.banner .btn-sm.is-done { background: #CBD5E1; pointer-events: none; }
/* 横幅右侧双按钮：「我确认还能用」+「不能用了」 */
.bn-actions { display: flex; gap: 8px; flex-shrink: 0; }
.banner .btn-sm.bn-bad {
  background: #fff;
  color: var(--danger);
  border: 1px solid var(--danger-line);
}
.banner .btn-sm.bn-bad:active { background: var(--danger-soft); }
@media (max-width: 520px) {
  .banner { flex-wrap: wrap; }
  .bn-actions { width: 100%; }
  .bn-actions .btn-sm { flex: 1; }
}

.trust-head { display: flex; align-items: baseline; justify-content: space-between; }
.trust-head h4 { font-size: 15px; font-weight: 600; }
.trust-head b { font-size: 22px; color: var(--brand); }
.trust-head b i { font-size: 11px; color: var(--ink-3); font-style: normal; font-weight: 400; }
.trust-bar { height: 7px; border-radius: 4px; background: #EDF1F8; margin-top: 9px; overflow: hidden; }
.trust-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #6EE7B7, #059669); transition: width .6s cubic-bezier(.2, .7, .3, 1); }
.factors { display: flex; flex-wrap: wrap; margin-top: 12px; }
.factor { width: 50%; display: flex; align-items: center; justify-content: space-between; padding: 6px 14px 6px 0; font-size: 11.5px; }
.factor:nth-child(even) { padding-right: 0; }
.factor span { color: var(--ink-3); }
.factor b { font-weight: 500; }

.row-x { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.row-x:last-child { border-bottom: none; }
.row-x span { color: var(--ink-3); flex-shrink: 0; }
.row-x b { font-weight: 500; text-align: right; line-height: 1.55; }

.photo-row { display: flex; gap: 8px; }
.photo-row > div {
  flex: 1;
  height: 76px;
  border-radius: var(--r-md);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  font-size: 22px;
}
.photo-row > div span { font-size: 10px; color: var(--ink-2); margin-top: 3px; }

.detail-actionbar {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  margin-top: 20px;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  z-index: 5;
}
.detail-actionbar .btn { flex: 1; }
.detail-actionbar .btn-ghost { flex: 0 0 auto; }

/* ---------------- 上传页 ---------------- */
.upload-head { padding: 18px 16px 4px; }
.upload-head h2 { font-size: 23px; font-weight: 700; }
.upload-head p { font-size: 12px; color: var(--ink-3); margin-top: 5px; }
.stepper { display: flex; align-items: center; gap: 4px; margin-top: 14px; }
.stepper .st { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.stepper .st em {
  width: 17px; height: 17px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.stepper .st.is-on em { background: var(--brand); color: #fff; }
.stepper .line { flex: 1; height: 1px; background: #E7ECF3; }

.photo-grid { display: flex; flex-wrap: wrap; gap: 9px; }
.pgrid-item {
  position: relative;
  width: 88px; height: 88px;
  border-radius: var(--r-md);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  font-size: 28px;
  overflow: hidden;
}
.pgrid-item .pz {
  position: absolute; left: 0; right: 0; bottom: 0;
  font-size: 9px; text-align: center;
  background: rgba(255, 255, 255, .68);
  color: rgba(22, 32, 44, .62);
  padding: 1px 0;
}
.pgrid-item .pdel {
  position: absolute; right: 3px; top: 3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(22, 32, 44, .58);
  color: #fff;
  font-size: 13px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.pgrid-add { background: #F8FAFC; box-shadow: inset 0 0 0 1.5px dashed #CBD5E1; color: #A9B4C2; }
.pgrid-add b { font-size: 24px; font-weight: 300; line-height: 1; }
.pgrid-add span { font-size: 10px; color: var(--ink-3); margin-top: 4px; }

.hint-line { font-size: 11px; color: var(--ink-4); margin-top: 12px; line-height: 1.7; }

.loc-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  background: #F8FAFC;
  border-radius: var(--r-md);
}
.loc-box .lb { flex: 1; min-width: 0; }
.loc-box .lb b { font-size: 14px; display: flex; align-items: center; gap: 5px; }
.loc-box .lb .ad { font-size: 11px; color: var(--ink-2); margin-top: 4px; display: block; }
.loc-box .lb .co { font-size: 10px; color: var(--ink-4); margin-top: 3px; display: block; }
.loc-box .la { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }

.dup-box { margin-top: 11px; padding: 12px; border-radius: var(--r-md); background: var(--warn-soft); border: 1px solid var(--warn-line); }
.dup-box .dt { font-size: 12.5px; font-weight: 600; color: #B4761A; }
.dup-box .dn { font-size: 13px; margin-top: 6px; display: block; }
.dup-box .dm { font-size: 10.5px; color: var(--ink-2); display: block; }
.dup-box .da { display: flex; gap: 8px; margin-top: 10px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button {
  padding: 7px 14px;
  border-radius: 999px;
  background: #F3F6FA;
  color: var(--ink-2);
  font-size: 12.5px;
  border: 1px solid transparent;
  transition: all .14s;
}
.chips button.is-on {
  background: var(--brand-soft);
  color: var(--brand-deep);
  border-color: var(--brand-line);
  font-weight: 600;
}
.chips.chips-sm button { padding: 6px 12px; font-size: 11.5px; }

.field { display: flex; align-items: center; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.field:last-child { border-bottom: none; padding-bottom: 0; }
.field > label { font-size: 12.5px; color: var(--ink-3); flex-shrink: 0; }
.field .chips { flex: 1; justify-content: flex-end; }

.note-input {
  width: 100%;
  min-height: 84px;
  resize: vertical;
  margin-top: 12px;
  padding: 12px;
  border-radius: var(--r-md);
  background: #F8FAFC;
  border: 1px solid transparent;
  font-size: 13px;
  line-height: 1.6;
  outline: none;
  transition: border-color .15s;
}
.note-input:focus { border-color: var(--brand-line); background: #fff; }
.note-input::placeholder { color: var(--ink-4); }

.audit-note { margin: 12px 16px 0; padding: 14px; border-radius: var(--r-lg); background: var(--blue-soft); }
.audit-note b { display: block; font-size: 13.5px; color: #1E5A8A; margin-bottom: 6px; }
.audit-note span { display: block; font-size: 11px; color: #4A6B85; line-height: 1.85; }

.submit-bar {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  margin-top: 18px;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  z-index: 5;
}
.submit-bar .stip { flex: 1; font-size: 11.5px; color: #B4761A; }
.submit-bar .stip.ok { color: var(--brand-deep); }

/* ---------------- 我的 ---------------- */
.profile {
  position: relative;
  margin: 16px 16px 0;
  padding: 18px;
  border-radius: var(--r-xl);
  background: linear-gradient(150deg, #34D399 0%, #059669 60%, #047857 100%);
  color: #fff;
  overflow: hidden;
}
.profile::before {
  content: "";
  position: absolute;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .3), transparent 70%);
  top: -100px; right: -70px;
}
.profile > * { position: relative; }
.p-top { display: flex; align-items: center; gap: 11px; }
.p-avatar {
  width: 48px; height: 48px;
  border-radius: 15px;
  background: rgba(255, 255, 255, .22);
  border: 1px solid rgba(255, 255, 255, .4);
  display: flex; align-items: center; justify-content: center;
  font-size: 23px; font-weight: 700;
  flex-shrink: 0;
}
.p-name { font-size: 16px; font-weight: 600; display: block; }
.p-level {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 4px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .2);
  font-size: 11px;
}
.p-score { display: flex; align-items: baseline; gap: 8px; margin-top: 16px; }
.p-score b { font-size: 40px; font-weight: 700; line-height: 1; letter-spacing: -1px; }
.p-score span { font-size: 12px; color: rgba(255, 255, 255, .82); }
.p-progress { margin-top: 12px; }
.p-progress .bar { height: 6px; border-radius: 4px; background: rgba(255, 255, 255, .25); overflow: hidden; }
.p-progress .bar i { display: block; height: 100%; background: #fff; border-radius: 4px; transition: width .6s cubic-bezier(.2, .7, .3, 1); }
.p-progress span { display: block; font-size: 10.5px; color: rgba(255, 255, 255, .86); margin-top: 6px; }

.statcard {
  position: relative;
  display: flex;
  margin: -14px 16px 0;
  padding: 14px 0;
  background: #fff;
  border-radius: var(--r-lg);
  box-shadow: var(--sh-md);
}
.statcard > button { flex: 1; text-align: center; }
.statcard b { display: block; font-size: 21px; font-weight: 700; }
.statcard span { font-size: 10.5px; color: var(--ink-3); }
.statcard > button + button { border-left: 1px solid var(--line-2); }

.tabsx { display: flex; gap: 7px; margin-bottom: 12px; flex-wrap: wrap; }
.tabsx button {
  padding: 6px 15px;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 12.5px;
  color: var(--ink-2);
}
.tabsx button.is-on { background: var(--ink); box-shadow: none; color: #fff; font-weight: 600; }

.reclist { background: #fff; border-radius: var(--r-lg); padding: 2px 14px; box-shadow: var(--sh-sm); }
.rec { display: flex; align-items: center; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--line-2); }
.rec:last-child { border-bottom: none; }
.rec-badge {
  width: 38px; height: 22px;
  border-radius: 6px;
  font-size: 10.5px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.badge-brand { background: var(--brand-soft); color: var(--brand-deep); }
.badge-blue { background: var(--blue-soft); color: #2B6FD4; }
.badge-warn { background: var(--warn-soft); color: #B4761A; }
.badge-slate { background: #F1F5F9; color: var(--ink-2); }
.rec-body { flex: 1; min-width: 0; }
.rec-body b { display: block; font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-body span { font-size: 10.5px; color: var(--ink-3); }
.rec-val { font-size: 14.5px; font-weight: 700; color: var(--brand); flex-shrink: 0; }
.rec-val.zero { color: #CBD5E1; }

.menux { background: #fff; border-radius: var(--r-lg); padding: 2px 14px; box-shadow: var(--sh-sm); }
.menux button {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-2);
  font-size: 13.5px;
  text-align: left;
}
.menux button:last-child { border-bottom: none; }
.menux button .mi { font-size: 16px; }
.menux button .mx { margin-left: auto; color: #CBD5E1; font-size: 18px; }

/* ---------------- 审核台 ---------------- */
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.metric {
  padding: 12px 4px;
  border-radius: var(--r-md);
  background: #fff;
  box-shadow: var(--sh-sm);
  text-align: center;
}
.metric b { display: block; font-size: 22px; font-weight: 700; line-height: 1.15; }
.metric b.warn { color: var(--warn); }
.metric span { font-size: 10px; color: var(--ink-3); }
.metric.is-pri { background: linear-gradient(150deg, #10B981, #047857); }
.metric.is-pri b { color: #fff; }
.metric.is-pri span { color: rgba(255, 255, 255, .85); }

.tabsb { display: flex; gap: 8px; margin: 18px 0 12px; }
.tabsb button {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 13px;
  color: var(--ink-2);
}
.tabsb button.is-on { background: var(--ink); box-shadow: none; color: #fff; font-weight: 600; }
.tabsb .cnt { background: var(--danger); color: #fff; font-size: 10.5px; border-radius: 999px; padding: 1px 7px; }
.tabsb button.is-on .cnt { background: rgba(255, 255, 255, .26); }

.acard { background: #fff; border-radius: var(--r-lg); padding: 14px; box-shadow: var(--sh-sm); }
.acard + .acard { margin-top: 12px; }
.ac-head { display: flex; gap: 11px; }
.ac-thumb {
  position: relative;
  width: 74px; height: 74px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
  flex-shrink: 0;
}
.ac-thumb .ph-count {
  position: absolute; right: 4px; bottom: 4px;
  background: rgba(22, 32, 44, .5);
  color: #fff;
  font-size: 9px;
  border-radius: 5px;
  padding: 1px 5px;
}
.ac-info { flex: 1; min-width: 0; }
.ac-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.ac-title h5 { font-size: 15px; font-weight: 600; line-height: 1.35; }
.risk { font-size: 10px; border-radius: 5px; padding: 2px 7px; flex-shrink: 0; white-space: nowrap; }
.risk-low { background: var(--brand-soft); color: var(--brand-deep); }
.risk-mid { background: var(--warn-soft); color: #B4761A; }
.risk-high { background: var(--danger-soft); color: #D33A3A; }
.ac-info p { font-size: 10.5px; color: var(--ink-3); margin-top: 4px; }
.ac-tags { display: flex; flex-wrap: wrap; margin-top: 7px; }
.ac-field { display: flex; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line-2); font-size: 11.5px; }
.ac-head + .ac-field { margin-top: 12px; }
.ac-field span { color: var(--ink-3); width: 34px; flex-shrink: 0; }
.ac-field b { font-weight: 400; flex: 1; line-height: 1.6; word-break: break-all; }
.ai-box {
  display: flex; gap: 7px;
  margin-top: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  background: #EAF7FF;
  font-size: 10.5px;
  color: #2F648C;
  line-height: 1.6;
}
.report-quote { margin-top: 12px; padding: 11px; border-radius: 10px; background: #F8FAFC; font-size: 12px; color: var(--ink-2); line-height: 1.7; }
.ac-actions { display: flex; gap: 8px; margin-top: 12px; }
.ac-actions .btn { flex: 1; height: 40px; font-size: 13px; border-radius: 11px; }
.ac-actions .btn.grow { flex: 1.4; }
/* 附近管理：操作最多 4 个（改信息 / 抹除照片 / 恢复上线 / 移除）。
   一行放不下时允许折行 —— 宁可多占一行，也别把按钮挤到字看不全。
   只有 2~3 个按钮时不会触发（它们本来就放得下）。 */
.nb-card .ac-actions { flex-wrap: wrap; }

/* ---------------- 审核台 · 投稿照片 ----------------
   审核审的就是现场：有图必须先看到图，点开看大图。 */
.ac-photos { display: flex; flex-wrap: wrap; gap: 6px; width: 148px; flex-shrink: 0; align-content: flex-start; }
.ac-photo {
  position: relative;
  width: 71px; height: 71px;
  padding: 0; border: 0;
  border-radius: var(--r-md);
  overflow: hidden;
  background: linear-gradient(135deg, #EDF1F8, #E1E8F0);
  box-shadow: 0 0 0 1px var(--line-2) inset;
  cursor: zoom-in;
  flex-shrink: 0;
}
.ac-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ac-photo:hover { box-shadow: 0 0 0 2px var(--brand) inset; }
.ac-photo-more {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(22, 32, 44, .52); color: #fff;
  font-size: 15px; font-weight: 600;
}
.ac-photo-total { flex: 1 1 100%; text-align: right; font-size: 9.5px; color: var(--ink-3); margin-top: -2px; }

/* 大图弹层 */
.photo-dialog { max-width: min(92vw, 560px); }
.photo-view { display: flex; align-items: center; justify-content: center; padding: 4px 0 2px; }
.photo-view img { display: block; max-width: 100%; max-height: 62vh; border-radius: var(--r-md); cursor: zoom-out; }

/* ---------------- 详情页 · 现场照片（用户实拍） ---------------- */
.photo-strip { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 4px; }
.photo-cell {
  position: relative;
  width: 104px; height: 104px;
  padding: 0;
  border: 0;
  border-radius: var(--r-md);
  overflow: hidden;
  background: #EDF1F8;
  cursor: zoom-in;
  flex-shrink: 0;
}
.photo-cell img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.photo-cell:hover img { transform: scale(1.05); }
@media (max-width: 520px) {
  .photo-cell { width: calc((100% - 18px) / 3); height: 96px; }
}

/* ---------------- 纠错弹层（居中 + 原因 chip + 自由描述） ---------------- */
.rp-dialog { max-width: min(92vw, 440px); }
.rp-body { padding: 4px 20px 16px; }
.rp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.rp-reason {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  font-size: 12.5px;
  border-radius: 999px;
  padding: 6px 13px;
  cursor: pointer;
  transition: all .15s ease;
}
.rp-reason:active { transform: scale(.96); }
.rp-reason.is-on {
  border-color: var(--brand);
  color: var(--brand-deep);
  background: var(--brand-soft);
  font-weight: 600;
}
.rp-note {
  display: block;
  width: 100%;
  margin-top: 13px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #F8FAFC;
  padding: 10px 12px;
  font-size: 13px;
  font-family: inherit;
  line-height: 1.6;
  color: var(--ink);
  resize: none;
  box-sizing: border-box;
}
.rp-note:focus { outline: none; border-color: var(--brand); background: #fff; }
.rp-hint { margin-top: 10px; font-size: 11px; color: var(--ink-3); line-height: 1.65; }

/* ---------------- 后台 · 修改信息弹层 ---------------- */
.fx-dialog { max-width: min(94vw, 460px); }
.fx-sub { margin-top: 3px; font-size: 11.5px; font-weight: 400; color: var(--ink-3); }
.fx-body { padding: 2px 20px 14px; max-height: 56vh; overflow-y: auto; }
.fx-field { display: flex; align-items: center; gap: 10px; margin-top: 9px; }
.fx-field > span { flex-shrink: 0; width: 60px; font-size: 12px; color: var(--ink-2); text-align: right; }
.fx-in {
  flex: 1; min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #F8FAFC;
  padding: 8px 11px;
  font-size: 13px;
  font-family: inherit;
  color: var(--ink);
  box-sizing: border-box;
}
.fx-in:focus { outline: none; border-color: var(--brand); background: #fff; }
select.fx-in { appearance: auto; }

/* ---------------- 审核员管理 · 名单 ---------------- */
.rv-list { margin-top: 2px; }
.rv-row { display: flex; align-items: center; gap: 10px; padding: 11px 2px; border-top: 1px solid var(--line-2); }
.rv-row:first-child { border-top: 0; }
.rv-row.is-off { opacity: .58; }
.rv-avatar {
  width: 36px; height: 36px; flex-shrink: 0;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand-deep);
  font-size: 15px; font-weight: 600;
}
.rv-row.is-off .rv-avatar { background: #EDF1F8; color: var(--ink-3); }
.rv-body { flex: 1; min-width: 0; display: block; }
.rv-body b { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 13.5px; font-weight: 600; }
.rv-role { font-size: 10px; font-weight: 400; color: var(--brand-deep); background: var(--brand-soft); border-radius: 5px; padding: 1px 6px; }
.rv-flag { font-size: 10px; font-weight: 400; color: #B4761A; background: var(--warn-soft); border-radius: 5px; padding: 1px 6px; }
.rv-meta { display: block; font-size: 10.5px; color: var(--ink-3); margin-top: 3px; word-break: break-all; }
.rv-state { flex-shrink: 0; font-size: 10.5px; color: var(--brand-deep); background: var(--brand-soft); border-radius: 5px; padding: 2px 7px; }
.rv-state.is-off { color: var(--danger); background: var(--danger-soft); }
.rv-act { display: flex; gap: 6px; flex-shrink: 0; }
.rv-act .btn { width: auto; height: 30px; padding: 0 11px; font-size: 11.5px; border-radius: 9px; }
/* 「全库管理（免定位）」的授权开关：只有已授权时才点亮，未授权保持普通按钮样式，
   这样一眼能看出"谁开了、谁没开" */
.rv-perm.is-on { color: var(--brand-deep); background: var(--brand-soft); border-color: transparent; }
.bo-wrap .rv-list { max-width: 720px; }

@media (max-width: 520px) {
  .rv-row { flex-wrap: wrap; }
  .rv-act { flex: 1 1 100%; justify-content: flex-end; }
}

.admin-log { margin-top: 12px; font-size: 11px; color: var(--ink-3); }
.admin-log div { padding: 6px 0; border-bottom: 1px dashed var(--line-2); }
.admin-log div:last-child { border-bottom: none; }
.admin-log b { color: var(--ink-2); font-weight: 600; }
.admin-log .log-at { float: right; color: var(--ink-4); font-size: 10px; }

/* ---------------- 空态 ---------------- */
.empty { padding: 52px 24px; text-align: center; color: var(--ink-3); font-size: 14px; }
.empty-icon { display: block; font-size: 40px; margin-bottom: 10px; opacity: .55; }
.empty small { display: block; font-size: 11.5px; color: var(--ink-4); margin-top: 6px; }

/* ---------------- 浮层 ---------------- */
#overlays { position: fixed; inset: 0; pointer-events: none; z-index: 100; }
#overlays > * { pointer-events: auto; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom));
  transform: translate(-50%, 12px);
  max-width: min(84vw, 420px);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  background: rgba(22, 32, 44, .92);
  color: #fff;
  font-size: 13.5px;
  line-height: 1.4;
  opacity: 0;
  /* 进场/退场由 GSAP 驱动（App.anim），这里不能再放 transition，
     否则会和逐帧写入的内联 transform 互相打架 */
  box-shadow: 0 10px 30px rgba(0, 0, 0, .22);
  text-align: center;
}
.toast.in { opacity: 1; transform: translate(-50%, 0); }
.toast .toast-ico { color: #6EE7B7; font-weight: 700; }
.toast.is-success { background: rgba(4, 120, 87, .96); }

.mask {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 24, 36, .42);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  padding: 20px;
}
.mask.in { opacity: 1; }
.panel { transform: scale(.95); }
.mask.in .panel { transform: none; }

.panel-dialog {
  width: 100%;
  max-width: 320px;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
}
.dlg-title { padding: 20px 20px 8px; font-size: 16px; font-weight: 600; text-align: center; }
.dlg-body { padding: 0 20px 18px; font-size: 13.5px; color: var(--ink-2); text-align: center; line-height: 1.7; white-space: pre-line; }
.dlg-actions { display: flex; border-top: 1px solid var(--line); }
.dlg-btn { flex: 1; height: 50px; font-size: 15px; color: var(--ink-2); }
.dlg-btn + .dlg-btn { border-left: 1px solid var(--line); }
.dlg-btn.is-primary { color: var(--brand); font-weight: 600; }
.dlg-btn.is-danger { color: var(--danger); font-weight: 600; }

.panel-sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: #F3F6FA;
  border-radius: 18px 18px 0 0;
  padding: 8px 12px calc(12px + env(safe-area-inset-bottom));
  transform: translateY(100%);
  max-height: 76dvh;
  overflow-y: auto;
}
.mask.in .panel-sheet { transform: none; }
.sheet-title { text-align: center; font-size: 12px; color: var(--ink-3); padding: 12px 0 10px; }
.sheet-list { background: #fff; border-radius: 14px; overflow: hidden; }
.sheet-item {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 15px 18px;
  font-size: 15px;
  border-bottom: 1px solid var(--line-2);
  text-align: left;
}
.sheet-item:last-child { border-bottom: none; }
.sheet-item:active { background: #F8FAFC; }
.sheet-sub { font-size: 11px; color: var(--ink-3); }
.sheet-cancel {
  width: 100%;
  margin-top: 8px;
  padding: 15px;
  border-radius: 14px;
  background: #fff;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-2);
}

.bottom-card {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom));
  width: min(calc(100% - 32px), 488px);
  transform: translate(-50%, 20px);
  opacity: 0;
}
.bottom-card.in { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- 照片占位渐变 ---------------- */
.g-green { background: linear-gradient(135deg, #D9F5E9, #A9E5CC); }
.g-blue { background: linear-gradient(135deg, #DDEAFE, #B6D2FB); }
.g-amber { background: linear-gradient(135deg, #FDF0D8, #F8DCA6); }
.g-purple { background: linear-gradient(135deg, #E9E3FD, #CFC2FA); }
.g-slate { background: linear-gradient(135deg, #E7ECF3, #CBD5E1); }

/* ============================================================
   共享布局工具
   放在所有基础规则之后，确保能压过「.card + .card」这类相邻选择器
   ============================================================ */

/* 纵向堆叠列：把一组卡片包起来，移动端 / 桌面端都用它 */
.col { display: flex; flex-direction: column; gap: 12px; }
.col > .card, .col > .banner, .col > .tcard, .col > .sect, .col > .acard,
.col > .tipcard, .col > .audit-note, .col > .dup-box, .col > .row-x,
.col > .statcard, .col > .profile { margin-top: 0; }

/* 分栏容器：移动端一律纵向堆叠，桌面端才切成多列 */
.split { display: flex; flex-direction: column; gap: 12px; }

/* 上传页的分栏容器在移动端保持原来的左右留白 */
.upload-cols { padding: 0 16px; }

/* 首页「离你最近」：移动端 1 列 */
.near-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.near-grid .tcard + .tcard { margin-top: 0; }

/* 左导航的品牌区 / 滑动高亮块：仅桌面端出现 */
.rail-brand, .rail-ind { display: none; }

/* ============================================================
   补充规则（首页安全区 / 排序栏 / 收起地图）
   ============================================================ */

/* 首页没有顶栏，hero 自己撑开状态栏安全区 */
.hero { padding-top: calc(18px + env(safe-area-inset-top)); }

/* 附近厕所：排序栏 */
.sortbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 16px 12px;
}
.sortbar .rc { font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.sortbar .rc b { font-size: 13.5px; color: var(--ink); }
.sortbar .seg button { padding: 6px 11px; font-size: 11.5px; }

/* 列表模式：整列收起。
   早先只把地图壳压成 0 高，网格列宽并不回收 —— 桌面端左半边会留一条
   620px 宽的空列，看着就像白屏；而且「地图/列表」那个按钮本身就在壳里，
   切过去就再也点不回来了。现在整列隐藏，切换入口挪到列表栏顶部。 */
.nearby-cols.is-list .nearby-map-col { display: none; }

/* 排序栏左侧分组：列表模式下会先放一个「显示地图」按钮 */
.sortbar .sb-left { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.sortbar .map-back {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: 999px;
  background: #fff; box-shadow: var(--sh-sm);
  font-size: 11.5px; color: var(--ink-2); white-space: nowrap;
  transition: transform .14s;
}
.sortbar .map-back:active { transform: scale(.96); }

/* 空态里那个"能点的"建议按钮（.empty 自带大内边距，这里往回收一点） */
.empty-cta { text-align: center; margin: -34px 0 0; }

/* 移动端地图高度 */
@media (max-width: 1023px) {
  .map-shell { height: 44dvh; min-height: 236px; }
}

/* ============================================================
   桌面端（≥1024px）
   外壳从「放大版手机」改为真正的 Web 应用布局：
   左侧竖向导航栏常驻 + 右侧内容区铺满视口高度，各页由单列转为分栏
   ============================================================ */
@media (min-width: 1024px) {
  :root { --gut: 30px; }

  /* ---- 外壳：grid = 左导航 + 内容 ---- */
  .app {
    max-width: 1340px;
    height: 100dvh;
    margin: 0 auto;
    border-radius: 0;
    display: grid;
    grid-template-columns: 232px minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    box-shadow: 0 0 0 1px rgba(22, 32, 44, .05), 0 40px 90px -50px rgba(16, 32, 52, .35);
  }

  /* ---- 底部导航 → 左侧竖向导航栏 ---- */
  .tabbar {
    grid-column: 1;
    grid-row: 1 / -1;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    height: auto;
    padding: 22px 14px;
    gap: 3px;
    border-top: none;
    border-right: 1px solid var(--line);
    background: #fff;
    position: relative;
    z-index: 30;
  }
  /* 子页面（附近/详情）本来会隐藏底栏；桌面上导航栏常驻，不做隐藏 */
  .tabbar.is-hidden { display: flex !important; }

  .rail-brand { display: flex; align-items: center; gap: 11px; padding: 0 10px 22px; }
  .rail-logo {
    width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0;
    background: linear-gradient(150deg, #34D399, #047857);
    color: #fff; font-size: 19px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 18px -7px rgba(5, 150, 105, .6);
  }
  .rail-brand .rb-txt { min-width: 0; }
  .rail-brand b { display: block; font-size: 15.5px; font-weight: 700; letter-spacing: .6px; line-height: 1.25; }
  .rail-brand .rb-sub {
    display: block; font-size: 10.5px; color: var(--ink-3);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }

  /* 选中高亮块：位置由 GSAP 滑动（App.anim.rail） */
  .rail-ind {
    display: block;
    position: absolute;
    left: 14px;
    top: 0;
    width: 204px;
    height: 46px;
    border-radius: 12px;
    background: var(--brand-soft);
    opacity: 0;
    pointer-events: none;
    will-change: transform;
  }

  .tab {
    flex: 0 0 auto;
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    height: 46px;
    padding: 0 14px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-2);
    position: relative;
    z-index: 1;
  }
  .tab svg { width: 20px; height: 20px; }
  .tab.is-on { color: var(--brand-deep); font-weight: 650; }
  .tab.is-on svg { stroke-width: 2.1; }

  /* ---- 顶栏 ---- */
  .topbar {
    grid-column: 2;
    grid-row: 1;
    height: 64px;
    padding-left: var(--gut);
    padding-right: var(--gut);
    background: rgba(255, 255, 255, .88);
  }
  .tb-title { text-align: left; font-size: 18px; padding: 0 0 0 4px; }
  .tb-btn { width: 42px; height: 42px; border-radius: 13px; }
  .tb-spacer { width: 0; }

  /* ---- 内容区 ---- */
  .view { grid-column: 2; grid-row: 2; }
  .view::-webkit-scrollbar { width: 11px; }
  .view::-webkit-scrollbar-track { background: transparent; }
  .view::-webkit-scrollbar-thumb {
    background: #D2DAE5; border-radius: 99px;
    border: 3px solid transparent; background-clip: content-box;
  }
  .view::-webkit-scrollbar-thumb:hover { background: #B7C2D1; background-clip: content-box; }
  .pg { padding-bottom: 40px; }

  /* ---- 分栏：从这里开始各页由单列变多列 ---- */
  .split { display: grid; gap: 16px; align-items: start; }
  .near-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  /* 详情页两栏等宽。
     从前是 1.05 / .95，偏向放「名称 + 可信度」的左栏 —— 但那三张卡加起来才 409px，
     右栏六块却有 1666px，左下角空出整片灰。内容重新分栏之后两栏高度已经齐平
     （约 1060 / 1100），等宽看着最稳；左栏的「详细信息」是"标签 + 值"两列布局，
     值那一侧常有长句（"需通过安检进入馆内"），也确实吃宽度。 */
  .detail-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .mine-cols { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); }
  .upload-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 16px var(--gut) 0; }

  /* ---- 首页 ---- */
  .hero {
    margin: 26px var(--gut) 0;
    border-radius: 22px;
    padding: 30px 34px 80px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 24px;
  }
  .hero::before { width: 520px; height: 520px; top: -238px; right: -150px; }
  .brand-row { flex: 1; }
  .brand-name { font-size: 25px; }
  .brand-slogan { font-size: 12.5px; }
  .loc-chip { margin-top: 0; font-size: 12.5px; padding: 8px 15px; }
  .loc-chip .lc-text { max-width: 340px; }
  .hstats { flex-basis: 100%; margin-top: 24px; padding: 18px 0; }
  .hstat b { font-size: 31px; }
  .hstat b i { font-size: 14px; }
  .hstat span { font-size: 11.5px; }
  .acts { flex-direction: row; gap: 16px; margin: -58px var(--gut) 0; }
  .acts .act-card { flex: 1; padding: 18px; }
  .act-body b { font-size: 17px; }
  .act-body span { font-size: 12px; }
  .sect { margin: 30px var(--gut) 0; }
  .sect-head h3 { font-size: 19px; }
  .tipcard { margin: 20px var(--gut) 0; width: auto; padding: 18px; }
  .footnote { padding: 30px var(--gut) 10px; }

  /* ---- 附近厕所：地图 / 列表双栏，地图栏跟随滚动 ---- */
  .nearby-cols {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
    gap: 0;
    align-items: start;
  }
  .nearby-map-col { position: sticky; top: 0; align-self: stretch; }
  .map-shell { height: calc(100dvh - 64px); max-height: 900px; min-height: 440px; }
  .nearby-list-col { padding-bottom: 24px; }
  .sortbar { padding: 20px 26px 14px; }
  .nearby-list-col > .pad { padding-left: 26px; padding-right: 26px; }
  .nearby-list-col > .footnote { padding-left: 26px; padding-right: 26px; }

  /* 列表模式（地图列已隐藏）→ 单列，卡片铺成两列。
     不要用 `margin:0 auto` 去居中收窄：网格项一旦有 auto 外边距就不再拉伸，
     会按内容收缩成一个窄条，宽屏上左右又是大片留白。
     铺两列既能填满，也和首页「离你最近」的 .near-grid 同一套语言。 */
  .nearby-cols.is-list { grid-template-columns: minmax(0, 1fr); }
  .nearby-cols.is-list #nearbyList {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-content: start;
  }
  .nearby-cols.is-list #nearbyList .tcard { margin-top: 0; }
  .nearby-cols.is-list #nearbyList .empty,
  .nearby-cols.is-list #nearbyList .empty-cta { grid-column: 1 / -1; }

  /* ---- 详情页 ---- */
  .detail-hero {
    height: 320px; font-size: 140px;
    margin: 26px var(--gut) 0; border-radius: 22px; overflow: hidden;
  }
  .detail-body { margin-top: -48px; padding: 0 var(--gut); border-radius: 26px 26px 0 0; }
  .d-name { font-size: 25px; }
  .detail-body > .card { padding: 22px; }
  .detail-actionbar { margin-top: 22px; padding-left: var(--gut); padding-right: var(--gut); }

  /* ---- 我的 ---- */
  .profile { margin: 26px var(--gut) 0; border-radius: 22px; padding: 28px 32px 32px; }
  .p-score b { font-size: 46px; }
  .p-progress { max-width: 520px; }
  .statcard { margin: 24px var(--gut) 0; padding: 12px 0; }
  .statcard b { font-size: 26px; }
  .statcard span { font-size: 11.5px; }
  .mine-cols { margin: 22px var(--gut) 0; }
  .mine-cols .sect { margin: 0; }

  /* ---- 上传 ---- */
  .upload-head { padding: 28px var(--gut) 8px; }
  .upload-head h2 { font-size: 27px; }
  .upload-cols { margin-top: 4px; }
  .audit-note { margin: 16px var(--gut) 0; }
  .submit-bar { padding-left: var(--gut); padding-right: var(--gut); }
}

@media (min-width: 1440px) {
  :root { --gut: 40px; }
  .app { max-width: 1480px; grid-template-columns: 248px minmax(0, 1fr); }
  .rail-ind { width: 220px; }
}

/* ============================================================
   指针设备：悬停微交互（触屏不触发）
   ============================================================ */
@media (hover: hover) and (pointer: fine) {
  .act-card:hover, .tcard:hover, .rec:hover, .menux button:hover, .tipcard:hover { box-shadow: var(--sh-md); }
  .btn:hover { filter: brightness(1.04); }
  .btn-ghost:hover, .btn-outline:hover { background: #E9EFF6; }
  .tab:hover { background: #F5F8FB; color: var(--ink); }
  .tab.is-on:hover { background: transparent; color: var(--brand-deep); }
  .sect-link:hover { text-decoration: underline; }
  .chips button:hover { border-color: var(--brand-line); color: var(--ink); }
  .tb-btn:hover { background: #F1F5F9; }
  .sel-close:hover { color: var(--ink); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ============================================================
   路径指引：概览 + 分步
   ============================================================ */
.rsum { display: flex; gap: 8px; margin-top: 6px; }
.rsum > span {
  flex: 1;
  text-align: center;
  padding: 10px 6px;
  border-radius: var(--r-md);
  background: var(--brand-soft);
  font-size: 10.5px;
  color: var(--ink-2);
  line-height: 1.5;
}
.rsum > span b {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--brand-deep);
  letter-spacing: -.3px;
}

.rsteps { list-style: none; margin: 15px 0 0; padding: 0; }
.rsteps li { position: relative; display: flex; gap: 10px; padding-bottom: 16px; }
.rsteps li:last-child { padding-bottom: 0; }
.rsteps li::before {
  content: "";
  position: absolute;
  left: 12px; top: 26px; bottom: 2px;
  width: 2px;
  background: linear-gradient(var(--brand-line), rgba(5, 150, 105, .05));
}
.rsteps li:last-child::before { display: none; }
.rst-dot {
  position: relative; z-index: 1;
  flex: 0 0 auto;
  width: 25px; height: 25px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.rsteps li.is-end .rst-dot { background: var(--brand); color: #fff; font-size: 13px; }
.rst-body { min-width: 0; padding-top: 3px; }
.rst-body b { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.45; }
.rst-body span { display: block; font-size: 11.5px; color: var(--ink-3); margin-top: 3px; line-height: 1.5; }

/* 附近：选中卡片上的路线条 */
.sel-route {
  display: flex; align-items: center; gap: 8px;
  margin-top: 11px;
  padding: 9px 11px;
  border-radius: var(--r-md);
  background: var(--brand-soft);
}
.sel-route .sr-ico { font-size: 15px; }
.sel-route .sr-txt { flex: 1; min-width: 0; font-size: 11.5px; color: var(--ink-2); }
.sel-route .sr-txt b { font-size: 13.5px; font-weight: 700; color: var(--brand-deep); }
.sel-route .sr-btn { font-size: 12px; font-weight: 600; color: var(--brand-deep); white-space: nowrap; }

.route-dlg { text-align: left; }
.rdg-to { font-size: 14.5px; font-weight: 700; margin-bottom: 4px; }

/* ============================================================
   段位与排位
   ============================================================ */
.p-rankno {
  display: inline-flex; align-items: center;
  margin: 4px 0 0 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  font-size: 10.5px;
}
/* 资料卡上的账号编号：跟段位、名次两个胶囊同一套路（半透明白底），
   数字用等宽数字形，避免 1 和 8 宽度不一晃眼睛。 */
.p-uid {
  display: inline-flex; align-items: center;
  margin: 4px 6px 0 0;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  font-size: 10.5px; letter-spacing: .3px;
  font-variant-numeric: tabular-nums;
}
.p-up { margin-left: auto; font-style: normal; font-size: 11.5px; color: rgba(255, 255, 255, .88); }
.sect-sub { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }

/* 段位阶梯（低 → 高） */
.ladder { background: #fff; border-radius: var(--r-lg); padding: 8px 14px; box-shadow: var(--sh-sm); }
.ladder-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-2);
  opacity: .6;
}
.ladder-item:last-child { border-bottom: none; }
.ladder-item.is-reached { opacity: 1; }
.ladder-item.is-on {
  opacity: 1;
  margin: 0 -8px; padding-left: 8px; padding-right: 8px;
  border-radius: 10px;
  background: var(--brand-soft);
}
.ld-ico { width: 24px; text-align: center; font-size: 19px; }
.ld-body { flex: 1; min-width: 0; }
.ld-body b { display: block; font-size: 13.5px; font-weight: 600; }
.ld-body span { font-size: 10.5px; color: var(--ink-3); }
.ld-tag {
  font-size: 10.5px; font-weight: 600;
  color: #fff; background: var(--brand);
  border-radius: 999px; padding: 2px 9px;
}
.ld-tag.is-done { color: var(--ink-3); background: #EDF1F8; }

/* 排位榜 */
.board { background: #fff; border-radius: var(--r-lg); padding: 4px 14px; box-shadow: var(--sh-sm); }
.board-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-2);
}
.board-row:last-child { border-bottom: none; }
.board-row.is-me {
  margin: 0 -8px; padding-left: 8px; padding-right: 8px;
  border-radius: 10px;
  background: var(--brand-soft);
  border-bottom-color: transparent;
}
.bd-pos { flex: 0 0 auto; width: 24px; text-align: center; font-size: 12.5px; font-weight: 700; color: var(--ink-3); }
.bd-pos.is-medal { font-size: 16px; }
.bd-avatar {
  flex: 0 0 auto;
  width: 32px; height: 32px;
  border-radius: 10px;
  background: #EEF2F8; color: var(--ink-2);
  font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.board-row.is-me .bd-avatar { background: var(--brand); color: #fff; }
.bd-body { flex: 1; min-width: 0; }
.bd-body b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bd-tier { display: block; font-size: 10px; color: var(--ink-3); margin-top: 2px; }
.bd-num { flex: 0 0 auto; text-align: right; }
.bd-num b { display: block; font-size: 15px; font-weight: 700; color: var(--brand-deep); line-height: 1.1; }
.bd-num span { font-size: 9.5px; color: var(--ink-4); }
.board-more { text-align: center; color: var(--ink-4); font-size: 12px; padding: 2px 0; }

@media (min-width: 1024px) {
  .rsum > span { padding: 12px 8px; }
  .rsum > span b { font-size: 19px; }
  .rst-body b { font-size: 14.5px; }
  .bd-avatar { width: 36px; height: 36px; border-radius: 11px; font-size: 15px; }
  .bd-num b { font-size: 16px; }
}

/* ============================================================
   账号：注册 / 登录
   ============================================================ */

/* profile 卡上的账号按钮（深色渐变底 → 用半透明白） */
.p-id { min-width: 0; }
.p-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-auth {
  margin-left: auto; flex-shrink: 0;
  height: 30px; padding: 0 12px; border-radius: 15px;
  font-size: 12px; font-weight: 500; color: #fff;
  background: rgba(255, 255, 255, .22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .32);
  transition: background .18s;
  white-space: nowrap;
}
.p-auth:active { background: rgba(255, 255, 255, .36); }

/* 表单 */
.auth-body { text-align: left; white-space: normal; padding-top: 2px; }
.auth-tip { font-size: 12.5px; color: var(--ink-3); margin: 0 0 14px; line-height: 1.6; }
.auth-field { display: block; margin-bottom: 11px; }
.af-label { display: block; font-size: 12px; color: var(--ink-3); margin-bottom: 5px; }
.auth-input {
  width: 100%; height: 46px; padding: 0 14px;
  border-radius: 12px; border: 1px solid var(--line);
  background: #F8FAFC; font-size: 15px; color: var(--ink);
  transition: border-color .18s, background .18s, box-shadow .18s;
}
.auth-input::placeholder { color: var(--ink-4); font-size: 13.5px; }
.auth-input:focus {
  outline: none; background: #fff;
  border-color: var(--brand-line);
  box-shadow: 0 0 0 4px rgba(5, 150, 105, .14);
}
.auth-input.is-bad {
  border-color: var(--danger-line); background: var(--danger-soft);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, .1);
}
.auth-err {
  min-height: 18px; margin-top: 9px;
  font-size: 12.5px; color: var(--danger);
  opacity: 0; transition: opacity .18s;
}
.auth-err.is-on { opacity: 1; }

.panel.is-shake { animation: authShake .42s cubic-bezier(.36, .07, .19, .97); }
@keyframes authShake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-6px); }
  40%, 60% { transform: translateX(6px); }
}

/* 滑块人机验证 */
.cap { margin: 14px 0 2px; }
.cap-track {
  position: relative;
  height: 48px;
  border-radius: 12px;
  background: #F1F5F9;
  box-shadow: inset 0 0 0 1px var(--line);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  user-select: none; -webkit-user-select: none;
}
.cap-text { font-size: 12.5px; color: var(--ink-3); pointer-events: none; transition: color .2s; z-index: 1; }
.cap-fill {
  position: absolute; left: 4px; top: 4px; bottom: 4px; width: 44px;
  border-radius: 9px; background: var(--brand-soft);
  transition: background .2s;
}
.cap-handle {
  position: absolute; left: 4px; top: 4px;
  width: 40px; height: 40px; border-radius: 9px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(22, 32, 44, .16);
  display: flex; align-items: center; justify-content: center;
  color: var(--brand);
  cursor: grab; touch-action: none; z-index: 2;
  will-change: transform;
}
.cap-handle svg { width: 18px; height: 18px; }
.cap-handle:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.cap.is-drag .cap-handle { cursor: grabbing; }
.cap.is-drag .cap-text { color: var(--ink-4); }
.cap.is-pass .cap-fill { background: var(--brand); }
.cap.is-pass .cap-handle { background: var(--brand); color: #fff; }
.cap.is-pass .cap-text { color: #fff; font-weight: 600; }

@media (min-width: 1024px) {
  .auth-input { height: 48px; }
  .auth-field { margin-bottom: 12px; }
  .cap { margin-top: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .panel.is-shake { animation: none; }
  .cap-fill, .auth-err, .auth-input { transition: none; }
}

/* ============================================================
   申请成为审核员（#/apply）
   说明 → 填理由 → 等运营审核 → 开通后台权限
   ============================================================ */

/* 后台工作台有三个 Tab（上传 / 举报 / 审核员申请），窄屏允许换行 */
.tabsb { flex-wrap: wrap; }

.ap-hero { text-align: center; padding: 4px 6px 16px; }
.ap-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px;
  border-radius: 18px;
  background: var(--brand-soft);
  font-size: 27px;
  margin-bottom: 10px;
}
.ap-hero h1 { font-size: 19px; font-weight: 700; }
.ap-hero p { font-size: 12.5px; color: var(--ink-3); line-height: 1.75; margin-top: 6px; }

.ap-slot:empty { display: none; }
.ap-status {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  border-radius: var(--r-lg);
  padding: 14px 16px;
  margin-bottom: 12px;
  background: var(--line-2);
  border: 1px solid var(--line);
}
.ap-status b { font-size: 14.5px; }
.ap-status span { font-size: 12.5px; color: var(--ink-2); line-height: 1.7; }
.ap-status.is-wait { background: var(--warn-soft); border-color: var(--warn-line); }
.ap-status.is-ok { background: var(--brand-soft); border-color: var(--brand-line); }
.ap-status.is-no { background: var(--danger-soft); border-color: var(--danger-line); }
.ap-status .btn { margin-top: 4px; }

.ap-duties { display: grid; gap: 11px; }
.ap-duty { display: flex; align-items: flex-start; gap: 11px; }
.apd-ico {
  flex: none;
  width: 34px; height: 34px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: var(--line-2);
  font-size: 17px;
}
.apd-body { display: flex; flex-direction: column; }
.apd-body b { font-size: 13.5px; }
.apd-body span { font-size: 12px; color: var(--ink-3); line-height: 1.65; }

.ap-input {
  display: block;
  width: 100%;
  min-height: 106px;
  margin-top: 2px;
  padding: 12px 13px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: #F8FAFC;
  color: var(--ink);
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.7;
  resize: vertical;
  outline: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.ap-input:focus {
  border-color: var(--brand-line);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, .15);
}
.ap-input:disabled { opacity: .6; }
.ap-actions { display: flex; gap: 8px; margin-top: 12px; }

@media (min-width: 1024px) {
  .ap-duties { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ap-hero { padding-top: 10px; }
}



/* ============================================================
   贡献值商城（头像兑换）
   ============================================================ */
.shop-hero { margin-bottom: 16px; }

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.av-card {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--r-lg);
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color .18s, box-shadow .18s;
}

.av-card.is-worn {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: var(--sh-sm);
}

.av-card.is-poor { opacity: .62; }

.av-emoji {
  font-size: 40px;
  line-height: 1;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--line-2);
  border-radius: 50%;
}

.av-card.is-worn .av-emoji { background: #fff; }

.av-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.av-body b { font-size: 15.5px; color: var(--ink); }
.av-desc { font-size: 12px; color: var(--ink-3); line-height: 1.5; }

.av-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.av-cost {
  font-size: 13px;
  font-weight: 700;
  color: var(--warn);
  white-space: nowrap;
}
.av-cost.is-owned { color: var(--brand-deep); }

/* ============================================================
   厕所评价（文字 + emoji）
   ------------------------------------------------------------
   正文一律 white-space: pre-wrap：服务端**保留**用户敲的换行
   （见 app/routers/toilets.py 的 _clean_comment），这里得让它真的显出来，
   否则有人分行写「位置 / 卫生 / 时间」，到了页面上会被压成一坨。
   再配 overflow-wrap: anywhere，防止有人贴一长串无空格字符把卡片撑破。
   ============================================================ */
.cmt-list { margin-top: 2px; }

.cmt-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 0;
  border-top: 1px solid var(--line-2);
}
.cmt-item:first-child { border-top: 0; padding-top: 2px; }

.cmt-ava {
  flex: 0 0 30px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-size: 13.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cmt-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cmt-head { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.cmt-head b {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cmt-time { font-size: 11px; color: var(--ink-4); white-space: nowrap; }

/* 运营留的言挂的小标签。用警示橙而不是品牌绿：这是"身份"提示，不是"推荐" ——
   同一条色系和那行 .cmt-hint、那颗 .cmt-del.is-admin 保持一家人。 */
.cmt-tag {
  flex: 0 0 auto;
  align-self: center;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--warn-soft);
  border: 1px solid var(--warn-line);
  color: #B4761A;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 16px;
}
.cmt-text {
  font-size: 13.5px;
  line-height: 1.68;
  color: var(--ink-2);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.cmt-del {
  flex: 0 0 auto;
  width: 24px; height: 24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-4);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}
.cmt-del:hover { background: var(--danger-soft); color: var(--danger); }

/* 运营身份删**别人**的评价：同一颗 ✕，换成警示橙。用户划过去就能看出
   "这一步不是普通用户操作"；悬停仍走删除色，因为动作本身就是删除
   （.is-admin 与 :hover 同为 0-2-0，写在后面会盖掉 hover 的红色，得显式写一条）。 */
.cmt-del.is-admin { color: var(--warn); }
.cmt-del.is-admin:hover { background: var(--danger-soft); color: var(--danger); }

/* 运营浏览提示条：只在"确实有评价可删"时出现，摆明"不必回后台" */
.cmt-hint {
  margin: 2px 0 8px;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--warn-soft);
  border: 1px solid var(--warn-line);
  color: #B4761A;
  font-size: 12px;
  line-height: 1.7;
}

.cmt-empty {
  font-size: 12.5px;
  color: var(--ink-3);
  line-height: 1.7;
  padding: 2px 0;
}

.cmt-form {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line-2);
}
.cmt-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 56px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.65;
  resize: vertical;
}
.cmt-input::placeholder { color: var(--ink-4); }
.cmt-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.cmt-tools { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.cmt-emoji { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; min-width: 0; }
.cmt-emo {
  width: 30px; height: 30px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.cmt-emo:hover { border-color: var(--brand-line); }
.cmt-emo:active { transform: scale(.94); }

.cmt-form.is-locked {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.cmt-locked {
  flex: 1;
  min-width: 190px;
  margin: 0;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-3);
}

/* 我自己的那条：左侧一道品牌色条。一人一条之后它几乎总在列表里（可能被顶到
   最前，见 js/views/detail.js 的 view 拼装），给个记号，免得用户翻半天找不到
   自己写的话、也找不到那个删除按钮。 */
.cmt-item.is-mine {
  padding-left: 9px;
  border-left: 2px solid var(--brand-line);
}

/* 「你已经评价过」：没有按钮，所以不需要两端对齐，语气也压淡一点 */
.cmt-form.is-locked.cmt-done { justify-content: flex-start; }
.cmt-done .cmt-locked { color: var(--ink-4); }

.tcmt { font-size: 10.5px; color: var(--ink-3); white-space: nowrap; }

@media (max-width: 640px) {
  .cmt-emo { width: 28px; height: 28px; font-size: 15px; }
  .cmt-form.is-locked { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   厕所信息修订（补充 / 更正详细信息）
   ------------------------------------------------------------
   两处用到同一套「原值 → 新值」的行式对比：
     · 后台信息修订队列（js/views/partials.js 的 editCard）
     · 详情页"我提交的 / 我上次被拒的"（js/views/detail.js 的 editBlock）
   所以 .ed-diff 这一组写成共用的，不在两边各画一套 —— 两边各写一遍，
   迟早会在某一栏的对齐上分家，用户看着就像两个不相干的功能。
   ============================================================ */

.ed-wrap { margin-top: 12px; }
.ed-state {
  padding: 11px 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: #FBFDFF;
}
.ed-state + .ed-state { margin-top: 10px; }
.ed-state.is-pending { border-color: var(--brand-line); background: var(--brand-soft); }
.ed-state.is-rejected { border-color: var(--danger-line); background: var(--danger-soft); }
.ed-state-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  font-size: 12.5px; font-weight: 700; color: var(--ink-2);
}
.ed-count {
  flex-shrink: 0;
  font-size: 11px; font-weight: 600; color: var(--ink-3);
}
.ed-note {
  margin-top: 7px;
  font-size: 12px; line-height: 1.7; color: var(--ink-2);
  word-break: break-word;
}
.ed-state .btn { margin-top: 10px; }

/* 逐字段的前后对比：原值压淡、新值加粗上品牌色 —— 一眼能扫出"要变成什么" */
.ed-diffs { margin-top: 9px; display: flex; flex-direction: column; gap: 6px; }
.ed-diff {
  display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap;
  font-size: 12px; line-height: 1.7;
}
.ed-key {
  flex: 0 0 auto; min-width: 62px;
  font-weight: 600; color: var(--ink-3);
}
.ed-old {
  color: var(--ink-3);
  text-decoration: line-through;
  text-decoration-color: var(--ink-4);
  word-break: break-word;
}
.ed-arrow { color: var(--ink-4); flex: 0 0 auto; }
.ed-new { color: var(--brand-deep); font-weight: 700; word-break: break-word; }
/* 队列卡片里的对比行比详情页宽一点，给两栏留出余量 */
.acard .ed-diff { gap: 9px; }
.acard .ed-diffs { margin-top: 12px; }

.ed-locked {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
  margin-top: 12px;
  font-size: 12px; line-height: 1.7; color: var(--ink-3);
}

/* 提交修订的表单弹层。基础 .panel-dialog 是 320px、给一两句确认用的，
   这张表单要塞六个字段 + 备注，得放宽一点。 */
.panel-dialog.ed-dialog { max-width: 420px; }
.ed-dialog .dlg-title { padding: 18px 18px 8px; text-align: left; }
.ed-form { padding: 0 18px 18px; max-height: 62vh; overflow-y: auto; }
.ed-form .hint-line { margin-top: 0; margin-bottom: 12px; }
.ef { display: block; margin-bottom: 11px; }
.ef-label {
  display: block;
  margin-bottom: 5px;
  font-size: 12.5px; font-weight: 600; color: var(--ink-2);
}
.ef-input, .ef-note {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #fff;
  font-family: var(--font);
  font-size: 14px; color: var(--ink);
  outline: none;
}
.ef-input:focus, .ef-note:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.ef-note { resize: vertical; line-height: 1.6; }
/* 修订表单里的下拉。原生 select 的箭头各平台长得都不一样（Safari 还会
   把箭头顶到边框上），appearance:none 之后自绘一条 chevron —— 这样它和
   旁边的输入框才是同一套控件。箭头色用 --ink-3 (#94A3B8)：内联 SVG 里
   读不到 CSS 变量，所以写死同一个色值，改主题色时记得同步这一处。 */
.ef-input.ef-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%2394A3B8' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
  transition: border-color .16s, box-shadow .16s;
}
.ef-input.ef-select:hover { border-color: var(--ink-4); }
.ef-input.ef-select.is-placeholder { color: var(--ink-3); }
/* 已经改过的下拉：左边给一条品牌色细边，扫一眼就知道哪几项有改动。
   用 inset 阴影而不是 border-left —— 后者会把控件内容挤偏 2px。 */
.ef-input.ef-select.is-changed { box-shadow: inset 3px 0 0 var(--brand); }
/* ⚠️ 上面这条 (0-3-0) 比 .ef-input:focus (0-2-0) 更具体，会把聚焦光环整个顶掉
   —— 聚焦态必须在这里把两条阴影一起写全，否则「改了的那项」一点进去就没有焦点提示。 */
.ef-input.ef-select.is-changed:focus {
  box-shadow: inset 3px 0 0 var(--brand), 0 0 0 3px var(--brand-soft);
}

.ef-cur {
  display: block;
  margin-top: 4px;
  font-size: 11px; color: var(--ink-4);
  word-break: break-word;
}

@media (max-width: 640px) {
  .ed-form { max-height: 56vh; }
  .ed-key { min-width: 52px; }
}
