/* ============================================================
 * v481 豆包式新皮肤 ui2（?ui=2 激活，旧版一行不动）
 * 骨架照豆包：底部白色胶囊 / 按住说话 / 自绘数字+九宫格键盘 / 加号动作面板
 * 配色沿用执法记录仪弹窗：海蓝主色 + 语义绿(在线/录像) 红(预警/取消) 深蓝灰(次要)
 * ============================================================ */
:root {
  --u2-blue: #1565c0;
  --u2-blue2: #1e88e5;
  --u2-blue-soft: #eaf3fe;
  --u2-green: #22a45d;
  --u2-green-soft: #eafaf0;
  --u2-red: #e5393b;
  --u2-ink: #1f2d3d;
  --u2-slate: #334155;
  --u2-gray: #8a94a3;
  --u2-line: #e3e8ef;
  --u2-kbb: #eef1f5;
  --u2-key: #ffffff;
  --u2-keyfn: #d6dce4;
  --u2-dockh: 58px;    /* v673 三块整体等比压缩到约 1/3 屏高（原67） */
  --u2-zoneh: 52px;    /* v673 态势栏（原60） */
  --u2-barh: calc(var(--u2-dockh) + var(--u2-zoneh) + 16px);  /* 底部一体白托总高（不含 safe） */
  --u2-kbh: 260px;   /* v495 自绘数字面板收紧到与＋功能面板齐平；键高约45，对齐系统九宫比例 */
  --u2-plush: 198px;   /* v675 ＋功能面板可视高＝驾驶面板(132)+语音底栏(58)+缝，与打开驾驶面板时态势条上移高度(198)齐平；不含底部 kbpad 铺色 */
  --u2-safe: env(safe-area-inset-bottom, 0px);
  /* v495 键盘底部铺色：safe-area 与真机实测三键栏高 --nav-pad（JS visualViewport 动态写入）取大，
     键面背景一直铺到物理屏底/系统栏上沿，既不留黑缝也不固定 44 撑出大空白 */
  --nav-pad: 0px;
  --u2-kbpad: max(env(safe-area-inset-bottom, 0px), var(--nav-pad, 0px));
  --sys-kbh: 0px;     /* 系统拼音键盘实测高度（visualViewport 动态写入） */
}
/* 仅手机窄屏生效；电脑端不显示 */
@media (min-width: 901px) {
  body.ui2 #ui2-dock, body.ui2 #ui2-kbd, body.ui2 #ui2-voice,
  body.ui2 #ui2-plus, body.ui2 #ui2-results, body.ui2 #ui2-zones { display: none !important; }
  body.ui2::after { display: none !important; }
}
body.ui2 #tabbar { display: none !important; }       /* 旧五栏底部导航让位 */
body.ui2 #m-search, body.ui2 #m-search-edit { display: none !important; } /* 顶部假搜索条与底部重复，隐藏 */
/* v485 新皮肤只用 #ui2-results，旧移动搜索面板/遮罩一律隐藏，杜绝语音结果弹“两个窗” */
body.ui2 #m-search-pop, body.ui2 #m-search-mask { display: none !important; }

/* v485 底部一体化白底：输入胶囊与安卓三键/手势区同一底色，一直铺到屏幕物理底边。
   键盘(1300)/加号(1190)/录音(1400)面板 z 更高且自身白底到底，会自然盖住这条，仅平时态可见。 */
body.ui2::after {
  content: ""; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1185;
  height: calc(var(--u2-barh) + var(--u2-safe));
  background: #fff; pointer-events: none;
  box-shadow: 0 -4px 16px rgba(16, 42, 82, .05);
}
body.ui2 #m-topbar { gap: 8px; }
body.ui2 #m-topbar #m-menu-btn { flex: 0 0 auto; }
/* 底部给地图留出 dock 空间，避免最贴边的船标被胶囊长期压住 */
body.ui2 .leaflet-container { padding-bottom: 0; }

/* ---------------- 底部豆包式胶囊 ---------------- */
#ui2-dock {
  position: fixed; left: 12px; right: 12px;
  bottom: calc(var(--u2-safe) + 8px);
  height: var(--u2-dockh); z-index: 1200;
  display: none; align-items: center; gap: 8px;
  padding: 0 10px;
  background: #fff;
  border: 1px solid #eef0f3;
  border-radius: 28px;
  box-shadow: 0 2px 10px rgba(16, 42, 82, .08), 0 1px 2px rgba(16, 42, 82, .06);
  transition: bottom .18s ease;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
body.ui2 #ui2-dock { display: flex; }
/* v489 键盘态：输入条与键盘连成一条通栏方长条——左右铺满、直角、无缝、不悬浮 */
body.ui2.u2-kb #ui2-dock {
  left: 0; right: 0;
  bottom: calc(var(--u2-kbh) + var(--u2-kbpad));
  border-radius: 0; border: none; border-top: 1px solid #e6eaf0;
  box-shadow: none; padding: 0 10px; height: 52px;
}
/* v493 功能面板态：原胶囊不另做样式，直接嵌进白色面板内部顶端（白卡一体包住，上/左/右都留白），
   功能块与脚栏整体排在胶囊下方；如同系统键盘上方嵌着输入条。 */
body.ui2.u2-plus #ui2-dock {
  bottom: calc(var(--u2-kbpad) + 132px);   /* v675：功能面板高198，胶囊(58)嵌面板顶部内侧，底=198-58-8 */
}
body.ui2.u2-kb.u2-plus #ui2-dock {
  left: 0; right: 0;
  bottom: calc(var(--u2-kbh) + var(--u2-kbpad));
  border-radius: 0; border: none; border-top: 1px solid #e6eaf0;
  box-shadow: none; padding: 0 10px; height: 52px;
}

.u2-icbtn {
  flex: 0 0 auto; width: 37px; height: 37px; border-radius: 50%;
  background: #fff; border: 2px solid var(--u2-ink);
  display: flex; align-items: center; justify-content: center;
  color: var(--u2-ink); cursor: pointer; padding: 0; -webkit-tap-highlight-color: transparent;
  touch-action: manipulation; transition: transform .08s ease;
}
.u2-icbtn:active { transform: scale(.9); }
.u2-icbtn svg { width: 21px; height: 21px; }
/* v491 记录仪风格：dock 图标上色（浅色底+主题色），最右功能键实心蓝 */
.u2-cam { background: #eaf3fe; border-color: #c7dff7; color: var(--u2-blue); }
.u2-kbbtn { background: #eef2f7; border-color: #d8e0ea; color: var(--u2-slate); }
#u2-plusbtn.u2-icbtn {
  background: var(--u2-blue); border-color: var(--u2-blue); color: #fff;
  box-shadow: 0 4px 12px rgba(21, 101, 192, .38);
}
#u2-plusbtn.u2-icbtn:active { transform: scale(.9); }
body.ui2.u2-plus #u2-plusbtn.u2-icbtn { background: var(--u2-blue); border-color: var(--u2-blue); color: #fff; }
#u2-plusbtn svg { width: 24px; height: 24px; }

.u2-hold {
  flex: 1 1 auto; height: 42px; border-radius: 21px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; color: #111827;
  background: transparent; cursor: pointer; user-select: none; -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent; touch-action: none;
  transition: background .08s ease, transform .08s ease;
}
.u2-hold:active { background: #e9edf2; transform: scale(.99); }
.u2-field {
  flex: 1 1 auto; height: 42px; border-radius: 21px;
  display: none; align-items: center; gap: 6px; padding: 0 8px 0 14px;
  background: #f3f5f8;
}
body.ui2.u2-kb .u2-hold { display: none; }
body.ui2.u2-kb .u2-field { display: flex; }
/* v494 真实输入框：光标为系统原生、始终跟在已输入内容之后；透明底嵌在胶囊里 */
.u2-field #u2-text {
  flex: 1 1 auto; min-width: 0; height: 100%; padding: 0;
  border: none; outline: none; background: transparent;
  font-size: 16px; color: #111827; letter-spacing: .5px; caret-color: var(--u2-blue);
}
.u2-field #u2-text::placeholder { color: var(--u2-gray); font-weight: 400; letter-spacing: 0; }
.u2-field #u2-text[readonly] { cursor: default; }
.u2-send {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; border: none;
  background: var(--u2-blue); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer;
  touch-action: manipulation; transition: transform .08s ease;
}
.u2-send:active { transform: scale(.9); }
.u2-send svg { width: 20px; height: 20px; }
.u2-send.disabled { background: #c3ccd8; }
/* 键盘态：语音波纹钮隐藏（键盘里可切回），非键盘态显示键盘切换钮 */
/* 键盘态：键盘钮、功能钮都隐藏（键盘内有收起/拼音），只留相机与输入 */
.u2-kbbtn { display: flex; }
body.ui2.u2-kb .u2-kbbtn { display: none; }
body.ui2.u2-kb #u2-plusbtn { display: none; }
/* 最右功能键：常态显朝下箭头(u2-plus-i)，展开后显朝上箭头(u2-x-i) */
.u2-plus .u2-x-i { display: none; }
body.ui2.u2-plus .u2-plus .u2-plus-i { display: none; }
body.ui2.u2-plus .u2-plus .u2-x-i { display: block; }

/* ---------------- 按住说话上方·分区横滑条（v486） ---------------- */
#ui2-zones {
  position: fixed; left: 0; right: 0;
  bottom: calc(var(--u2-safe) + 66px);   /* v673：整条白背板，底边紧贴语音栏顶（8 留白 + 58 语音栏），与白托连成一体 */
  height: var(--u2-zoneh); z-index: 1196; display: none;
  background: #fff;
  border-top: 1px solid #eef0f3;
  box-shadow: 0 -2px 12px rgba(16, 42, 82, .05);
}
body.ui2 #ui2-zones { display: flex; }
/* 键盘/录音态让位，由各自浮层占据底部；v675 功能面板态态势条不再隐藏，而是与打开驾驶面板时一致上移到 198，功能面板等高填入其下 */
body.ui2.u2-kb #ui2-zones,
body.ui2.u2-rec #ui2-zones { display: none !important; }
body.ui2.u2-plus #ui2-zones { display: flex !important; bottom: calc(var(--u2-safe) + 198px); }

/* v679 态势栏最左固定“层级格”：不随卡片横滑，常驻显示地图级+格距/半径；浅蓝阴影底与白卡区分 */
.u2-lvl {
  flex: 0 0 52px; max-width: 52px; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  background: #eef4ff; border-right: 1px solid #c9dafc;
  box-shadow: inset 3px 0 8px rgba(29, 78, 216, .10);
  -webkit-tap-highlight-color: transparent;
}
.u2-lvl-z { font-size: 19px; font-weight: 800; line-height: 1.02; color: #1d4ed8; font-variant-numeric: tabular-nums; }
.u2-lvl-g { font-size: 9px; font-weight: 700; color: #3b5aa0; white-space: nowrap; letter-spacing: -.2px; }
.u2-zscroll { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 4px; }
.u2-zscroll::-webkit-scrollbar { display: none; }

/* v674 态势栏：整条白背板上一屏正好 6 个直角方格（去圆角、竖线分格、天然居中铺满）；
   整行可左右分页横滑（每屏 6 格，scroll-snap 定位），隐藏滚动条 */
.u2-sit {
  display: flex; flex: 1 1 auto; min-width: 0; flex-wrap: nowrap; gap: 0; height: 100%;
  padding: 0;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scrollbar-width: none;
  -webkit-overflow-scrolling: touch; touch-action: pan-x;
}
.u2-sit::-webkit-scrollbar { display: none; }
.u2-scard {
  flex: 0 0 calc(100% / 6);   /* 一屏 6 格等宽，6 格正好铺满、天然居中 */
  min-width: 0; height: 100%; scroll-snap-align: start;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  border-radius: 0; background: #fff; border: none; border-right: 1px solid #e3e8ef;
  box-shadow: none;
  padding: 2px 0; cursor: pointer; -webkit-tap-highlight-color: transparent;
  touch-action: manipulation; transition: background .08s ease;
}
.u2-scard:last-child { border-right: none; }
.u2-scard:active { background: #f1f5fa; }
.u2-sc-n { font-size: 18px; font-weight: 800; line-height: 1.05; color: #0f2438; font-variant-numeric: tabular-nums; }
.u2-sc-lb { font-size: 10px; font-weight: 600; color: #5b6b80; white-space: nowrap; letter-spacing: -.2px; }
.sit-new .u2-sc-n { color: #1d4ed8; }
.sit-far { background: #fff2f0; } .sit-far .u2-sc-n { color: #dc2626; }
.sit-local { background: #eef4ff; } .sit-local .u2-sc-n { color: #1d4ed8; }
.sit-focus .u2-sc-n { color: #dc2626; }
.sit-mem { background: #effaf2; } .sit-mem .u2-sc-n { color: #16a34a; }
.sit-aqua { background: #e6f7f4; } .sit-aqua .u2-sc-n { color: #0d9488; }

/* v680 位置/层级阴影提示胶囊：卡在态势栏正上方居中，弹 1.5s 自动消失，随态势栏开合上移 */
#cp-flash { display: none; }
body.ui2 #cp-flash {
  display: block; position: fixed; left: 50%; transform: translateX(-50%) translateY(6px);
  bottom: calc(var(--u2-safe) + 126px);
  z-index: 1210; max-width: 84vw; pointer-events: none; white-space: nowrap;
  background: rgba(16, 42, 67, .92); color: #fff; font-size: 13px; font-weight: 700; letter-spacing: .2px;
  padding: 7px 16px; border-radius: 18px; box-shadow: 0 6px 18px rgba(0, 0, 0, .30);
  opacity: 0; transition: opacity .18s ease, transform .18s ease, bottom .3s ease;
}
body.ui2 #cp-flash.show { opacity: 1; transform: translateX(-50%) translateY(0); }
body.ui2.cp-deck-open #cp-flash,
body.ui2.u2-plus #cp-flash { bottom: calc(var(--u2-safe) + 258px); }

.u2-zone {
  flex: 0 0 auto; height: 34px; padding: 0 17px; border-radius: 17px;
  background: #fff; border: 1px solid #cfd9e6; color: #33415c;
  font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer;
  display: flex; align-items: center; touch-action: manipulation;
  -webkit-tap-highlight-color: transparent; transition: transform .08s ease;
}
.u2-zone:active { transform: scale(.94); }
.u2-zone.on { background: var(--u2-blue); border-color: var(--u2-blue); color: #fff; box-shadow: 0 2px 8px rgba(21,101,192,.28); }

/* ---------------- 加号动作面板（四宫格） ---------------- */
#ui2-plus {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1198;  /* v674：盖过驾驶舱(1197)、低于讲话胶囊(1200)，使“按住说话”浮在功能面板顶部 */
  display: none; flex-direction: column; background: #fff; border-radius: 0;
  box-sizing: border-box; height: calc(198px + var(--u2-kbpad));   /* v675：可视高198＝驾驶面板+语音底栏，与态势条上移高度齐平 */
  padding: 60px 12px calc(10px + var(--u2-kbpad));
  box-shadow: 0 -8px 24px rgba(16,42,82,.16);
}
body.ui2.u2-plus #ui2-plus { display: flex; }
body.ui2.u2-kb #ui2-plus { display: none !important; }
.u2-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.u2-act {
  background: #f2f4f7; border-radius: 14px; height: 54px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--u2-ink); cursor: pointer; border: none; -webkit-tap-highlight-color: transparent;
  touch-action: manipulation; transition: background .08s ease, transform .08s ease;
}
.u2-act:active { background: #e6eaf0; transform: scale(.97); }
.u2-act svg { width: 21px; height: 21px; color: #2b3648; }
.u2-act.act-red svg { color: var(--u2-red); }
.u2-act.act-blue svg { color: var(--u2-blue); }
.u2-act.act-indigo svg { color: #283593; }
.u2-act span { font-size: 11.5px; color: #5b6573; }
.u2-act.danger svg { color: var(--u2-red); }
.u2-plus-foot { margin-top: 8px; height: 28px; display: flex; align-items: center; justify-content: center; }
.u2-switch-old {
  border: none; background: none; color: var(--u2-gray); font-size: 12px;
  padding: 4px 12px; cursor: pointer; text-decoration: underline;
}

/* ---------------- 结果浮层（语音/键盘候选大列表，v486 改按钮上方浅色上弹白卡） ---------------- */
#ui2-results {
  position: fixed; left: 10px; right: 10px; z-index: 1250;
  bottom: calc(var(--u2-safe) + 132px); max-height: 46vh;
  display: none; flex-direction: column; overflow: hidden;
  background: #fff; border: 1px solid #e7edf4; border-radius: 16px;
  box-shadow: 0 12px 30px rgba(16, 42, 82, .18);
}
#ui2-results.show { display: flex; animation: u2rise .16s ease-out; }
@keyframes u2rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
body.ui2.u2-kb #ui2-results { bottom: calc(var(--u2-kbh) + var(--u2-kbpad) + 66px); max-height: 36vh; }
.u2-r-head { padding: 14px 16px 2px; }
.u2-r-title { font-size: 16px; font-weight: 800; color: var(--u2-ink); letter-spacing: .5px; }
/* 识别/输入原文：浅灰、斜体、楷体，与“识别结果”明确区分（吕总：语音编译换颜色换字体） */
.u2-r-said {
  display: none; padding: 3px 16px 7px; font-size: 13px; line-height: 1.4;
  color: #9aa3b0; font-style: italic; font-family: "FangSong", "STFangsong", "KaiTi", "STKaiti", serif;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.u2-r-list { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 8px; }
.u2-r-empty { padding: 22px 16px; color: var(--u2-gray); font-size: 14px; text-align: center; }
.u2-r-row {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: #fff; border: none; border-bottom: 1px solid var(--u2-line);
  padding: 10px 8px; cursor: pointer; border-radius: 10px;
}
.u2-r-row:active { background: #f4f8fe; }
.u2-r-main { flex: 1; min-width: 0; }
.u2-r-name { display: flex; align-items: center; gap: 7px; font-size: 16px; color: var(--u2-ink); font-weight: 700; }
.u2-r-name .nm { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.u2-r-sub { font-size: 12px; color: var(--u2-gray); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.u2-tags { flex: 0 0 auto; display: flex; gap: 5px; }
.u2-tag { font-size: 11px; padding: 2px 8px; border-radius: 10px; white-space: nowrap; font-weight: 600; }
.u2-tag.gov { background: #eaf3fe; color: #1565c0; }    /* 政务库 */
.u2-tag.mine { background: #fdf1e3; color: #c86a16; }   /* 备注库/自建库 */
.u2-tag.wl { background: #e7f7ee; color: #1c9250; }     /* 社员身份 */
.u2-tag.place { background: #eef1f5; color: #5b6573; }  /* 地名 */
/* 关闭键：右下角（海上单手握机拇指热区，44px 大触摸区） */
.u2-r-foot { display: flex; justify-content: flex-end; padding: 8px 14px calc(10px + var(--u2-safe)); }
.u2-r-x {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid #d7e0ea;
  background: #fff; color: #576b88; font-size: 17px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; -webkit-tap-highlight-color: transparent;
}
.u2-r-x:active { background: #eef3f9; transform: scale(.92); }

/* ---------------- 自绘九宫格键盘（v489：通栏直角、与输入条连体无缝；1:1 照安卓/微信系统键位） ---------------- */
#ui2-kbd {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1300;
  display: none; flex-direction: column;
  height: calc(var(--u2-kbh) + var(--u2-kbpad));
  background: #303234; padding: 10px 6px 0;
  border-radius: 0; box-shadow: 0 -6px 18px rgba(0, 0, 0, .28);
}
body.ui2.u2-kb #ui2-kbd { display: flex; }
/* 底部系统手势/三键导航区铺到物理底边：取 safe-area 与 44px 兜底的较大值，颜色与键盘一致（真机1:1） */
#ui2-kbd::after { content: ""; flex: 0 0 auto; height: var(--u2-kbpad); background: #303234; }
/* 顶部单槽位（44）：无输入显横滑船籍前缀，有输入显候选，右侧常驻收起；二者互斥不挤压键面 */
.u2-kb-top { flex: 0 0 42px; display: flex; align-items: center; gap: 8px; padding: 0 1px; min-width: 0; }
#ui2-kbd .u2-chips, #ui2-kbd .u2-sug { flex: 1 1 auto; min-width: 0; display: flex; gap: 7px; overflow-x: auto; padding: 0; scrollbar-width: none; }
#ui2-kbd .u2-chips::-webkit-scrollbar, #ui2-kbd .u2-sug::-webkit-scrollbar { display: none; }
#ui2-kbd .u2-sug:empty { display: none; }
body.ui2.u2-typing #ui2-kbd .u2-chips { display: none; }
.u2-kb-hide { flex: 0 0 auto; border: none; background: #3e4145; width: 36px; height: 30px; border-radius: 8px; color: #cfd4d9; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.u2-kb-hide svg { width: 18px; height: 18px; }
.u2-kb-hide:active { background: #4d5053; }
.u2-chip {
  flex: 0 0 auto; height: 30px; padding: 0 15px; border-radius: 7px;
  background: #3e4145; border: none; color: #eef1f4;
  font-size: 15px; white-space: nowrap; cursor: pointer; display: flex; align-items: center; gap: 5px;
}
.u2-chip:active { background: #1565c0; color: #fff; }
.u2-chip .dot { display: none; }
.u2-chip.parcel, .u2-chip.zone, .u2-chip.place, .u2-chip.coop { background: #3e4145; color: #eef1f4; }
.u2-chip.u2-none { background: transparent; color: #8a8f95; }
/* 横滑船籍前缀（鲁蓬渔/鲁龙渔…），深色键面风 */
.u2-prefix { flex: 0 0 auto; height: 30px; padding: 0 13px; border-radius: 7px; background: #3e4145; border: none; color: #eef1f4; font-size: 14px; white-space: nowrap; cursor: pointer; }
.u2-prefix:active { background: #1565c0; color: #fff; }
/* 键区 1:1 真机系统数字键盘：两侧功能列窄(0.72/0.70)、中间三列数字等宽；最左竖长标点跨 3 行 */
.u2-keys { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 0.72fr repeat(3, 1fr) 0.7fr; grid-template-rows: repeat(4, 1fr); gap: 8px; padding: 2px 0 4px; }
.u2-key {
  height: auto; min-height: 0; border-radius: 8px;
  background: linear-gradient(180deg, #5f6165 0%, #4a4c50 100%);
  border: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 -1px 0 rgba(0, 0, 0, .18), 0 2px 0 #1d1f22, 0 2px 3px rgba(0, 0, 0, .30);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 25px; color: #fff; cursor: pointer; line-height: 1; user-select: none; -webkit-user-select: none;
  touch-action: manipulation; transition: transform .08s ease, box-shadow .08s ease, background .08s ease;
}
.u2-key.num { font-size: 27px; font-weight: 400; }
.u2-key.py { font-size: 18px; font-weight: 500; letter-spacing: .4px; }
.u2-key.py small { font-size: 10px; color: #c2c6cb; margin-bottom: 2px; font-weight: 400; }
/* 按下：实体键下凹，厚度阴影消失换内阴影 */
.u2-key:active {
  transform: translateY(2px);
  box-shadow: 0 0 0 #1d1f22, inset 0 2px 6px rgba(0, 0, 0, .42);
  background: linear-gradient(180deg, #46484c 0%, #53555a 100%);
}
/* 功能键（退格/. /@/符/拼音/123/空格/回车）明显再压暗一档，与亮灰数字键拉开层次，近真机 #3a3a3a */
.u2-key.fn {
  background: linear-gradient(180deg, #3f4246 0%, #34363a 100%);
  color: #eef1f4; font-size: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .10), 0 2px 0 #1d1f22, 0 2px 3px rgba(0, 0, 0, .30);
}
.u2-key.fn:active { background: linear-gradient(180deg, #34363a 0%, #3f4246 100%); }
.u2-key.del svg { width: 25px; height: 22px; }
.u2-key.enter svg { width: 25px; height: 25px; }
.u2-key.spacemic svg { width: 21px; height: 21px; }
.u2-key.spacemic svg + svg { width: 27px; height: 12px; margin-top: 2px; }
.u2-key.space svg { width: 29px; height: 13px; }
/* 空槽：业务用不到的键，渲染普通功能键同色（不写字、不做黑洞），将来后台自定义 */
.u2-key.slot { background: linear-gradient(180deg, #3f4246 0%, #34363a 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .10), 0 2px 0 #1d1f22; }
/* 竖长标点跨 3 行，色阶介于亮数字键与暗功能键之间（真机竖标点列 #505254），内部 4 个小符号透明底 */
.u2-key.vpunct { grid-row: span 3; background: linear-gradient(180deg, #515357 0%, #45474b 100%); flex-direction: column; padding: 3px; gap: 1px; }
.u2-psub { flex: 1 1 auto; width: 100%; border: none; background: transparent; color: #fff; font-size: 19px; border-radius: 5px; cursor: pointer; }
.u2-psub:active { background: rgba(0, 0, 0, .22); }

/* ---------------- v494 系统拼音键盘态（汉字/备注走手机系统九宫拼音） ---------------- */
/* 系统键盘正上方同色工具条：左侧“数字”大钮切回自绘船号数字面板 */
#u2-sysbar {
  position: fixed; left: 0; right: 0; z-index: 1290; display: none;
  align-items: center; gap: 12px; height: 42px; padding: 0 12px;
  background: #303234;
  bottom: calc(var(--sys-kbh, 0px) + env(safe-area-inset-bottom, 0px));
  transition: bottom .12s ease;
}
body.ui2.u2-syskb #u2-sysbar { display: flex; }
#u2-tonum {
  flex: 0 0 auto; height: 30px; padding: 0 20px; border: none; border-radius: 8px;
  background: #1565c0; color: #fff; font-size: 15px; font-weight: 600; cursor: pointer;
}
#u2-tonum:active { background: #0f54a3; }
.u2-sys-hint { color: #aab1b9; font-size: 13px; letter-spacing: .5px; }
/* 系统拼音态：胶囊输入条抬到系统键盘+工具条上方，隐藏自绘面板与其余按钮 */
body.ui2.u2-syskb #ui2-dock {
  left: 12px; right: 12px; bottom: calc(var(--sys-kbh, 0px) + env(safe-area-inset-bottom, 0px) + 48px);
  border-radius: 26px;
}
body.ui2.u2-syskb #ui2-kbd { display: none !important; }
body.ui2.u2-syskb #ui2-zones, body.ui2.u2-syskb #ui2-plus { display: none !important; }
body.ui2.u2-syskb .u2-hold { display: none; }
body.ui2.u2-syskb .u2-field { display: flex; }
body.ui2.u2-syskb .u2-kbbtn, body.ui2.u2-syskb #u2-plusbtn { display: none; }
body.ui2.u2-syskb #ui2-results { bottom: calc(var(--sys-kbh, 0px) + env(safe-area-inset-bottom, 0px) + 100px); }
body.ui2.u2-syskb #app-toast { bottom: calc(var(--sys-kbh, 0px) + env(safe-area-inset-bottom, 0px) + 130px); }

/* ---------------- 按住说话·录音反馈（v486：按钮上方浅色上弹白卡，不用屏幕中央深色块） ---------------- */
#ui2-voice {
  position: fixed; left: 12px; right: 12px; z-index: 1400;
  bottom: calc(var(--u2-safe) + 132px);
  display: none; justify-content: center; pointer-events: none;
}
#ui2-voice.show { display: flex; animation: u2rise .14s ease-out; }
.u2-vcard {
  min-width: 224px; max-width: 380px; padding: 14px 22px 12px; border-radius: 16px;
  background: #fff; border: 1px solid #e3e9f1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 14px 34px rgba(16, 42, 82, .22);
}
#ui2-voice.cancel .u2-vcard { background: #fdecec; border-color: #f6cdca; }
.u2-vwave {
  width: 100%;
  display: flex; align-items: center; justify-content: center;
  height: 54px; margin: 0 0 8px;
}
.u2-vbar {
  flex: 0 0 auto;
  width: 4px; height: 8px; margin: 0 2px; border-radius: 3px;
  background: var(--u2-blue);
  transition: height .09s ease;
}
#ui2-voice.cancel .u2-vbar { background: var(--u2-red); }
.u2-vtip {
  color: #334155; font-size: 13px; font-weight: 600; letter-spacing: .5px;
  background: #eef3fb; border-radius: 8px;
  padding: 7px 14px; text-align: center; white-space: nowrap;
}
#ui2-voice.cancel .u2-vtip { background: #fbe3e3; color: #c6302f; }

/* =====================================================================
   v491 手机端（窄屏）专属
   ① 右侧缩放 ＋/级数/－ 透明连体竖条，整体上移到分区条上方，大手指好按；
   ② toast 提示气泡上抬，高过分区条/键盘/功能面板，不压住控制面板。
   电脑宽屏不覆盖（仍用 Leaflet 默认右上控件）。
   ===================================================================== */
@media (max-width: 900px) {
  /* v495 缩放：＋/级数/－ 连体深色毛玻璃竖条（专用 class 压过 Leaflet 默认白底方块），
     右侧、抬到分区条上方、大手指好按；键盘/功能面板/系统拼音态整体上抬避让，按住可连缩 */
  body.ui2 .leaflet-control-zoom.u2-zoombar {
    position: fixed !important; top: auto !important; right: 12px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 132px);
    margin: 0 !important; padding: 0 !important; border: none !important;
    width: 44px; border-radius: 18px; overflow: hidden;
    background: rgba(16, 36, 64, .42);
    box-shadow: 0 6px 18px rgba(8, 26, 52, .30), inset 0 1px 0 rgba(255, 255, 255, .12);
    backdrop-filter: blur(9px) saturate(1.2); -webkit-backdrop-filter: blur(9px) saturate(1.2);
  }
  body.ui2 .u2-zoombar a {
    display: flex; align-items: center; justify-content: center;
    width: 44px !important; height: 44px !important; line-height: 1 !important; min-width: 0;
    padding: 0 !important; margin: 0 !important;
    border: none !important; border-radius: 0 !important; background: transparent !important;
    color: #fff !important; font-size: 26px !important; font-weight: 700 !important;
  }
  body.ui2 .u2-zoombar a + a { border-top: 1px solid rgba(255, 255, 255, .18) !important; }
  body.ui2 .u2-zoombar a:first-child { border-radius: 18px 18px 0 0 !important; }
  body.ui2 .u2-zoombar a:last-child { border-radius: 0 0 18px 18px !important; }
  body.ui2 .u2-zoombar a:active { background: rgba(21, 101, 192, .6) !important; }
  body.ui2 .u2-zoombar a.leaflet-control-zoom-level {
    height: 30px !important; font-size: 14px !important; font-weight: 800 !important;
    color: #cfe4ff !important; background: rgba(255, 255, 255, .08) !important; cursor: default;
  }
  body.ui2.u2-kb .u2-zoombar { bottom: calc(var(--u2-kbh) + var(--u2-kbpad) + 12px); }
  body.ui2.u2-plus .u2-zoombar { bottom: calc(var(--u2-plush) + var(--u2-kbpad) + 12px); }
  body.ui2.u2-syskb .u2-zoombar { bottom: calc(var(--sys-kbh, 0px) + env(safe-area-inset-bottom, 0px) + 96px); }
  /* toast 提示气泡：常态抬到分区条上方，键盘/功能面板态抬到面板上方，与面板留缝不相连 */
  body.ui2 #app-toast { bottom: calc(env(safe-area-inset-bottom, 0px) + 140px); }
  body.ui2.u2-kb #app-toast { bottom: calc(var(--u2-kbh) + var(--u2-kbpad) + 16px); }
  body.ui2.u2-plus #app-toast { bottom: calc(var(--u2-plush) + var(--u2-kbpad) + 16px); }
}

/* =====================================================================
   v542 三道杠左侧导航抽屉（手机语音皮肤）
   胶囊最左相机位改为三道杠；点击变色、左滑出抽屉；点遮罩或再点三道杠关闭。
   深蓝科技风，与手机工具箱抽屉一致；模态遮罩盖住地图与右侧悬浮钮，
   打开时把整条胶囊提到遮罩之上，保证三道杠可再次点击关闭。
   ===================================================================== */
.u2-menu { background: #eaf3fe; border-color: #c7dff7; color: var(--u2-blue); }
#u2-menu.on {
  background: var(--u2-blue); border-color: var(--u2-blue); color: #fff;
  box-shadow: 0 4px 12px rgba(21, 101, 192, .42);
}
#u2-nav-mask {
  position: fixed; inset: 0; z-index: 1500;
  background: rgba(2, 10, 22, .5);
  opacity: 0; pointer-events: none; transition: opacity .22s ease;
}
body.u2-nav #u2-nav-mask { opacity: 1; pointer-events: auto; }
#u2-nav {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 1560;
  width: min(300px, 84vw);
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #0e2238 0%, #0a1a2e 100%);
  color: #e8f2fe;
  transform: translateX(-102%); transition: transform .24s ease;
  padding: calc(14px + env(safe-area-inset-top)) 12px
    calc(96px + env(safe-area-inset-bottom));
  box-shadow: 0 0 40px rgba(0, 0, 0, .5);
}
body.u2-nav #u2-nav { transform: none; }
body.u2-nav #ui2-dock { z-index: 1600; }
.u2-nav-head {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 8px 14px; font-size: 16px; font-weight: 800;
  color: #cfe6ff; letter-spacing: .5px;
}
.u2-nh-bar { width: 4px; height: 17px; border-radius: 2px; background: linear-gradient(#38bdf8, #1565c0); }
.u2-nav-list {
  flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch;
  display: flex; flex-direction: column; gap: 3px;
}
.u2-nav-item {
  display: flex; align-items: center; gap: 13px; width: 100%;
  border: 0; background: transparent; color: #d7e6f7;
  padding: 13px 12px; border-radius: 12px;
  font-size: 16px; font-weight: 600; text-align: left;
  font-family: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.u2-nav-item svg { width: 23px; height: 23px; flex: 0 0 23px; color: #67e8f9; }
.u2-nav-item:active { background: rgba(56, 189, 248, .16); }
.u2-nav-sep { height: 1px; margin: 7px 10px; background: rgba(148, 184, 222, .16); }

/* v690 右侧常驻拍照取证悬浮相机钮（一键拍照，海上右手拇指区；键盘/功能面板/抽屉打开时隐藏） */
#u2-photo-fab {
  position: fixed; right: 10px; bottom: 402px; z-index: 1190;
  width: 54px; height: 54px; border-radius: 50%;
  background: linear-gradient(135deg, #2f6fed, #1d4ed8);
  border: 2px solid rgba(255, 255, 255, .88);
  box-shadow: 0 4px 14px rgba(2, 12, 28, .45);
  display: flex; align-items: center; justify-content: center;
  padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
#u2-photo-fab svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#u2-photo-fab:active { transform: scale(.92); }
body.ui2.u2-kb #u2-photo-fab,
body.ui2.u2-syskb #u2-photo-fab,
body.ui2.u2-plus #u2-photo-fab,
body.ui2.u2-nav #u2-photo-fab { display: none; }
