/* 找人 v2.7 */
:root {
  --blue: #1677ff; --blue-d: #0958d9; --blue-bg: #e6f0ff;
  --red: #f5222d; --orange: #fa8c16; --green: #52c41a; --purple: #722ed1;
  --text: #1f2329; --muted: #6b7280; --line: #e5e7eb; --bg: #f3f5f8; --card: #fff;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px;
  --r: 12px; --r-lg: 20px; --r-sm: 10px; --shadow: 0 2px 12px rgba(0, 0, 0, .14);
  --fill: #f3f5f8; --fill2: #f0f2f5; --hair: #f0f1f3; --bd: #d1d5db; --grouped: #f3f5f8;
  --safe-t: env(safe-area-inset-top); --safe-b: env(safe-area-inset-bottom);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; color: var(--text); background: var(--bg); -webkit-text-size-adjust: 100%; }
.hidden { display: none !important; }
.page { position: fixed; inset: 0; }
a { color: var(--blue); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select { font: inherit; font-size: 16px; min-height: 44px; padding: 0 var(--s3); border: 1px solid var(--bd); border-radius: 10px; outline: none; width: 100%; background: var(--card); color: var(--text); }
input:focus, select:focus { border-color: var(--blue); }
input.ask { display: block; margin-top: var(--s3); }

.btn { font-size: 16px; min-height: 44px; padding: 0 var(--s4); border: 1px solid var(--bd); border-radius: 10px; background: var(--card); color: var(--text); white-space: nowrap; transition: opacity .15s; }
.btn:active { opacity: .7; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 600; }
.btn.danger { color: var(--red); border-color: #ffccc7; background: #fff5f5; }
.btn.block { width: 100%; }
.btn.grow { flex: 1; }
.btn.small { font-size: 14px; padding: 0 var(--s3); flex: 1; }
.btn:disabled { opacity: .5; }
.link { background: none; border: 0; color: var(--blue); font-size: 15px; min-height: 44px; padding: 0 var(--s2); }
.row { display: flex; gap: var(--s2); }
.tip { font-size: 12px; color: var(--muted); text-align: center; margin: var(--s2) 0 0; }
.sub { font-size: 13px; color: var(--muted); font-weight: 400; margin-top: var(--s1); }

/* 入口 */
#entry { display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, #dbeafe, #f7f9fc 60%); padding: var(--s5); overflow: auto; }
.entry-box { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: var(--s3); }
.logo { width: 72px; height: 72px; margin: 0 auto; border-radius: 20px; background: var(--blue); display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 20px rgba(22, 119, 255, .35); }
.logo svg { width: 40px; height: 40px; }
h1 { margin: 0; text-align: center; font-size: 28px; }
h3 { margin: 0; font-size: 18px; }
h4 { margin: var(--s4) 0 var(--s1); font-size: 13px; color: var(--muted); font-weight: 600; }
.entry-box .sub { margin: 0 0 var(--s2); text-align: center; }
.entry-msg { background: #fff7e6; color: #ad4e00; border-radius: 10px; padding: var(--s2) var(--s3); font-size: 14px; text-align: center; }
label { font-size: 13px; color: var(--muted); }
.divider { text-align: center; color: var(--muted); font-size: 13px; position: relative; margin: var(--s1) 0; }
.divider::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--line); }
.divider span { background: #f1f6fd; position: relative; padding: 0 var(--s3); }

/* 地图 */
#map { position: absolute; inset: 0; z-index: 0; background: #e9eef3; }
.leaflet-container { font-family: inherit; }
.leaflet-control-attribution { font-size: 10px; }
.main { --sheet-h: calc(72px + var(--safe-b)); }
#main.s-min { --sheet-h: calc(72px + var(--safe-b)); }
#main.s-mid { --sheet-h: calc(44dvh + var(--safe-b)); }
#main.s-max { --sheet-h: calc(78dvh + var(--safe-b)); }

.top-stack { position: absolute; left: 0; right: 0; top: 0; padding: calc(var(--safe-t) + var(--s2)) var(--s3) 0; display: flex; flex-direction: column; gap: var(--s2); pointer-events: none; z-index: 1001; }
.top-stack > * { pointer-events: auto; }
.top-row { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); pointer-events: none; }
.top-row > * { pointer-events: auto; }
.team-chip { min-height: 44px; max-width: calc(100% - 56px); display: flex; align-items: center; gap: var(--s2); padding: 0 var(--s3); background: var(--card); border: 0; border-radius: 22px; box-shadow: var(--shadow); font-size: 14px; color: var(--text); }
.team-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-chip b { letter-spacing: 2px; font-size: 16px; color: var(--blue); }
.team-chip em { font-style: normal; font-size: 12px; color: #fff; background: var(--blue); padding: 2px 8px; border-radius: 10px; }
.round-btn, .fab { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--card); box-shadow: var(--shadow); color: var(--text); display: flex; align-items: center; justify-content: center; padding: 0; }
.round-btn:active, .fab:active { background: var(--fill2); }
.banner { background: #fff7e6; color: #ad4e00; border-radius: 10px; padding: var(--s2) var(--s3); font-size: 13px; box-shadow: var(--shadow); }

.fabs { position: absolute; right: var(--s3); bottom: calc(var(--sheet-h) + var(--s3)); z-index: 1001; display: flex; flex-direction: column; gap: var(--s2); transition: bottom .25s, opacity .2s; }
#main.s-max .fabs { opacity: 0; pointer-events: none; }
.fab.sos { background: var(--red); color: #fff; font-weight: 800; font-size: 13px; letter-spacing: .5px; }
.fab.sos:active { background: #cf1322; }
.fab.sos.on { animation: pulse 1.2s infinite; }

/* 导航卡片 */
.nav-card { --c: var(--blue); --heat: var(--blue); background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: var(--s3) var(--s4) var(--s3); transition: background .4s, color .4s; }
.nav-main { display: flex; gap: var(--s4); align-items: center; }
.compass { width: 76px; height: 76px; flex: none; border-radius: 50%; background: var(--blue-bg); display: flex; align-items: center; justify-content: center; }
.compass svg { width: 52px; height: 52px; fill: var(--c); transition: transform .12s linear; }
.compass.no-sensor { outline: 2px dashed #c0c6cf; outline-offset: -2px; }
.nav-info { min-width: 0; flex: 1; }
.instr { font-size: 19px; font-weight: 700; line-height: 1.3; word-break: break-all; }
.nav-nums { margin-top: var(--s1); display: flex; align-items: baseline; gap: var(--s2); }
.dist { font-size: 22px; font-weight: 700; color: var(--blue); font-variant-numeric: tabular-nums; }
.eta { font-size: 13px; color: var(--muted); }
.meta { font-size: 12px; color: var(--muted); margin-top: var(--s2); }
.nav-actions { display: flex; gap: var(--s2); margin-top: var(--s3); }
.nav-card.near .btn.primary { animation: pulse 1.2s infinite; }
/* 雷达模式 */
.nav-card.radar { background: var(--heat); color: #fff; }
.nav-card.radar .nav-top, .nav-card.radar .nav-top b, .nav-card.radar .meta, .nav-card.radar .eta, .nav-card.radar .link { color: rgba(255, 255, 255, .9); }
.nav-card.radar .nav-main { flex-direction: column; text-align: center; gap: var(--s2); }
.nav-card.radar .compass { width: 132px; height: 132px; background: rgba(255, 255, 255, .22); }
.nav-card.radar .compass svg { width: 96px; height: 96px; fill: #fff; }
.nav-card.radar .nav-nums { justify-content: center; }
.nav-card.radar .dist { font-size: 52px; color: #fff; line-height: 1; }
.nav-card.radar .instr { font-size: 17px; }
.nav-card.radar .btn { background: rgba(255, 255, 255, .95); border-color: transparent; color: var(--text); }
.nav-card.radar.near .btn.primary { background: var(--card); color: var(--red); font-size: 18px; min-height: 52px; }
.nav-card.radar.near .compass { animation: pulse 1s infinite; }

/* 集合点 / 录制条 */
.meet-bar { display: flex; align-items: center; gap: var(--s2); background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: var(--s2) var(--s3); font-size: 14px; }
.meet-bar > span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meet-bar .btn.small { flex: none; min-height: 36px; padding: 0 var(--s3); }
.mdot { width: 10px; height: 10px; border-radius: 3px; background: var(--orange); transform: rotate(45deg); flex: none; }
.mdot.rec { background: var(--red); border-radius: 50%; transform: none; animation: pulse 1.2s infinite; }

/* 选点 / 手绘 */
.crosshair { position: absolute; left: 50%; top: 50%; width: 36px; height: 36px; margin: -18px 0 0 -18px; z-index: 1001; pointer-events: none; }
.crosshair::before, .crosshair::after { content: ""; position: absolute; background: var(--red); }
.crosshair::before { left: 17px; top: 0; width: 2px; height: 36px; }
.crosshair::after { top: 17px; left: 0; height: 2px; width: 36px; }
.pick-bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1003; background: var(--card); border-radius: 20px 20px 0 0; padding: var(--s3) var(--s4) calc(var(--s3) + var(--safe-b)); box-shadow: 0 -4px 24px rgba(0, 0, 0, .15); display: flex; flex-direction: column; gap: var(--s2); }
.draw-text { font-size: 14px; color: var(--muted); text-align: center; min-height: 20px; }
#main.pick .sheet, #main.pick .fabs { display: none; }

/* 底部面板 */
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1002; height: var(--sheet-h); background: var(--card); border-radius: 20px 20px 0 0; box-shadow: 0 -4px 24px rgba(0, 0, 0, .12); display: flex; flex-direction: column; padding-bottom: var(--safe-b); transition: height .25s ease; }
.handle { height: 24px; flex: none; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.handle i { width: 36px; height: 4px; border-radius: 2px; background: #d1d5db; }
.tabs { display: flex; align-items: center; gap: var(--s1); padding: 0 var(--s3); height: 44px; flex: none; border-bottom: 1px solid var(--line); }
.tab { position: relative; height: 44px; padding: 0 var(--s2); border: 0; background: none; font-size: 15px; color: var(--muted); border-bottom: 2px solid transparent; }
.tab.on { color: var(--blue); font-weight: 600; border-bottom-color: var(--blue); }
.badge { display: inline-block; min-width: 16px; height: 16px; line-height: 16px; padding: 0 4px; margin-left: 2px; border-radius: 8px; background: var(--red); color: #fff; font-size: 11px; text-align: center; vertical-align: top; }
.pane { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.pane.chat { display: flex; flex-direction: column; overflow: hidden; }
ul { list-style: none; margin: 0; padding: 0; }

/* 队员列表 */
#memberList li, #favList li.fav { display: grid; grid-template-columns: 44px 1fr auto; gap: var(--s3); align-items: center; padding: var(--s2) var(--s4); min-height: 64px; border-bottom: 1px solid var(--hair); }
#memberList li.active { background: var(--blue-bg); }
#memberList li.dim .av { opacity: .55; }
#memberList li.flash { background: #fff7e6; }
.av { width: 44px; height: 44px; border-radius: 50%; color: #fff; font-weight: 700; font-size: 18px; display: flex; align-items: center; justify-content: center; }
.mi { min-width: 0; }
.mn { font-size: 16px; font-weight: 600; display: flex; align-items: center; flex-wrap: wrap; gap: var(--s1) 6px; }
.ms { font-size: 13px; color: var(--muted); margin-top: 2px; }
.ms .low { color: var(--red); font-weight: 600; }
.tag { font-style: normal; font-size: 11px; font-weight: 500; padding: 1px 6px; border-radius: 8px; background: #eef0f3; color: var(--muted); }
.t-lead { background: #fff1b8; color: #ad6800; } .t-me { background: var(--blue-bg); color: var(--blue); }
.t-floor { background: #f0f5ff; color: #2f54eb; } .t-wait { background: #fff2e0; color: #d46b08; }
.t-sos { background: var(--red); color: #fff; } .t-seek { background: #fff0f6; color: #c41d7f; } .t-off { background: #eef0f3; color: #8c8c8c; }
.ma { display: flex; flex-direction: column; align-items: stretch; gap: var(--s1); min-width: 64px; }
.go { min-height: 44px; padding: 0 var(--s3); border: 0; border-radius: 22px; background: var(--blue); color: #fff; font-size: 15px; font-weight: 600; white-space: nowrap; }
.go.on { background: var(--card); color: var(--red); border: 1px solid var(--red); }
.go.ghost { background: var(--fill); color: var(--muted); font-weight: 500; }
.go:disabled { opacity: .4; }

/* 收藏 */
.fav-actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); padding: var(--s3) var(--s4); }
.fav-actions .btn { font-size: 14px; }
#favList .sec { padding: var(--s2) var(--s4) 0; font-size: 12px; color: var(--muted); font-weight: 600; }
#favList .empty { padding: var(--s4); color: var(--muted); font-size: 14px; text-align: center; line-height: 1.6; }
#favList li.fav { grid-template-columns: 1fr auto; row-gap: var(--s1); }
.fm { grid-column: 1 / -1; display: flex; gap: var(--s4); }
.fm button { position: relative; border: 0; background: none; color: var(--blue); font-size: 13px; padding: 4px 0; }
.fm button::after { content: ""; position: absolute; inset: -10px -6px; }
.star { position: absolute; transform: translate(-50%, -50%); color: var(--orange); font-size: 22px; line-height: 1; text-shadow: 0 0 3px #fff, 0 0 3px #fff; }

/* 聊天 */
.chat-list { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: var(--s3) var(--s4); display: flex; flex-direction: column; gap: var(--s2); }
.msg { max-width: 82%; align-self: flex-start; }
.msg.mine { align-self: flex-end; }
.msg.sys { align-self: center; max-width: 92%; font-size: 12px; color: var(--muted); background: var(--fill); padding: 2px 10px; border-radius: 10px; text-align: center; }
.mh { font-size: 12px; display: flex; gap: var(--s2); margin-bottom: 2px; }
.mh time { color: #9ca3af; }
.msg.mine .mh { justify-content: flex-end; }
.bubble { background: var(--fill); padding: var(--s2) var(--s3); border-radius: 4px 14px 14px 14px; font-size: 15px; line-height: 1.4; word-break: break-all; white-space: pre-wrap; }
.msg.mine .bubble { background: var(--blue); color: #fff; border-radius: 14px 4px 14px 14px; }
.bubble img { display: block; max-width: 100%; max-height: 220px; border-radius: 8px; }
.bubble.card { white-space: normal; min-width: 200px; }
.msg.mine .bubble.card { background: var(--blue); }
.rc-t { font-weight: 600; } .rc-s { font-size: 12px; opacity: .8; margin: 2px 0 var(--s2); }
.rc-b { display: flex; gap: var(--s2); }
.rc-b button { flex: 1; min-height: 36px; border: 1px solid rgba(127, 127, 127, .35); border-radius: 8px; background: rgba(255, 255, 255, .85); color: var(--text); font-size: 13px; }
.quick { flex: none; display: flex; gap: var(--s2); overflow-x: auto; padding: var(--s1) var(--s4) var(--s2); scrollbar-width: none; }
.quick button { flex: none; min-height: 36px; padding: 0 var(--s3); border: 1px solid var(--line); border-radius: 18px; background: var(--card); font-size: 14px; color: var(--text); }
.chat-form { flex: none; display: flex; gap: var(--s2); padding: 0 var(--s3) var(--s2); align-items: center; }
.chat-form .btn { min-height: 44px; padding: 0 var(--s4); }
.icon-btn { width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; background: var(--fill); color: var(--muted); display: flex; align-items: center; justify-content: center; padding: 0; }

/* 图钉 */
.pin { position: absolute; transform: translate(-50%, -50%); width: 0; height: 0; --c: var(--blue); }
.pin .dot { position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; border-radius: 50%; background: var(--c); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); }
.pin .label { position: absolute; left: 0; top: 12px; transform: translateX(-50%); white-space: nowrap; background: var(--c); color: #fff; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 10px; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.pin .cone { display: none; position: absolute; left: -22px; top: -22px; width: 44px; height: 44px; pointer-events: none; transform-origin: 50% 50%; }
.pin .cone::before { content: ""; position: absolute; left: 10px; top: -10px; border-left: 12px solid transparent; border-right: 12px solid transparent; border-bottom: 22px solid var(--c); opacity: .45; }
.pin.me .dot { width: 20px; height: 20px; left: -10px; top: -10px; box-shadow: 0 0 0 4px rgba(22, 119, 255, .25), 0 1px 4px rgba(0, 0, 0, .35); }
.pin.stale { opacity: .6; } .pin.off { opacity: .45; filter: grayscale(1); }
.pin.sos .dot { background: var(--red); animation: ring 1.2s infinite; } .pin.sos .label { background: var(--red); }
.pin.wait .dot { box-shadow: 0 0 0 4px rgba(250, 140, 22, .35), 0 1px 4px rgba(0, 0, 0, .35); }
.pin.meet .dot { background: var(--orange); border-radius: 3px; transform: rotate(45deg); }
.pin.meet .label { background: var(--orange); }

/* 弹层 */
.dlg { position: fixed; inset: 0; z-index: 2000; background: rgba(0, 0, 0, .4); display: flex; align-items: flex-end; justify-content: center; }
.dlg-box { width: 100%; max-width: 520px; max-height: 88dvh; overflow-y: auto; background: var(--card); border-radius: 20px 20px 0 0; padding: var(--s3) var(--s4) calc(var(--s4) + var(--safe-b)); animation: up .22s ease; }
.dlg-head { display: flex; justify-content: space-between; align-items: center; }
.code-big { text-align: center; font-size: 44px; font-weight: 800; letter-spacing: 6px; color: var(--blue); margin: var(--s2) 0; font-variant-numeric: tabular-nums; }
.qr { width: 200px; margin: 0 auto var(--s2); padding: var(--s2); border: 1px solid var(--line); border-radius: var(--r); }
.qr svg { width: 100%; height: auto; display: block; }
.dlg .row { margin-top: var(--s3); }
.field { display: flex; flex-direction: column; gap: var(--s1); margin: var(--s2) 0; }
.sw { display: flex; align-items: center; justify-content: space-between; min-height: 48px; font-size: 16px; color: var(--text); position: relative; border-bottom: 1px solid var(--hair); }
.sw input { position: absolute; opacity: 0; width: 100%; height: 100%; left: 0; top: 0; margin: 0; }
.sw i { width: 46px; height: 28px; border-radius: 14px; background: #d1d5db; position: relative; transition: background .2s; flex: none; }
.sw i::after { content: ""; position: absolute; left: 2px; top: 2px; width: 24px; height: 24px; border-radius: 50%; background: var(--card); box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .2s; }
.sw input:checked + i { background: var(--blue); }
.sw input:checked + i::after { transform: translateX(18px); }
#leaveBtn { margin-top: var(--s4); }
.imgview { position: fixed; inset: 0; z-index: 2500; background: rgba(0, 0, 0, .92); display: flex; align-items: center; justify-content: center; }
.imgview img { max-width: 100%; max-height: 100%; }
.modal { position: fixed; inset: 0; z-index: 3000; background: rgba(0, 0, 0, .45); display: flex; align-items: center; justify-content: center; padding: var(--s5); }
.modal-box { background: var(--card); border-radius: 16px; padding: var(--s5) var(--s4) var(--s4); width: 100%; max-width: 340px; text-align: center; font-size: 17px; line-height: 1.5; animation: pop .18s ease; max-height: 86dvh; overflow-y: auto; }
.modal-box.danger { background: var(--red); color: #fff; }
.modal-box.danger .sub { color: #ffd6d6; } .modal-box.danger .btn { border-color: transparent; }
.modal-box.danger .btn.primary { background: var(--card); color: var(--red); }
/* SOS 发出前的确认：危险操作用红色主按钮 */
.modal-box.danger-confirm b { color: var(--red); }
.modal-box.danger-confirm .btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.big-icon { font-size: 40px; font-weight: 900; letter-spacing: 2px; margin-bottom: var(--s2); }
.modal-actions { display: flex; flex-direction: column; gap: var(--s2); margin-top: var(--s4); }
.modal-box .btn { width: 100%; }
.toast { position: fixed; left: 50%; bottom: calc(var(--s5) + 130px); transform: translateX(-50%); z-index: 4000; max-width: 86%; background: rgba(31, 35, 41, .92); color: #fff; padding: 10px var(--s4); border-radius: 12px; font-size: 14px; text-align: center; pointer-events: none; }
.confetti { position: fixed; inset: 0; z-index: 3500; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -40px; font-style: normal; font-size: 28px; animation: fall 2.2s ease-in forwards; }

@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pop { from { transform: scale(.92); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(245, 34, 45, .6); } 100% { box-shadow: 0 0 0 16px rgba(245, 34, 45, 0); } }
@keyframes fall { to { transform: translateY(105vh) rotate(360deg); opacity: .8; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ===== v2.2：导览图 / 标记 / 点名 / AR / 限时共享 ===== */
.reassure { margin: 0; color: #4b5563; }
.fab.txt { font-size: 12px; font-weight: 700; letter-spacing: .5px; color: var(--blue); }
.fab.new { animation: pulse 1.2s infinite; }
.fl { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s2); }
.share-left { font-size: 12px; color: var(--blue); }
.ov-row { display: flex; align-items: center; gap: var(--s2); margin: var(--s2) 0; }
.ov-info { flex: 1; min-width: 0; font-size: 13px; color: var(--muted); line-height: 1.4; }
.ov-row .btn.small { flex: none; min-height: 44px; }
.tag.t-timer { background: #e6fffb; color: #08979c; }
.tag.t-ok { background: #f6ffed; color: #389e0d; }

/* 导览图视图 */
.guide { position: absolute; inset: 0; z-index: 1; background: #e8ecf1; display: none; }
#main.guide-on .guide { display: block; }
.g-vp { position: absolute; inset: 0; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
.g-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; background: var(--card); box-shadow: 0 2px 16px rgba(0, 0, 0, .18); }
.g-stage img { display: block; width: 100%; height: 100%; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.g-marks { position: absolute; inset: 0; pointer-events: none; }
.gm { position: absolute; left: 0; top: 0; pointer-events: auto; will-change: transform; }
.gm.far { opacity: .5; }
.g-line { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; filter: drop-shadow(0 0 2px #fff); }
.g-line line { stroke: var(--blue); stroke-width: 4; stroke-dasharray: 2 9; stroke-linecap: round; }
.g-cap { position: absolute; left: var(--s3); bottom: calc(var(--sheet-h) + var(--s3)); max-width: 55%; padding: 3px 10px; border-radius: 12px; background: rgba(31, 35, 41, .6); color: #fff; font-size: 12px; pointer-events: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: bottom .25s; }

/* 共享标记点 */
.pin.sp .sp-b { position: absolute; left: -15px; top: -15px; width: 30px; height: 30px; border-radius: 50%; background: var(--c); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .4); color: #fff; font-weight: 800; font-size: 14px; line-height: 24px; text-align: center; letter-spacing: -.5px; }
.pin.sp .sp-b.sm { font-size: 10px; letter-spacing: -1px; }
.pin.sp .label { top: 18px; background: var(--c); max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.sp-g { display: inline-block; min-width: 24px; height: 24px; line-height: 24px; padding: 0 4px; margin-right: 6px; border-radius: 12px; background: var(--c); color: #fff; font-style: normal; font-size: 12px; font-weight: 800; text-align: center; vertical-align: 1px; }
.mark-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s3); margin: var(--s3) 0 var(--s2); }
.mk { min-height: 88px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 14px; color: var(--text); padding: var(--s2); }
.mk:active { background: var(--fill2); }
.mk .sp-g { margin: 0; min-width: 36px; height: 36px; line-height: 36px; border-radius: 18px; font-size: 16px; }
.mk small { font-size: 11px; color: var(--muted); }
#markBody .field { margin-top: var(--s3); }
#markBody .row { margin-top: var(--s3); }

/* 点名 */
.roll-head { position: sticky; top: 0; z-index: 2; background: var(--card); border-bottom: 1px solid var(--hair); padding: var(--s2) var(--s4); }
.roll-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); font-size: 15px; }
.roll-prog { height: 6px; border-radius: 3px; background: #eef0f3; margin: var(--s2) 0; overflow: hidden; }
.roll-prog i { display: block; height: 100%; background: var(--green); transition: width .3s; }
.roll-miss { display: flex; flex-direction: column; }
.roll-miss li { display: flex; align-items: center; gap: var(--s2); min-height: 48px; font-size: 14px; }
.roll-miss li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roll-miss li em { font-style: normal; color: var(--muted); font-size: 12px; margin-left: 6px; }
.roll-miss .btn { min-height: 44px; padding: 0 var(--s3); font-size: 14px; }
.roll-done { font-size: 14px; color: #389e0d; margin: 0 0 var(--s1); }
.roll-banner { display: flex; align-items: center; gap: var(--s2); background: #fff1f0; color: #a8071a; border: 1px solid #ffccc7; border-radius: var(--r); padding: var(--s2) var(--s3); font-size: 14px; font-weight: 600; box-shadow: var(--shadow); }
.roll-banner span { flex: 1; min-width: 0; }
.roll-banner .btn.small { flex: none; min-height: 44px; background: var(--red); border-color: var(--red); }
.modal-box.roll .btn.primary { min-height: 64px; font-size: 24px; background: var(--red); border-color: var(--red); }
.modal-box.roll .big-icon { color: var(--red); font-size: 30px; }

/* 导览图上传向导 */
.wiz { position: fixed; inset: 0; z-index: 2200; background: var(--bg); display: flex; flex-direction: column; padding-top: var(--safe-t); }
.wz-head { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 var(--s2); background: var(--card); }
.wz-head b { font-size: 16px; }
.wz-head .link { min-width: 64px; }
.wz-steps { display: flex; gap: var(--s1); padding: 0 var(--s4) var(--s2); background: var(--card); border-bottom: 1px solid var(--line); }
.wz-steps i { flex: 1; height: 4px; border-radius: 2px; background: #e5e7eb; }
.wz-steps i.on { background: var(--blue); }
.wz-pane { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.wz-scroll { overflow-y: auto; padding: var(--s4) var(--s4) calc(var(--s4) + var(--safe-b)); gap: var(--s3); }
.wz-hero { text-align: center; color: var(--blue); }
.wz-hero h3 { color: var(--text); margin: var(--s2) 0 var(--s1); }
.wz-hero p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.6; }
.wz-list { margin: 0; padding-left: 22px; font-size: 14px; line-height: 1.6; color: var(--muted); }
.wz-list li { margin-bottom: var(--s2); }
.wz-list b { color: var(--text); }
.wz-note { background: #fff7e6; color: #ad4e00; border-radius: 10px; padding: var(--s2) var(--s3); font-size: 13px; }
.wz-file { display: flex; align-items: center; justify-content: center; color: #fff; font-size: 16px; cursor: pointer; }
.wz-tip { flex: none; padding: var(--s2) var(--s4); background: var(--card); font-size: 14px; line-height: 1.5; color: var(--muted); border-bottom: 1px solid var(--line); }
.wz-tip b { color: var(--text); font-size: 15px; }
.wz-vp { position: relative; flex: 1; min-height: 0; inset: auto; background: #dfe4ea; }
.wz-mark { position: absolute; left: 0; top: 0; width: 0; height: 0; color: var(--red); }
.wz-mark svg { position: absolute; left: -16px; top: -16px; width: 32px; height: 32px; }
.wz-mark b { position: absolute; left: 12px; top: -26px; min-width: 18px; height: 18px; line-height: 18px; text-align: center; border-radius: 9px; background: currentColor; font-size: 11px; font-weight: 700; padding: 0 4px; }
.wz-mark b span { color: #fff; }
.wz-mark.other { color: var(--green); opacity: .85; }
.wz-zoom { position: absolute; right: var(--s3); top: var(--s3); display: flex; flex-direction: column; gap: var(--s2); }
.wz-zoom button { width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--card); box-shadow: var(--shadow); font-size: 22px; line-height: 1; color: var(--text); }
.wz-foot { flex: none; background: var(--card); padding: var(--s3) var(--s4) calc(var(--s3) + var(--safe-b)); box-shadow: 0 -4px 16px rgba(0, 0, 0, .08); }
.wz-q { font-size: 14px; font-weight: 600; margin-bottom: var(--s2); }
.wz-q.dim { color: var(--muted); font-weight: 400; }
.wz-foot .btn { font-size: 15px; padding: 0 var(--s2); }
.wz-thumb { display: block; max-width: 100%; max-height: 38dvh; margin: 0 auto; border-radius: var(--r); border: 1px solid var(--line); background: var(--card); }
.wz-sum { font-size: 13px; color: var(--muted); line-height: 1.7; background: var(--card); border-radius: 10px; padding: var(--s2) var(--s3); }
.wz-sum .warn { color: #d46b08; }

/* AR 实景找人 */
.ar { position: fixed; inset: 0; z-index: 2600; background: #0b1220; color: #fff; overflow: hidden; }
.ar video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ar-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(rgba(0, 0, 0, .55), transparent 22%, transparent 62%, rgba(0, 0, 0, .65)); }
.ar-top { position: absolute; left: 0; right: 0; top: 0; padding: calc(var(--safe-t) + var(--s2)) var(--s3) 0; display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.ar-who { font-size: 16px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); }
.ar-x { flex: none; min-height: 44px; padding: 0 var(--s4); border: 0; border-radius: 22px; background: rgba(255, 255, 255, .92); color: var(--text); font-size: 15px; font-weight: 600; }
.ar-note { position: absolute; left: var(--s3); right: var(--s3); top: calc(var(--safe-t) + 64px); padding: var(--s2) var(--s3); border-radius: 10px; background: rgba(250, 140, 22, .92); font-size: 13px; line-height: 1.5; }
.ar-mark { position: absolute; top: 36%; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; color: var(--blue); pointer-events: none; transition: left .08s linear; }
.ar-mark span { max-width: 60vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: rgba(0, 0, 0, .55); padding: 2px 10px; border-radius: 12px; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.ar-mark svg { filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .5)); }
.ar.lock .ar-mark { color: var(--green); }
.ar.lock .ar-mark svg { animation: pulse 1s infinite; }
.ar-hint { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); text-align: center; font-size: 38px; font-weight: 800; padding: 0 var(--s4); text-shadow: 0 2px 10px rgba(0, 0, 0, .75); pointer-events: none; }
.ar-hint small { display: block; font-size: 15px; font-weight: 500; margin-top: var(--s1); }
.ar-hint.sm { top: auto; bottom: calc(var(--safe-b) + 150px); transform: none; font-size: 20px; }
.ar.lock .ar-hint { color: #b7eb8f; }
.ar-bot { position: absolute; left: 0; right: 0; bottom: 0; padding: var(--s4) var(--s4) calc(var(--safe-b) + var(--s4)); text-align: center; }
.ar-dist { font-size: 56px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; text-shadow: 0 2px 10px rgba(0, 0, 0, .6); }
.ar-tip { font-size: 13px; opacity: .9; margin-top: var(--s1); min-height: 18px; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); }
.ar-err { position: absolute; inset: 0; background: rgba(11, 18, 32, .96); display: flex; align-items: center; justify-content: center; padding: var(--s5); }
.ar-err-box { width: 100%; max-width: 340px; text-align: center; }
.ar-err-box b { font-size: 20px; }
.ar-err-box p { font-size: 15px; line-height: 1.6; color: #d1d5db; margin: var(--s3) 0 var(--s4); }
.roll-miss { max-height: 30dvh; overflow-y: auto; }
.ar-note { white-space: pre-line; }

/* ===== v2.3：界面整理 / 对讲机 / 反馈 / 分享路线 ===== */
button { color: inherit; }
.btn, .go, .fab, .nb, .chip { transition: opacity .15s, background-color .15s, transform .12s; }
.btn.big { min-height: 52px; font-size: 17px; border-radius: 14px; }
h4 { margin: var(--s4) var(--s1) var(--s2); }

/* 入口 */
#entry { background: linear-gradient(170deg, #cfe2ff, #f7f9fc 55%); }
.entry-hero { text-align: center; padding: var(--s5) 0 var(--s2); }
.logo { width: 88px; height: 88px; border-radius: 24px; box-shadow: 0 10px 24px rgba(22, 119, 255, .35); }
.logo.gray { background: #9aa3af; box-shadow: none; color: #fff; }
.entry-hero h1 { margin-top: var(--s3); font-size: 32px; }
.entry-hero .sub { margin: var(--s1) 0 var(--s4); font-size: 14px; }
.vp { display: flex; gap: var(--s2); margin: 0; }
.vp li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: var(--s3) var(--s1); border-radius: var(--r); background: rgba(255, 255, 255, .72); color: var(--blue); font-size: 13px; font-weight: 600; }
.vp li span { color: var(--text); }
.divider span { background: transparent; }
.entry-box a { padding: 10px 0; }

/* 顶部 */
.team-chip { max-width: calc(100% - 52px); }
.rv-bar { display: flex; align-items: center; gap: var(--s2); align-self: flex-start; max-width: 100%; min-height: 44px; padding: 0 var(--s4) 0 var(--s1); background: var(--card); border-radius: 22px; box-shadow: var(--shadow); font-size: 14px; font-weight: 600; }
.chip-btn { min-height: 44px; padding: 0 var(--s3); border: 0; background: none; color: var(--blue); font-size: 15px; }
.voice-bar { display: flex; align-items: center; gap: var(--s2); min-height: 44px; padding: 4px var(--s2) 4px var(--s3); border-radius: var(--r); background: #1f2329; color: #fff; box-shadow: var(--shadow); font-size: 14px; }
.vb-who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vb-bars { display: inline-flex; align-items: center; height: 16px; gap: 2px; }
.vb-bars i { width: 3px; height: 14px; border-radius: 2px; background: #52c41a; animation: eq .8s ease-in-out infinite; }
.vb-bars i:nth-child(2) { animation-delay: .15s; } .vb-bars i:nth-child(3) { animation-delay: .3s; } .vb-bars i:nth-child(4) { animation-delay: .45s; }
.voice-bar .btn.small { flex: none; min-height: 36px; background: rgba(255, 255, 255, .14); border-color: transparent; color: #fff; }
.voice-bar.blocked { align-self: center; min-height: 36px; padding: 4px var(--s3); border-radius: 18px; background: var(--blue); font-size: 13px; cursor: pointer; }
.voice-bar.blocked .vb-who { flex: none; }
.voice-bar.blocked .vb-bars { display: none; }
@keyframes eq { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
.fb-card { position: relative; display: flex; flex-direction: column; gap: var(--s1); padding: var(--s3) 44px var(--s3) var(--s3); border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); font-size: 13px; color: var(--muted); }
.fb-card b { color: var(--text); font-size: 15px; }
.fb-card .row { margin-top: var(--s2); }
.fb-card .btn.small { flex: none; min-height: 36px; }
.fb-x { position: absolute; top: 0; right: 0; width: 44px; height: 44px; border: 0; background: none; font-size: 22px; color: var(--muted); }
.toast { top: calc(var(--safe-t) + 68px); bottom: auto; }
.g-cap { position: static; order: 5; align-self: flex-start; display: none; max-width: 70%; margin-top: -2px; padding: 2px 10px; background: rgba(31, 35, 41, .55); font-size: 11px; pointer-events: none; }
#main.guide-on .g-cap { display: block; }

/* FAB */
.fabs { align-items: flex-end; gap: var(--s2); }
.fab { width: 44px; height: 44px; }
.fab.sos { order: -1; width: 40px; height: 40px; font-size: 11px; margin-bottom: var(--s2); position: relative; box-shadow: 0 2px 8px rgba(245, 34, 45, .4); }
.fab.sos::after { content: ""; position: absolute; inset: -2px; }
.fab.txt { font-size: 12px; }
.lfabs { position: absolute; left: var(--s3); bottom: calc(var(--sheet-h) + var(--s3)); z-index: 1001; display: flex; align-items: center; gap: var(--s2); transition: bottom .25s, opacity .2s; }
#main.s-max .lfabs { opacity: 0; pointer-events: none; }
#main.pick .lfabs { display: none; }
.fab.talk { width: 56px; height: 56px; background: var(--blue); color: #fff; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.fab.talk:active, .fab.talk.on { background: var(--blue-d); transform: scale(1.08); }
.wait-chip { display: flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 var(--s3); border: 0; border-radius: 22px; background: var(--card); color: var(--text); box-shadow: var(--shadow); font-size: 14px; white-space: nowrap; }
.wait-chip.on { background: var(--orange); color: #fff; font-weight: 600; }

/* 导航卡片 */
.nav-card { position: relative; padding: var(--s3); border-radius: 16px; }
.nav-x { position: absolute; top: 0; right: 0; min-width: 52px; min-height: 44px; border: 0; background: none; color: var(--blue); font-size: 14px; z-index: 1; }
.nav-main { gap: var(--s3); padding-right: 40px; }
.compass { width: 64px; height: 64px; }
.compass svg { width: 44px; height: 44px; }
.nav-who { font-size: 12px; color: var(--muted); }
.nav-who b { color: var(--text); }
.instr { font-size: 16px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: normal; overflow-wrap: anywhere; }
.nav-nums { margin-top: 2px; }
.dist { font-size: 20px; }
.meta { margin-top: var(--s2); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-actions { gap: 6px; margin-top: var(--s2); }
.nb { flex: 1; min-width: 0; min-height: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 2px; border: 1px solid var(--bd); border-radius: var(--r-sm); background: var(--card); color: var(--text); font-size: 11px; }
.nb:active { opacity: .7; }
.nb svg { flex: none; }
.nb.primary { flex: 1.9; flex-direction: row; gap: 6px; background: var(--blue); border-color: var(--blue); color: #fff; font-size: 15px; font-weight: 600; }
.nav-card.near .btn.primary { animation: none; }
.nav-card.near .nb.primary { animation: pulse 1.2s infinite; }
.nav-card.radar { padding: var(--s3) var(--s4); }
.nav-card.radar .nav-main { flex-direction: row; text-align: left; gap: var(--s4); padding-right: 0; }
.nav-card.radar .compass { width: 108px; height: 108px; }
.nav-card.radar .compass svg { width: 76px; height: 76px; }
.nav-card.radar .nav-who, .nav-card.radar .nav-who b, .nav-card.radar .nav-x { color: rgba(255, 255, 255, .92); }
.nav-card.radar .nav-nums { justify-content: flex-start; }
.nav-card.radar .dist { font-size: 46px; }
.nav-card.radar .instr { font-size: 15px; }
.nav-card.radar .nb { background: rgba(255, 255, 255, .95); border-color: transparent; color: #1f2329; }
.nav-card.radar .nb.primary { background: #fff; color: #1f2329; }
.nav-card.radar.near .nb.primary { color: var(--red); }

/* 面板 / 成员 */
.tab-act { margin-left: auto; min-height: 44px; padding: 0 var(--s3); border: 0; background: none; color: var(--blue); font-size: 14px; }
#memberList li { grid-template-columns: 44px 1fr auto; }
.ma { flex-direction: row; align-items: center; gap: 2px; min-width: 0; }
.more { width: 40px; height: 44px; border: 0; background: none; color: var(--muted); display: flex; align-items: center; justify-content: center; padding: 0; }
.go.quiet { background: none; color: var(--muted); font-weight: 500; font-size: 14px; padding: 0 var(--s2); }
.roll-head { background: var(--card); }

/* 聊天 */
.msg.sys { background: none; color: var(--muted); font-size: 11px; line-height: 1.5; padding: 0 var(--s2); opacity: .85; }
.msg.sys + .msg.sys { margin-top: -6px; }
.bubble.voice { display: flex; align-items: center; gap: var(--s2); min-height: 40px; padding: var(--s2) var(--s3); cursor: pointer; white-space: nowrap; position: relative; user-select: none; -webkit-user-select: none; }
.v-ic { flex: none; display: flex; }
.v-wave { flex: 1; display: flex; align-items: center; gap: 3px; height: 18px; }
.v-wave i { width: 3px; height: 8px; border-radius: 2px; background: currentColor; opacity: .55; }
.v-wave i:nth-child(2n) { height: 14px; } .v-wave i:nth-child(3n) { height: 18px; }
.bubble.voice.playing .v-wave i { animation: eq .8s ease-in-out infinite; opacity: 1; }
.bubble.voice.playing .v-wave i:nth-child(2n) { animation-delay: .2s; }
.v-dur { flex: none; font-size: 13px; font-variant-numeric: tabular-nums; }
.v-dot { position: absolute; right: -14px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--red); }
.msg.mine .v-dot { display: none; }
.hold-bar { flex: 1; min-height: 44px; border: 0; border-radius: var(--r-sm); background: var(--fill); color: var(--text); font-size: 16px; font-weight: 600; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.hold-bar.on { background: var(--blue); color: #fff; }
.icon-btn { background: var(--fill); }

/* 对讲录音 */
.talk-ov { position: fixed; inset: 0; z-index: 3100; background: rgba(0, 0, 0, .45); display: flex; align-items: center; justify-content: center; pointer-events: none; }
.talk-box { width: min(280px, 80%); border-radius: 20px; box-shadow: 0 12px 40px rgba(0, 0, 0, .35); padding: var(--s5) var(--s4); background: rgba(31, 35, 41, .94); color: #fff; text-align: center; transition: background .15s; }
.talk-box.cancel { background: rgba(245, 34, 45, .95); }
.talk-mic { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%; background: rgba(255, 255, 255, .16); }
.talk-time { margin-top: var(--s2); font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.talk-time.warn { color: #ffd666; }
.talk-meter { display: flex; align-items: center; justify-content: center; gap: 4px; height: 40px; margin: var(--s2) 0; }
.talk-meter i { width: 5px; height: 6px; border-radius: 3px; background: #fff; opacity: .9; transition: height .06s; }
.talk-hint { font-size: 14px; opacity: .9; }

/* 设置 / 反馈 */
.set-box { background: var(--grouped); }
.set-card { background: var(--card); border-radius: var(--r); overflow: hidden; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); width: 100%; min-height: 48px; padding: 0 var(--s4); border: 0; border-bottom: 1px solid var(--hair); border-radius: 0; background: none; color: var(--text); font-size: 16px; text-align: left; text-decoration: none; position: relative; }
.set-card > :last-child { border-bottom: 0; }
.set-row > span { flex: none; }
.set-row small { display: block; font-size: 12px; line-height: 1.2; }
.set-row select, .set-row input:not([type=checkbox]) { flex: 1; min-width: 0; width: auto; max-width: 62%; min-height: 44px; padding: 0; border: 0; background: transparent; text-align: right; text-align-last: right; color: var(--muted); -webkit-appearance: none; appearance: none; border-radius: 0; }
.set-row em { font-style: normal; color: var(--muted); }
.set-row.ov-row { padding: var(--s2) var(--s4); }
.set-row .ov-info { flex: 1; }
.leave-btn { display: block; width: 100%; margin-top: var(--s5); min-height: 48px; border: 0; border-radius: var(--r); background: var(--card); color: var(--red); font-size: 16px; font-weight: 600; }
.stars { display: flex; gap: var(--s1); }
.stars button { width: 44px; height: 44px; border: 0; background: none; font-size: 32px; line-height: 1; color: #d1d5db; padding: 0; }
.stars button.on { color: var(--orange); }
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.chip { min-height: 40px; padding: 0 var(--s3); border: 1px solid var(--bd); border-radius: 20px; background: var(--card); color: var(--text); font-size: 14px; }
.chip.on { background: var(--blue-bg); border-color: var(--blue); color: var(--blue); font-weight: 600; }
textarea { font: inherit; font-size: 16px; width: 100%; padding: var(--s3); border: 1px solid var(--bd); border-radius: var(--r-sm); background: var(--card); color: var(--text); resize: none; outline: none; }
textarea:focus { border-color: var(--blue); }
.fb-done { text-align: center; padding: var(--s5) 0 var(--s2); }
.fb-done b { font-size: 20px; display: block; margin: var(--s2) 0; }
.big-ok { color: var(--green); }
.rs-name { text-align: center; font-weight: 600; margin: var(--s2) 0; }
.rs-link { margin: var(--s2) 0; padding: var(--s2) var(--s3); border-radius: var(--r-sm); background: var(--fill); font-size: 12px; color: var(--muted); word-break: break-all; text-align: center; }

/* 导览图标签 */
.gm .pin .label { top: 10px; padding: 1px 6px; font-size: 10px; }
.gm.nolabel .pin .label { display: none; }
.g-stage { background: #fff; }

/* 分享路线 */
.rv-card { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1002; padding: var(--s4) var(--s4) calc(var(--s3) + var(--safe-b)); border-radius: var(--r-lg) var(--r-lg) 0 0; background: var(--card); box-shadow: 0 -4px 24px rgba(0, 0, 0, .14); }
.rv-name { font-size: 20px; font-weight: 700; }
.rv-sub { margin: var(--s1) 0 var(--s3); font-size: 13px; color: var(--muted); }
.rv-acts { display: flex; gap: var(--s2); margin-top: var(--s2); }
.rv-link { display: block; margin-top: var(--s2); padding: var(--s2) 0; text-align: center; font-size: 14px; }
#main.solo { --sheet-h: 210px; }
#main.solo .sheet, #main.solo .top-row, #main.solo #sosBtn, #main.solo #meetFab, #main.solo #viewFab, #main.solo .lfabs { display: none !important; }
#main.solo.navigating { --sheet-h: 16px; }

@media (prefers-color-scheme: dark) {
  :root { --blue: #3b8bff; --blue-bg: #16294a; --text: #e8eaed; --muted: #9aa3af; --line: #2f353d; --bg: #121418; --card: #1c2026; --fill: #262b33; --fill2: #2d333c; --hair: #2a2f37; --bd: #3a414b; --grouped: #121418; --shadow: 0 2px 12px rgba(0, 0, 0, .55); }
  #entry { background: linear-gradient(170deg, #14233d, #121418 60%); }
  .vp li { background: rgba(255, 255, 255, .06); }
  .btn.danger { background: #3a1d1f; border-color: #6b2b2f; }
  .entry-msg, .banner, .wz-note { background: #3a2c14; color: #ffc069; }
  .handle i { background: #3a414b; }
  .roll-banner { background: #3a1d1f; border-color: #6b2b2f; color: #ff7875; }
  #memberList li.flash { background: #3a2c14; }
  .tag { background: #2d333c; color: var(--muted); }
  .t-lead { background: #4a3a10; color: #ffd666; } .t-me { background: #16294a; color: #69b1ff; } .t-floor { background: #1d2750; color: #85a5ff; }
  .t-wait { background: #4a2e10; color: #ffa940; } .t-seek { background: #4a1d34; color: #ff85c0; } .t-off { background: #2d333c; color: #8c8c8c; }
  .tag.t-timer { background: #0f3a3a; color: #5cdbd3; } .tag.t-ok { background: #1d3a12; color: #95de64; }
  .rc-b button { background: var(--fill2); color: var(--text); }
  .msg.mine .rc-b button { background: rgba(255, 255, 255, .92); color: #1f2329; }
  .stars button { color: #4b5360; } .stars button.on { color: var(--orange); }
  .go.on { background: transparent; }
  .logo.gray { background: #3a414b; }
  .qr { background: #fff; }
}

/* ===== v2.4：账号 / 离线 / 地下室 ===== */
.entry-hi { display: flex; align-items: center; justify-content: space-between; font-size: 15px; margin-bottom: calc(var(--s1) * -1); }
.entry-hi .link { min-height: 36px; font-size: 14px; color: var(--muted); }
.keep-row { display: flex; align-items: flex-start; gap: var(--s2); font-size: 14px; color: var(--text); padding: 2px 2px 0; }
.keep-row input { width: 20px; height: 20px; min-height: 0; padding: 0; margin: 2px 0 0; flex: none; accent-color: var(--blue); }
.keep-row small { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }
.acct-link { align-self: center; border: 0; background: none; color: var(--muted); font-size: 13px; min-height: 36px; padding: 0 var(--s3); text-decoration: underline; text-underline-offset: 3px; }
.my-teams { background: rgba(255, 255, 255, .72); border-radius: var(--r); padding: 2px var(--s3) var(--s2); }
.my-teams h4 { margin: var(--s2) 0 var(--s1); }
.my-teams ul { max-height: 190px; overflow-y: auto; }
.my-teams li { display: flex; align-items: center; gap: var(--s2); min-height: 52px; border-top: 1px solid var(--hair); cursor: pointer; }
.my-teams li:first-child { border-top: 0; }
.mt-i { flex: 1; min-width: 0; }
.mt-n { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.mt-n > :first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-s { font-size: 12px; color: var(--muted); }
.my-teams .btn.small { flex: none; min-height: 36px; padding: 0 var(--s3); }
.tag.t-keep { background: #fff7e6; color: #d46b08; }
.tag.t-under { background: #f0f0f0; color: #434343; }

#acctDlg .dlg-box { padding-bottom: calc(var(--s5) + var(--safe-b)); }
.a-tabs { display: flex; background: var(--fill2); border-radius: 10px; padding: 3px; margin: var(--s3) 0; }
.a-tabs button { flex: 1; min-height: 38px; border: 0; background: none; border-radius: 8px; font-size: 15px; color: var(--muted); }
.a-tabs button.on { background: var(--card); color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.a-card { background: var(--card); border-radius: var(--r); padding: var(--s2) var(--s4) var(--s3); margin: var(--s3) 0; }
.a-card .field { margin: var(--s2) 0 0; }
.a-card .btn { margin-top: var(--s3); }
.a-hint { font-size: 12px; min-height: 0; color: var(--muted); }
.a-hint.bad { color: var(--red); } .a-hint.ok { color: #389e0d; }
.a-err { color: var(--red); font-size: 13px; margin-top: var(--s2); text-align: center; }
.a-err:empty { display: none; }
.a-links { text-align: center; margin: var(--s2) 0; }
.a-p { font-size: 14px; color: var(--muted); margin: var(--s2) 0 0; line-height: 1.5; }
.a-me { display: flex; align-items: center; gap: var(--s3); margin: var(--s3) 0 0; }
.a-me b { font-size: 18px; }
.a-me .sub { margin: 0; }
#acctBody > .set-card { margin: var(--s3) 0; }
#acctBody .btn.block { margin-top: var(--s2); }
.a-del { margin-top: var(--s5) !important; }
.a-warn { background: #fff7e6; color: #ad4e00; border: 1px solid #ffd591; border-radius: var(--r); padding: var(--s3) var(--s4); margin: var(--s3) 0; }
.a-warn b { font-size: 16px; }
.a-warn p { margin: var(--s1) 0 0; font-size: 13px; line-height: 1.5; }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); margin: var(--s3) 0; }
.codes code { display: block; text-align: center; padding: 10px 4px; border-radius: 10px; background: var(--card); border: 1px dashed var(--bd); font: 600 16px/1.2 ui-monospace, Menlo, Consolas, monospace; letter-spacing: 1px; user-select: all; -webkit-user-select: all; }
.a-chk { display: flex; align-items: center; gap: var(--s2); font-size: 14px; color: var(--text); margin: var(--s3) 0; }
.a-chk input { width: 22px; height: 22px; min-height: 0; padding: 0; flex: none; accent-color: var(--blue); }
.a-danger { background: #fff1f0; border: 1px solid #ffa39e; color: #a8071a; border-radius: var(--r); padding: var(--s3) var(--s4); margin: var(--s3) 0; font-size: 14px; line-height: 1.55; }
.a-danger b { font-size: 16px; }
.a-danger p { margin: var(--s1) 0; }
.a-danger ul { list-style: disc; padding-left: 20px; margin: var(--s1) 0; }
.btn.danger.a-delgo:not(:disabled) { background: var(--red); border-color: var(--red); color: #fff; font-weight: 700; }
.fav-sync { padding: 0 var(--s4) var(--s1); font-size: 11px; color: var(--muted); }
.fav-sync.ok { color: #389e0d; } .fav-sync.bad { color: var(--red); }

/* 离线 chip / 提示卡 */
.off-chip { align-self: flex-start; padding: 5px 12px; border-radius: 16px; background: #1f2329; color: #fff; font-size: 12px; font-weight: 600; box-shadow: var(--shadow); }
.msg.pending { opacity: .65; }
.sug-card { padding-right: var(--s3); }
.sug-card b { font-size: 15px; }
.under-bar .mdot.under { background: #595959; border-radius: 50%; transform: none; }
.mk.wide { grid-column: 1 / -1; flex-direction: row; min-height: 60px; gap: var(--s3); justify-content: flex-start; padding: 0 var(--s4); }
.mk.wide small { margin-left: auto; }

/* 地下室屏幕 */
#under { position: absolute; inset: 0; z-index: 2; background: var(--bg); overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 64px var(--s3) calc(var(--sheet-h) + 84px); }
#main.under-map #under { display: none; }
#main.under-on:not(.under-map) #fitBtn, #main.under-on:not(.under-map) #locBtn, #main.under-on:not(.under-map) #viewFab { display: none; }
/* 地下室页面：只留 SOS 和对讲，其余悬浮按钮隐藏，底部多留空间让内容能滚到按钮上方 */
#main.under-on:not(.under-map) #meetFab, #main.under-on:not(.under-map) #waitBtn { display: none; }
#main.under-on:not(.under-map) #under { padding-bottom: calc(var(--sheet-h) + 120px); }
.u-wrap { max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; gap: var(--s3); }
.u-card { background: var(--card); border-radius: var(--r-lg); box-shadow: 0 1px 4px rgba(0, 0, 0, .08); padding: var(--s4); }
.u-head { display: flex; align-items: center; gap: var(--s3); }
.u-badge { width: 52px; height: 52px; border-radius: 16px; background: #262626; color: #fff; font-size: 22px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex: none; }
.u-ht { min-width: 0; }
.u-ht b { font-size: 20px; display: block; }
.u-ht small { display: block; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-floors { display: flex; gap: var(--s2); margin: var(--s3) 0; }
.u-floors .chip { flex: 1; padding: 0; min-height: 44px; font-size: 16px; }
.u-inputs { display: grid; grid-template-columns: 2fr 3fr; gap: var(--s2); }
.u-acts { margin-top: var(--s3); }
.u-photo { margin-top: var(--s3); position: relative; }
.u-photo img { display: block; width: 100%; max-height: 180px; object-fit: cover; border-radius: var(--r); }
.u-photo-acts { display: flex; justify-content: flex-end; gap: var(--s2); }
.u-park { background: var(--blue-bg); border-radius: var(--r); padding: var(--s3) var(--s4); }
.u-park-t { display: flex; flex-direction: column; font-size: 13px; color: var(--muted); margin-bottom: var(--s2); }
.u-park-t b { color: var(--text); font-size: 15px; }
.u-park .row { margin: 0; } .u-park .btn.small { min-height: 40px; }
.u-seg { display: flex; background: var(--fill2); border-radius: 12px; padding: 3px; }
.u-seg button { flex: 1; min-height: 42px; border: 0; background: none; border-radius: 10px; font-size: 15px; color: var(--muted); }
.u-seg button.on { background: var(--card); color: var(--text); font-weight: 700; box-shadow: 0 1px 3px rgba(0, 0, 0, .14); }
.u-back { text-align: center; padding: var(--s2) 0 var(--s3); }
.u-arrow { width: 124px; height: 124px; margin: 0 auto; border-radius: 50%; background: var(--blue-bg); display: flex; align-items: center; justify-content: center; }
.u-arrow svg { width: 88px; height: 88px; fill: var(--blue); transition: transform .15s linear; }
.u-bmain { font-size: 21px; font-weight: 800; margin-top: var(--s2); }
.u-bsub { font-size: 14px; color: var(--muted); margin-top: var(--s1); min-height: 20px; }
.u-back.off .u-bsub { color: #d46b08; font-weight: 600; }
.u-back.arrived .u-arrow { background: #f6ffed; animation: pulse 1s infinite; }
.u-back.arrived .u-arrow svg { fill: var(--green); }
.u-back.arrived .u-bmain { color: #389e0d; }
.u-canvas { display: block; width: 100%; height: 220px; border-radius: var(--r); background: var(--fill); }
.u-stats { display: flex; margin-top: var(--s3); }
.u-stats > div { flex: 1; text-align: center; }
.u-stats b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; }
.u-stats small { font-size: 12px; color: var(--muted); }
.u-tip { margin: var(--s3) 0 0; font-size: 12px; color: var(--muted); text-align: center; }
.u-warn { display: flex; align-items: center; gap: var(--s2); background: #fff7e6; color: #ad4e00; border-radius: var(--r); padding: var(--s3) var(--s4); font-size: 13px; line-height: 1.5; }
.u-warn .btn.small { flex: none; min-height: 36px; }
.u-foot { margin: 0; }

/* 地下成员图钉：入口处虚线圈，不是精确点 */
.pin.under .u-ring { position: absolute; left: -19px; top: -19px; width: 38px; height: 38px; border-radius: 50%; border: 2.5px dashed var(--c); background: rgba(255, 255, 255, .88); display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); }
.pin.under .u-ring b { font-size: 13px; font-weight: 800; color: var(--c); letter-spacing: -.3px; }
.pin.under .label { top: 24px; background: #434343; }

@media (prefers-color-scheme: dark) {
  .my-teams { background: rgba(255, 255, 255, .06); }
  .tag.t-keep { background: #4a3a10; color: #ffd666; } .tag.t-under { background: #2d333c; color: #bfbfbf; }
  .a-warn, .u-warn { background: #3a2c14; color: #ffc069; border-color: #5c4318; }
  .a-danger { background: #3a1d1f; border-color: #6b2b2f; color: #ff7875; }
  .u-park { background: #16294a; }
  .u-badge { background: #3a414b; }
  .u-back.arrived .u-arrow { background: #1d3a12; }
  .pin.under .u-ring { background: rgba(28, 32, 38, .9); }
}

.u-check { display: none; fill: none; stroke: var(--green); stroke-width: 11; stroke-linecap: round; stroke-linejoin: round; }
.u-back.arrived .u-check { display: block; }
.u-back.arrived .u-ar { display: none; }

/* ===== v2.5：锁屏通知 / 带团 / 附近设施 / 走失卡 / 引导 / 省电 ===== */
/* 集合点条：倒计时 + 已到名单 */
#meetBar { flex-wrap: wrap; row-gap: 0; }
.meet-sub { flex: 1 0 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--s2); margin-top: 2px; padding-left: 18px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
#meetClock { flex: 1; min-width: 0; font-weight: 600; color: var(--orange); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#meetClock.late { color: var(--red); }
.meet-arr { flex: none; min-height: 32px; padding: 0 var(--s3); border: 0; border-radius: 16px; background: var(--fill); color: var(--text); font-size: 13px; font-weight: 600; }
.meet-arr:active { background: var(--fill2); }
.mw-sec { margin: var(--s3) 0 var(--s1); text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); }
.mw-list { list-style: none; margin: 0; padding: 0; text-align: left; max-height: 34dvh; overflow-y: auto; }
.mw-list li { display: flex; align-items: center; gap: var(--s2); min-height: 48px; border-bottom: 1px solid var(--hair); font-size: 15px; }
.mw-list li:last-child { border-bottom: 0; }
.mw-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mw-n em { display: block; font-style: normal; font-size: 12px; color: var(--muted); }
.mw-ok { font-style: normal; color: var(--green); font-weight: 700; }
.mw-list .btn { min-height: 40px; padding: 0 var(--s4); font-size: 14px; width: auto; }
/* 选集合时间 */
.pick-when { display: flex; flex-direction: column; gap: 6px; }
.pick-when > span { font-size: 13px; color: var(--muted); }
.pick-when .chips { flex-wrap: nowrap; gap: 6px; }
.pick-when .chip { flex: 1 1 auto; min-height: 36px; padding: 0 6px; font-size: 13px; white-space: nowrap; }
.pick-time { display: flex; align-items: center; gap: var(--s3); }
.pick-time input { width: 140px; min-height: 40px; }
.pick-hint { font-size: 13px; color: var(--blue); font-weight: 600; }
.nav-more { position: absolute; top: 0; right: 52px; min-width: 44px; min-height: 44px; border: 0; background: none; color: var(--muted); font-size: 22px; line-height: 1; z-index: 1; }
.nav-card.radar .nav-more { color: rgba(255, 255, 255, .92); }
.sos-alt { margin-top: var(--s1); }
.sos-alt .link { color: inherit; opacity: .9; font-size: 13px; text-decoration: underline; min-height: 36px; }
/* 设置 */
.set-note { display: block; min-height: 0; padding: var(--s3) var(--s4); font-size: 13px; line-height: 1.6; color: var(--muted); }
.set-note b { color: var(--text); }
.set-row small.bad { color: var(--red); }
.set-row.sw > span, .set-row.set-btn > span { flex: 1; min-width: 0; padding-right: var(--s3); }
.set-row small { margin-top: 2px; color: var(--muted); font-weight: 400; }
.set-row[for=powerSel] > span { flex: 1; }
.set-row[for=powerSel] select { flex: none; max-width: 40%; }
/* 附近设施 */
.mk-h { margin: var(--s4) 0 var(--s2); font-size: 13px; font-weight: 600; color: var(--muted); }
.poi-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); }
.poi-chips .chip { min-height: 40px; padding: 0; }
.poi-list { list-style: none; margin: var(--s2) 0 0; padding: 0; max-height: 46dvh; overflow-y: auto; border-radius: var(--r); border: 1px solid var(--line); }
.poi-list li { display: flex; align-items: center; gap: var(--s3); min-height: 56px; padding: var(--s2) var(--s3); border-bottom: 1px solid var(--hair); cursor: pointer; }
.poi-list li:last-child { border-bottom: 0; }
.poi-list li:active { background: var(--fill2); }
.poi-list .mi { flex: 1; min-width: 0; }
.poi-list .mn { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.poi-list .ms { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.poi-go { color: var(--muted); font-size: 22px; }
.poi-empty { padding: var(--s5) var(--s3) var(--s2); text-align: center; }
.poi-empty b { font-size: 16px; }
.poi-empty p { margin: var(--s2) 0 0; font-size: 13px; color: var(--muted); line-height: 1.6; }
.spin { width: 28px; height: 28px; margin: 0 auto; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--blue); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.poi-card { padding-right: 44px; }
.poi-card .fb-x { top: 4px; }
.poi-name { font-size: 18px; font-weight: 700; }
.poi-sub { font-size: 13px; color: var(--muted); margin-bottom: var(--s1); }
.poi-card .btn { padding: 0 var(--s2); font-size: 15px; }
#main.poi .sheet, #main.poi .fabs, #main.poi .lfabs { display: none; }
/* 走失卡 */
.lost-tip { margin: var(--s2) 0 var(--s3); }
.lost-pic { margin: var(--s3) 0 0; text-align: center; }
.lost-pic img { width: auto; max-width: 62%; max-height: 46dvh; border-radius: 12px; box-shadow: var(--shadow); background: #fff; }
.lost-pic img:not([src]) { display: none; }
.img-hint { position: absolute; left: 0; right: 0; bottom: calc(24px + var(--safe-b)); text-align: center; color: #fff; font-size: 14px; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); pointer-events: none; }
/* 权限引导 */
.perm-dlg { z-index: 3200; }
.perm-lead { margin: var(--s2) 0 var(--s3); font-size: 14px; line-height: 1.6; color: var(--muted); }
.perm-steps { margin: 0 0 var(--s2); padding: 0; list-style: none; counter-reset: ps; }
.perm-steps li { counter-increment: ps; position: relative; padding: var(--s3) var(--s3) var(--s3) 48px; margin-bottom: var(--s2); border-radius: var(--r); background: var(--fill); font-size: 15px; line-height: 1.55; }
.perm-steps li::before { content: counter(ps); position: absolute; left: var(--s3); top: var(--s3); width: 24px; height: 24px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 13px; font-weight: 700; line-height: 24px; text-align: center; }
/* 新手引导 */
.coach { position: fixed; inset: 0; z-index: 3300; }
.coach-hole { position: absolute; border-radius: 16px; box-shadow: 0 0 0 100vmax rgba(10, 14, 22, .66), 0 0 0 3px rgba(255, 255, 255, .9); transition: all .25s ease; pointer-events: none; }
.coach-card { position: absolute; left: var(--s4); right: var(--s4); max-width: 360px; margin: 0 auto; padding: var(--s4); border-radius: var(--r-lg); background: var(--card); box-shadow: 0 8px 32px rgba(0, 0, 0, .35); }
.coach-step { font-size: 12px; font-weight: 700; color: var(--blue); letter-spacing: 1px; }
.coach-card b { display: block; margin-top: 2px; font-size: 18px; }
.coach-card p { margin: var(--s2) 0 var(--s3); font-size: 14px; line-height: 1.6; color: var(--muted); }
.coach-card .row { margin: 0; }
/* 本机媒体占位 */
.bubble.expired { color: var(--muted); font-size: 14px; background: var(--fill); border: 1px dashed var(--bd); }
.msg.mine .bubble.expired { color: rgba(255, 255, 255, .85); background: rgba(22, 119, 255, .55); border-color: rgba(255, 255, 255, .5); }
.bubble.voice.expired { cursor: default; width: auto !important; gap: var(--s2); }
.bubble.loading { min-width: 120px; min-height: 90px; background: var(--fill); }
.bubble img:not([src]) { display: none; }
/* 省电：关掉非告警动画 */
#main.psave .leaflet-zoom-anim .leaflet-zoom-animated, #main.psave .leaflet-fade-anim .leaflet-tile, #main.psave .pin { transition: none !important; }
#main.psave .nav-card.near .nb.primary, #main.psave .nav-card.radar.near .compass, #main.psave .mdot.rec, #main.psave .vb-bars i { animation: none !important; }

@media (prefers-color-scheme: dark) {
  .meet-arr { background: var(--fill2); }
  .perm-steps li { background: var(--fill2); }
  .lost-pic img { box-shadow: 0 2px 12px rgba(0, 0, 0, .6); }
  .bubble.loading { background: var(--fill2); }
  .msg.mine .bubble.expired { background: rgba(59, 139, 255, .45); }
}

.set-row.sw, .set-row.set-btn { padding-top: 6px; padding-bottom: 6px; }

/* ===== v2.6：状态 / 到达 / 观察链接 / 极简模式 / 海报 / 走失贴纸 ===== */
.tag.t-status { background: #e6f4ff; color: #0958d9; }
.tag.t-over { background: #fff2e8; color: #ad6800; opacity: .85; }
.tag.t-eta { background: #f9f0ff; color: #531dab; }
.tag.t-watch { border: 0; font-family: inherit; background: #f0f5ff; color: #2f54eb; cursor: pointer; padding: 1px 8px; }
.tag.t-watch:active { opacity: .7; }
.st-tip { margin: var(--s1) 0 var(--s3); }
.st-kinds .chip { min-width: 72px; }
#stCustomRow { margin: var(--s3) 0 0; }
#stDur .chip { min-width: 64px; }
.wt-tip { margin: var(--s2) 0 var(--s3); line-height: 1.6; text-align: left; font-size: 13px; }
.wt-dur { padding: var(--s3) var(--s4); border-top: 1px solid var(--hair); }
.wt-create { margin-top: var(--s3); }
.wt-item { padding: var(--s3) var(--s4); border-bottom: 1px solid var(--hair); }
.wt-item:last-child { border-bottom: 0; }
.wt-top { display: flex; flex-direction: column; gap: 2px; }
.wt-top b { font-size: 16px; }
.wt-top span { font-size: 12px; color: var(--muted); }
.wt-link { margin-top: var(--s2); padding: 6px var(--s3); border-radius: 8px; background: var(--fill); color: var(--muted); font-size: 12px; word-break: break-all; }
.wt-acts { display: flex; gap: var(--s2); margin-top: var(--s2); }
.wt-acts button { flex: 1; min-height: 40px; border: 1px solid var(--bd); border-radius: 10px; background: var(--card); color: var(--blue); font-size: 14px; }
.wt-acts button.red { color: var(--red); }
.wt-qr { margin-top: var(--s3); }
.mw-eta, .mw-none { flex: none; font-style: normal; font-size: 13px; font-weight: 600; }
.mw-eta { color: var(--blue); } .mw-none { color: var(--muted); font-weight: 400; }
.mw-ok { white-space: nowrap; }
.pin.finder .dot { background: #fa541c; animation: ring 1.4s infinite; }
.pin.finder .label { background: #fa541c; }
.fd-quote { color: inherit; opacity: .95; font-size: 15px; }
.ps-pic { margin: var(--s3) 0 0; text-align: center; min-height: 120px; }
.ps-pic img { width: auto; max-width: 68%; max-height: 54dvh; border-radius: 12px; box-shadow: var(--shadow); background: #fff; }
.ps-pic img:not([src]) { display: none; }
.big-ok-ov { position: fixed; inset: 0; z-index: 3600; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s2); background: rgba(22, 120, 40, .94); color: #fff; text-align: center; }
.big-ok-ov .bo-i { width: 120px; height: 120px; border-radius: 50%; background: rgba(255, 255, 255, .2); font-size: 80px; line-height: 120px; font-weight: 800; }
.big-ok-ov b { font-size: 34px; margin-top: var(--s2); }
.big-ok-ov span { font-size: 17px; opacity: .9; }
.nfc-open { margin-top: var(--s2); }
.nfc-open.hidden { display: none; }
/* 路人页 */
.fd-box { text-align: center; }
.fd-logo { background: #fa541c; box-shadow: 0 10px 24px rgba(250, 84, 28, .35); }
.fd-h { margin: var(--s3) 0 0; font-size: 24px; line-height: 1.35; }
.fd-p { margin: 0 !important; font-size: 15px !important; line-height: 1.6; color: var(--muted); }
.fd-p b { color: var(--text); }
.fd-card { display: flex; flex-direction: column; gap: 6px; text-align: left; background: rgba(255, 255, 255, .72); border-radius: var(--r); padding: var(--s3) var(--s4) var(--s4); }
.fd-card textarea { font-size: 17px; }
.fd-ok { background: #f6ffed; color: #237804; border: 1px solid #b7eb8f; border-radius: var(--r); padding: var(--s3); display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.fd-ok b { font-size: 18px; }
#fdErr { text-align: left; }

/* ===== 极简模式 ===== */
.simple { position: absolute; inset: 0; z-index: 1500; display: flex; flex-direction: column; gap: var(--s4); padding: calc(var(--safe-t) + 28px) var(--s4) calc(var(--safe-b) + var(--s4)); background: var(--bg); overflow-y: auto; }
.sm-where { font-size: 30px; font-weight: 800; line-height: 1.35; text-align: center; padding: var(--s4) var(--s2) var(--s2); }
.sm-sos { background: var(--red); color: #fff; font-size: 24px; font-weight: 800; text-align: center; padding: var(--s3); border-radius: var(--r-lg); }
.sm-btns { display: flex; flex-direction: column; gap: var(--s3); margin-top: auto; }
.sm-btn { min-height: 104px; border: 0; border-radius: 28px; font-size: 36px; font-weight: 800; color: #fff; letter-spacing: 2px; box-shadow: 0 4px 14px rgba(0, 0, 0, .18); }
.sm-btn:active { transform: scale(.98); }
.sm-btn:disabled { opacity: .4; }
.sm-btn.b1 { background: var(--blue); } .sm-btn.b2 { background: #389e0d; } .sm-btn.b3 { background: var(--red); }
.sm-exit { position: relative; overflow: hidden; align-self: center; flex: none; min-height: 48px; padding: 0 var(--s4); border: 0; border-radius: 24px; background: transparent; color: var(--muted); font-size: 15px; text-decoration: underline; text-underline-offset: 3px; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.sm-exit span { position: relative; z-index: 1; }
.sm-exit i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(22, 119, 255, .22); }
.sm-exit.hold i { animation: smfill 2s linear forwards; }
@keyframes smfill { to { width: 100%; } }
#main.sm-nav .simple { background: transparent; pointer-events: none; padding-top: 0; overflow: visible; }
#main.sm-nav .sm-where, #main.sm-nav .sm-exit, #main.sm-nav .sm-sos { display: none; }
#main.sm-nav .sm-btns { margin: auto calc(var(--s4) * -1) calc((var(--safe-b) + var(--s4)) * -1); padding: var(--s3) var(--s4) calc(var(--safe-b) + var(--s3)); gap: var(--s2); background: var(--bg); border-radius: 28px 28px 0 0; box-shadow: 0 -4px 24px rgba(0, 0, 0, .18); pointer-events: auto; }
#main.sm-nav .sm-btn { min-height: 64px; font-size: 26px; border-radius: 20px; }
body.simple #sheet, body.simple #fabs, body.simple #lfabs, body.simple #meetBar, body.simple #teamChip, body.simple #settingsBtn, body.simple .leaflet-control-container { display: none !important; }
body.simple #topStack { padding-top: calc(var(--safe-t) + 12px); z-index: 1600; }
body.simple #topStack > *:not(#navCard):not(#rollBanner) { display: none !important; }
body.simple .nav-card { padding: var(--s4); border-radius: 24px; }
body.simple .nav-card .nav-main { padding-right: 0; gap: var(--s4); }
body.simple .nav-card .compass { width: 96px; height: 96px; }
body.simple .nav-card .compass svg { width: 68px; height: 68px; }
body.simple .nav-card .instr { font-size: 24px; -webkit-line-clamp: 3; }
body.simple .nav-card .dist { font-size: 36px; }
body.simple .nav-card .nav-who { font-size: 16px; }
body.simple .nav-card .eta { font-size: 18px; }
body.simple .nav-card.radar .dist { font-size: 56px; }
body.simple .nav-card .nav-x { position: static; display: block; margin: var(--s3) auto 0; min-height: 52px; font-size: 20px; }
body.simple #navMore, body.simple #navMeta, body.simple #talkBtn, body.simple #arBtn, body.simple #midBtn, body.simple #altBtn, body.simple #pingBtn { display: none !important; }
body.simple #foundBtn { min-height: 64px; font-size: 24px; flex-direction: row; gap: 8px; }
body.simple #foundBtn span { font-size: 24px; }
body.simple #pushSug, body.simple #fbPrompt { display: none !important; }
body.simple .modal { padding: 0; }
body.simple .modal-box { max-width: none; width: 100%; height: 100%; max-height: none; border-radius: 0; display: flex; flex-direction: column; justify-content: center; padding: var(--s5); font-size: 30px; line-height: 1.4; }
body.simple .modal-box .sub { font-size: 20px; }
body.simple .modal-box .big-icon { font-size: 72px; }
body.simple .modal-box .btn { min-height: 76px; font-size: 26px; border-radius: 20px; }
body.simple .modal-actions { gap: var(--s3); }
body.simple #entry input, body.simple #entry .btn { font-size: 22px; min-height: 60px; }
body.simple #entry .sub, body.simple #entry .tip { font-size: 16px; }
body.simple .entry-box .vp { display: none; }
body.simple .toast { font-size: 20px; padding: 14px var(--s5); }

@media (prefers-color-scheme: dark) {
  .tag.t-status { background: #112a45; color: #69b1ff; } .tag.t-over { background: #4a2e10; color: #ffa940; } .tag.t-eta { background: #2b1d4a; color: #b37feb; } .tag.t-watch { background: #1d2750; color: #85a5ff; }
  .fd-card { background: rgba(255, 255, 255, .06); }
  .fd-ok { background: #1d3a12; color: #95de64; border-color: #274916; }
  .sm-btn.b2 { background: #2f8a0a; }
}
body.simple .nav-card:not(.hidden) { display: flex; flex-direction: column; }
body.simple .nav-card .nav-x { order: 9; background: var(--fill); border-radius: 16px; width: 100%; }
body.simple .nav-card .nav-actions { order: 8; }
#finder { display: flex; align-items: center; justify-content: center; background: linear-gradient(170deg, #ffe7de, #f7f9fc 55%); padding: var(--s5); overflow: auto; }
@media (prefers-color-scheme: dark) { #finder { background: linear-gradient(170deg, #3a1d14, #121418 60%); } }

/* ===== v2.7：授权 / 消息管理 / 导览图共享库 / 多点对齐 / 分组 / 楼层优先 ===== */
.dlg.cs-dlg { z-index: 3150; }
.dlg.lib-dlg { z-index: 2300; }
.dlg.act-dlg { z-index: 2400; }
/* 授权页 */
.cs-lead { margin: var(--s2) 0 var(--s3); font-size: 15px; line-height: 1.6; }
.cs-list { margin: 0; padding: var(--s1) var(--s4); background: var(--fill); border-radius: var(--r); }
.cs-list dt { margin-top: var(--s3); font-size: 12px; font-weight: 700; color: var(--blue); letter-spacing: .5px; }
.cs-list dd { margin: 2px 0 var(--s2); font-size: 14px; line-height: 1.55; }
.cs-links { margin: var(--s3) 0 var(--s2); font-size: 13px; color: var(--muted); }
.cs-links a { padding: 8px 0; }
.cs-age { display: flex; align-items: center; gap: var(--s3); min-height: 48px; font-size: 15px; color: var(--text); }
.cs-age input { width: 24px; height: 24px; min-height: 0; padding: 0; flex: none; accent-color: var(--blue); }
.cs-dlg .row { margin-top: var(--s2); }
.cs-dlg .btn { min-height: 48px; }
.cs-dlg .btn.primary:disabled { background: #9db9e8; border-color: #9db9e8; opacity: 1; }
/* 通用操作面板 */
.act-box { padding-top: var(--s4); background: var(--grouped); }
.act-title { text-align: center; font-size: 13px; color: var(--muted); margin-bottom: var(--s3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-list { background: var(--card); border-radius: var(--r); overflow: hidden; }
.act-list button { display: block; width: 100%; min-height: 52px; border: 0; border-bottom: 1px solid var(--hair); background: none; color: var(--text); font-size: 17px; text-align: center; }
.act-list button:last-child { border-bottom: 0; }
.act-list button:active { background: var(--fill2); }
.act-list button.red { color: var(--red); }
.act-cancel { display: block; width: 100%; margin-top: var(--s2); min-height: 52px; border: 0; border-radius: var(--r); background: var(--card); color: var(--blue); font-size: 17px; font-weight: 600; }
/* 举报 */
.rep-chips { justify-content: center; margin: var(--s3) 0 0; }
.rep-sub { font-size: 13px; color: var(--muted); font-weight: 400; margin-top: var(--s1); word-break: break-all; }
/* 聊天：撤回 / 删除 / 操作按钮 */
.msg-more { flex: none; width: 28px; height: 20px; margin: -2px 0 0; padding: 0; border: 0; background: none; color: var(--muted); font-size: 16px; line-height: 14px; opacity: .55; letter-spacing: 1px; }
.msg-more:active { opacity: 1; }
.msg .bubble { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.msg.mine .mh { align-items: center; }
.msg.gone { align-self: center; max-width: 92%; padding: 2px 10px; border-radius: 10px; font-size: 12px; color: var(--muted); background: var(--fill); text-align: center; }
.msg.blk { display: none; }
/* 成员：分组 */
.tag.t-group { background: #f9f0ff; color: #722ed1; }
.grp-chips { display: flex; gap: var(--s2); overflow-x: auto; padding: var(--s2) var(--s4); scrollbar-width: none; border-bottom: 1px solid var(--hair); background: var(--card); }
.grp-chips::-webkit-scrollbar { display: none; }
.grp-chips .chip { flex: none; min-height: 34px; padding: 0 var(--s3); font-size: 13px; white-space: nowrap; }
.roll-miss li.grp-h { min-height: 28px; margin-top: var(--s1); font-size: 12px; font-weight: 700; color: var(--muted); }
.grp-pick .chips { justify-content: center; margin-top: var(--s3); }
.st-group { margin-top: var(--s2); }
#stGroups:empty { display: none; }
/* 导览图共享库 */
.lib-chip { align-self: flex-start; display: flex; align-items: center; max-width: 100%; min-height: 36px; background: var(--card); border-radius: 18px; box-shadow: var(--shadow); font-size: 13px; color: var(--text); }
.lib-chip button { border: 0; background: none; color: inherit; }
#libChipGo { display: flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 var(--s1) 0 var(--s3); font-size: 13px; color: var(--blue); font-weight: 600; min-width: 0; }
#libChipGo span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#libChipX { width: 36px; height: 36px; font-size: 18px; color: var(--muted); flex: none; }
.lib-tip { margin: var(--s2) 0 var(--s3); text-align: left; line-height: 1.5; }
.lib-item { display: grid; grid-template-columns: 76px 1fr; gap: var(--s3); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--hair); }
.lib-item:last-child { border-bottom: 0; }
.lib-th { width: 76px; height: 76px; border-radius: 10px; background: var(--fill2); object-fit: cover; border: 1px solid var(--line); }
.lib-i { min-width: 0; }
.lib-n { font-size: 16px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-s { font-size: 12px; color: var(--muted); line-height: 1.5; margin-top: 2px; }
.lib-acts { display: flex; gap: var(--s2); margin-top: var(--s2); }
.lib-acts button { min-height: 36px; padding: 0 var(--s4); border: 1px solid var(--bd); border-radius: 18px; background: var(--card); color: var(--muted); font-size: 14px; }
.lib-acts button.use { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 600; }
.lib-empty { padding: var(--s5) var(--s4); text-align: center; color: var(--muted); font-size: 14px; line-height: 1.6; }
.blk-item { display: flex; align-items: center; gap: var(--s3); min-height: 52px; padding: 0 var(--s4); border-bottom: 1px solid var(--hair); }
.blk-item:last-child { border-bottom: 0; }
.blk-item span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blk-item button { min-height: 36px; padding: 0 var(--s4); border: 1px solid var(--bd); border-radius: 18px; background: var(--card); color: var(--blue); font-size: 14px; }
/* 向导：多点 */
#wzLib { margin-top: var(--s1); }
.wz-pts { display: flex; flex-direction: column; background: var(--card); border-radius: var(--r); overflow: hidden; flex: none; }
.wz-pts li { display: flex; align-items: center; gap: var(--s3); min-height: 52px; padding: 0 var(--s3) 0 var(--s4); border-bottom: 1px solid var(--hair); font-size: 14px; }
.wz-pts li:last-child { border-bottom: 0; }
.wz-pts li i { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--red); color: #fff; font-style: normal; font-size: 12px; font-weight: 700; line-height: 24px; text-align: center; }
.wz-pts li span { flex: 1; min-width: 0; line-height: 1.35; }
.wz-pts li small { display: block; font-size: 12px; color: var(--muted); }
.wz-pts li button { flex: none; min-height: 40px; padding: 0 var(--s3); border: 0; background: none; color: var(--red); font-size: 14px; }
.wz-pts li button:disabled { color: var(--muted); opacity: .45; }
#wzAdd, #wzGo, #wzName .field, #wzSum, #wzThumb { flex: none; }
.wz-sum .bad { color: #d46b08; font-weight: 600; }
.wz-sum .good { color: #389e0d; font-weight: 600; }
.wz-share { display: flex; align-items: flex-start; gap: var(--s3); padding: var(--s3); border-radius: var(--r); background: var(--card); border: 1px solid var(--line); font-size: 15px; color: var(--text); flex: none; }
.wz-share input { width: 22px; height: 22px; min-height: 0; padding: 0; margin-top: 1px; flex: none; accent-color: var(--blue); }
.wz-share b { font-size: 15px; }
.wz-share small { display: block; font-size: 12px; line-height: 1.5; color: var(--muted); margin-top: 2px; }
/* 导航：楼层优先 */
.nav-ask { display: flex; align-items: center; gap: var(--s2); margin-top: var(--s2); padding: 4px 4px 4px var(--s3); border-radius: var(--r-sm); background: #fff7e6; color: #ad4e00; font-size: 12px; }
.nav-ask span { flex: 1; min-width: 0; }
.nav-ask .btn.small { flex: none; min-height: 36px; font-size: 13px; padding: 0 var(--s3); }
.nav-card.floor .compass { background: #fff2e0; }
.nav-card.floor .compass svg { fill: var(--orange); }
.nav-card.floor .instr { color: #d46b08; -webkit-line-clamp: 3; }
.nav-card.floor .dist, .nav-card.floor .eta { opacity: .7; }

@media (prefers-color-scheme: dark) {
  .tag.t-group { background: #2b1d4a; color: #b37feb; }
  .nav-ask { background: #3a2c14; color: #ffc069; }
  .nav-card.floor .compass { background: #4a2e10; }
  .nav-card.floor .instr { color: #ffa940; }
  .cs-dlg .btn.primary:disabled { background: #2a3f66; border-color: #2a3f66; color: #8aa4cf; }
  .wz-sum .bad { color: #ffa940; } .wz-sum .good { color: #95de64; }
}
