:root {
  --heading: #1a2433;
  --kicker: #1f86e8;
  --text: #243044;
  --muted: #6a7788;
  --bg: #eef2f7;
  --sidebar: #e4eef8;
  --card: #fff;
  --border: #d5dfea;
  --control: #f3f6fa;
  --hover-border: #b5c5d8;
  --soft: #dde9f7;
  --soft-border: #b7cce6;
  --phase: #f5f8fc;
  --phase-line: #e2eaf3;
  --danger: #c34b4b;
  --danger-bg: #fdeeee;
  --ok: #2f7d4a;
  --ok-bg: #e7f6ec;
  --commerce: #e9f5fc;
  --booking: #fff8e8;
  --status: #eef6ea;
  --radius: 14px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 10px 28px rgba(26, 36, 56, 0.12);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 Inter, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none;
  user-select: none;
}
/* 界面文字不让划选（Ctrl+A、拖动会把整页刷蓝）；只有输入框、日志、修改记录、AI 对话可以选中复制 */
input, textarea, [contenteditable="true"], .log-card, .trail-card, .ai-panel {
  -webkit-user-select: text;
  user-select: text;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.boot-splash {
  position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: radial-gradient(circle at 30% 25%, #f1f7ff 0, #dfeafa 55%, #cddff5 100%);
  color: var(--heading); font-size: 20px; font-weight: 800; letter-spacing: 1px;
  animation: splash-in .25s ease .15s both;
}
.boot-splash img { width: min(220px, 60vw); height: auto; object-fit: contain; animation: splash-breathe 1.6s ease-in-out infinite; }
@keyframes splash-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes splash-breathe { 50% { transform: scale(1.06); opacity: .85; } }

.kicker {
  margin: 0 0 6px;
  color: var(--kicker);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
}
h1, h2 { margin: 0; color: var(--heading); font-weight: 700; }
h1 { font-size: 24px; line-height: 1.3; }
h2 { font-size: 18px; }
.help-tip {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; margin-left: 8px; vertical-align: 3px;
  border: 1.5px solid #b8c3d0; border-radius: 50%; color: var(--muted);
  font-size: 12px; font-weight: 800; line-height: 1; cursor: help; outline: none;
}
.help-tip:hover, .help-tip:focus-visible { border-color: var(--kicker); color: var(--kicker); }
.help-tip::after {
  content: attr(data-tip); position: absolute; left: -8px; top: calc(100% + 8px); z-index: 40;
  width: 300px; padding: 10px 12px; border-radius: 10px; background: #1f2a37; color: #fff;
  font-size: 12.5px; font-weight: 500; line-height: 1.6; letter-spacing: 0; white-space: normal;
  box-shadow: 0 10px 28px rgba(15, 30, 50, .22); opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .15s, transform .15s, visibility .15s;
}
.help-tip:hover::after, .help-tip:focus::after { opacity: 1; visibility: visible; transform: none; }
@media (max-width: 900px) { .help-tip { display: none; } }
.sub { margin: 6px 0 0; max-width: 40rem; color: var(--muted); font-size: 14px; }

.login-gate {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(280px, 1.1fr) minmax(320px, 0.9fr);
  background: #f4f7fb;
}
.login-hero {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.92) 0%, rgba(232, 242, 252, 0.55) 36%, transparent 62%),
    linear-gradient(165deg, #eef5fc 0%, #d7e7f8 52%, #c4dbf4 100%);
}
.login-stage {
  position: relative;
  width: min(460px, 78%);
  height: min(420px, 56vh);
  display: flex; align-items: center; justify-content: center;
}
.login-rings { position: absolute; inset: 0; pointer-events: none; }
.login-rings span {
  position: absolute; left: 50%; top: 50%;
  border: 1px solid rgba(90, 132, 176, 0.22); border-radius: 50%;
  transform: translate(-50%, -50%);
}
.login-rings span:nth-child(1) { width: 58%; height: 58%; }
.login-rings span:nth-child(2) { width: 74%; height: 74%; }
.login-rings span:nth-child(3) { width: 90%; height: 90%; }
.login-rings span:nth-child(4) { width: 108%; height: 108%; border-color: rgba(90, 132, 176, 0.14); }
.login-logo {
  position: relative; z-index: 1;
  width: min(380px, 80%); height: auto; object-fit: contain; background: transparent;
  filter: drop-shadow(0 10px 28px rgba(31, 134, 232, 0.14));
}
.login-hero-sub { position: relative; z-index: 1; margin: 0; color: var(--muted); font-size: 15px; }
.user-avatar {
  display: grid; place-items: center;
  width: 52px; height: 52px; border-radius: 16px;
  background: var(--kicker); color: #fff; font-weight: 700; font-size: 22px;
}
.login-side {
  display: flex; align-items: center; justify-content: center;
  padding: 32px 20px; background: #f4f7fb;
}
.login-card {
  width: min(400px, 100%);
  padding: 28px 28px 24px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 18px 48px rgba(26, 36, 56, 0.10);
}
.login-card h2 { margin: 0 0 8px; font-size: 28px; }
.login-card .sub { max-width: none; margin-bottom: 18px; }
.login-submit { width: 100%; margin-top: 8px; }
.login-remember { display: flex; align-items: center; gap: 8px; margin: 2px 0 10px; color: var(--muted); font-size: 13px; cursor: pointer; user-select: none; }
.login-download { display: block; margin-top: 14px; text-align: center; color: var(--primary, #1f86e8); font-size: 13px; font-weight: 600; text-decoration: none; }
.login-download:hover { text-decoration: underline; }
.login-remember input { width: 16px; height: 16px; margin: 0; accent-color: var(--primary, #1f86e8); cursor: pointer; }
.login-sdledu { margin-top: 14px; }
.login-or {
  display: flex; align-items: center; gap: 12px; margin: 4px 0 12px;
  color: var(--muted); font-size: 12px;
}
.login-or::before, .login-or::after {
  content: ""; flex: 1; height: 1px; background: rgba(90, 132, 176, 0.22);
}
.login-sdledu-btn {
  width: 100%;
  background: #fff;
  color: #1a4f7a;
  border: 1px solid rgba(31, 134, 232, 0.45);
  font-weight: 600;
}
.login-sdledu-btn:hover { background: #f3f8fd; border-color: #1f86e8; }
.login-sdledu-btn:disabled { opacity: 0.65; cursor: wait; }
.login-sdledu-hint { margin: 10px 0 0; color: var(--muted); font-size: 13px; text-align: center; line-height: 1.5; }
.login-sdledu-web { display: block; margin: 6px auto 0; padding: 0; border: 0; background: none; color: #1f86e8; font-size: 12px; text-decoration: underline; cursor: pointer; }
.login-sdledu-web[hidden] { display: none; }
.login-sdledu-cancel {
  width: 100%; margin-top: 10px; background: transparent; color: var(--muted);
  border: 1px solid rgba(90, 132, 176, 0.28); font-weight: 500;
}
.desk {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
  padding: 10px;
  gap: 10px;
  overflow-x: clip;
  transition: grid-template-columns .36s var(--ease), column-gap .36s var(--ease);
}
.desk.is-collapsed { grid-template-columns: 0px minmax(0, 1fr); column-gap: 0; }
.sidebar {
  position: sticky; top: 10px; align-self: start;
  width: 248px;
  height: calc(100vh - 20px);
  transition: transform .36s var(--ease), opacity .28s ease, visibility 0s linear 0s;
  display: flex; flex-direction: column;
  padding: 18px 14px 12px;
  border-radius: 18px;
  background: var(--sidebar);
}
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 2px 8px 16px;
  color: var(--heading); font-size: 17px; font-weight: 700;
}
.desk.is-collapsed .sidebar {
  transform: translateX(calc(-100% - 12px)); opacity: 0; visibility: hidden; pointer-events: none;
  transition: transform .36s var(--ease), opacity .28s ease, visibility 0s linear .36s;
}
.brand-logo { display: block; width: 132px; height: auto; object-fit: contain; background: transparent; }
.side-toggle {
  display: inline-grid; place-items: center; flex: 0 0 auto;
  width: 30px; height: 30px; padding: 0; margin-left: auto;
  border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--muted);
  cursor: pointer; transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
}
.side-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.side-toggle:hover { background: rgba(255,255,255,.75); color: var(--kicker); box-shadow: 0 1px 3px rgba(20, 60, 110, .12); }
.side-toggle:active { transform: scale(.94); }
.side-toggle:focus-visible { outline: 2px solid var(--kicker); outline-offset: 1px; }
.side-expand {
  width: 0; margin: 0 -12px 0 0; opacity: 0; overflow: hidden; pointer-events: none;
  border-color: var(--border); background: #fff;
  transform: translateX(-8px);
  transition: width .36s var(--ease), margin .36s var(--ease), opacity .2s ease, transform .36s var(--ease), background .15s, color .15s, border-color .15s;
}
.desk.is-collapsed .side-expand {
  width: 30px; margin: 0 2px 0 -6px; opacity: 1; pointer-events: auto; transform: none;
  transition: width .36s var(--ease), margin .36s var(--ease), opacity .24s ease .12s, transform .36s var(--ease) .06s, background .15s, color .15s, border-color .15s;
}
.side-expand:hover { background: var(--soft); border-color: var(--kicker); }
html.is-client .desk.is-collapsed ~ #cabin-chrome .cabin-drag { margin-left: 64px; }
.user-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--soft); color: var(--kicker); font-size: 14px; }
.nav-label { margin: 8px 10px 6px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; }
.nav-link, .tabbar button {
  display: flex; align-items: center;
  width: 100%; margin: 0 0 4px; padding: 8px 10px;
  border: 1px solid transparent; border-radius: 12px;
  background: transparent; color: var(--heading); font-weight: 600; text-align: left;
}
.nav-link:hover { background: rgba(255,255,255,.55); }
.nav-link.is-active, .tabbar button.is-active { background: #fff; color: var(--kicker); }
.sidebar-foot { margin-top: auto; }
.user-card {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 8px; border: 0; border-radius: 14px; background: #fff; text-align: left;
}
.user-copy { min-width: 0; display: flex; flex-direction: column; }
.user-name { color: var(--heading); font-weight: 700; }
.user-meta { color: var(--muted); font-size: 12px; }
.user-menu { position: relative; }
.side-tools {
  position: absolute; left: 0; right: 0;
  bottom: calc(100% + 8px); z-index: 6;
  display: grid; gap: 2px; padding: 8px;
  border-radius: 14px; background: #fff;
  box-shadow: var(--shadow);
  animation: pop-in .22s var(--ease) both;
}
.side-link {
  width: 100%; min-height: 32px; padding: 0 10px;
  border: 0; border-radius: 10px; background: transparent;
  color: var(--heading); font-weight: 600; font-size: 14px; text-align: left;
}
.side-link:hover { background: var(--soft); color: var(--kicker); }
#logoutBtn:hover { background: var(--danger-bg); color: var(--danger); }

.desk-main {
  min-width: 0; height: calc(100vh - 20px);
  background: var(--card); border-radius: 18px; overflow: auto;
}
.navbar { height: 52px; border-bottom: 1px solid var(--phase-line); }
.navbar-inner { height: 100%; padding: 0 20px; display: flex; align-items: center; gap: 10px; }
.brand-page { color: var(--heading); font-weight: 700; }
.ident-switch {
  position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; align-items: center;
  height: 32px; min-width: 188px; margin-left: 14px; padding: 3px;
  border: 1px solid #d5deea; border-radius: 999px; background: #f2f5f8;
  cursor: pointer; color: #8a97a6;
}
.ident-switch[hidden] { display: none; }
.ident-switch span {
  position: relative; z-index: 1; padding: 0 12px; font-size: 13px; font-weight: 700;
  white-space: nowrap; text-align: center;
}
.ident-knob {
  position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px);
  border-radius: 999px; background: #fff; box-shadow: 0 1px 4px rgba(26, 36, 51, .16);
  transition: transform .18s ease;
}
.ident-switch[aria-pressed="false"] span:first-of-type,
.ident-switch[aria-pressed="true"] span:last-of-type { color: var(--heading); }
.ident-switch[aria-pressed="true"] .ident-knob { transform: translateX(100%); }
.ident-switch:hover { border-color: #b9cbe0; }
.nav-reload {
  display: inline-flex; align-items: center; gap: 6px; margin-left: auto; margin-right: 140px; height: 30px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 999px; background: #fff; color: var(--text); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: background .12s, color .12s, border-color .12s;
}
.nav-reload svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav-reload:hover { border-color: var(--kicker); color: var(--kicker); }
.past-alert {
  display: inline-flex; align-items: center; gap: 6px; margin-left: auto; height: 30px; max-width: 320px; padding: 0 12px;
  border: 1px solid #f2b27a; border-radius: 999px; background: #fff3e6; color: #b45309;
  font-size: 13px; font-weight: 700; white-space: nowrap; cursor: pointer;
}
.past-alert[hidden] { display: none; }
.past-alert svg { flex: none; width: 15px; height: 15px; }
.past-alert span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.past-alert:hover { background: #ffe8cf; }
.past-alert-m {
  display: none; position: fixed; z-index: 14; left: 12px; bottom: calc(112px + env(safe-area-inset-bottom));
  align-items: center; gap: 6px; height: 34px; max-width: 62vw; padding: 0 12px;
  border: 1px solid #f2b27a; border-radius: 999px; background: rgba(255, 243, 230, .97); color: #b45309;
  font-size: 13px; font-weight: 700; white-space: nowrap; cursor: pointer; box-shadow: 0 8px 20px rgba(180, 83, 9, .18);
}
.past-alert-m svg { flex: none; width: 15px; height: 15px; }
.past-alert-m span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nav-reload.is-spinning svg { animation: reload-spin .7s linear infinite; }
@keyframes reload-spin { to { transform: rotate(360deg); } }
.update-modal { z-index: 2147482000; background: rgba(15, 23, 42, .55); backdrop-filter: blur(3px); }
.update-card { width: min(440px, calc(100vw - 24px)); }
.update-hero { display: flex; align-items: center; gap: 14px; padding: 20px 20px 12px; }
.update-hero img { width: 84px; height: auto; object-fit: contain; }
.update-hero h2 { margin: 0; font-size: 18px; }
.update-hero p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.update-body { display: grid; gap: 12px; padding: 0 20px 16px; }
.update-notes { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--phase); color: var(--text); font-size: 13px; line-height: 1.6; white-space: pre-wrap; }
.update-progress p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.update-bar { height: 8px; border-radius: 999px; background: #e6ebf2; overflow: hidden; }
.update-bar span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--kicker); transition: width .25s; }
.update-foot [hidden] { display: none; }
.page { padding: 16px 16px 28px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.page-actions, .drawer-actions, .panel-actions, .inline-form, .path-row { display: flex; flex-wrap: wrap; gap: 8px; }
.page-actions { justify-content: flex-end; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 36px; padding: 7px 16px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--card); color: var(--heading); font-weight: 600; font-size: 14px; text-decoration: none;
}
.btn:hover { border-color: var(--hover-border); background: var(--phase); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { border-color: var(--kicker); background: var(--kicker); color: #fff; }
.btn-primary:hover { filter: brightness(1.06); background: var(--kicker); }
.btn.is-danger { color: var(--danger); border-color: #f3c4c6; }
.btn.is-danger:hover { background: var(--danger-bg); }
.icon-btn {
  width: 36px; height: 36px; border: 0; border-radius: 10px; background: var(--control); color: var(--heading); font-size: 22px;
}

.form-message, .conflict {
  margin: 0 0 12px; padding: 8px 12px; border-radius: var(--radius-sm);
  border: 1px solid #f3c4c6; background: var(--danger-bg); color: var(--danger); font-size: 14px;
}
.form-message.is-ok { border-color: var(--soft-border); background: var(--soft); color: var(--kicker); }
.control { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 13px; font-weight: 600; }
.control input, .control select, .control textarea, .inline-form input, .user-form input, .user-form select, .filters input, .filters select {
  width: 100%; min-height: 36px; padding: 6px 10px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--control); color: var(--text); font-weight: 500;
}
.control textarea {
  min-height: 72px; resize: vertical; white-space: pre-wrap; line-height: 1.55; overflow: hidden;
}
.span-all { grid-column: 1 / -1; }
.control input:focus, .control select:focus, .control textarea:focus, .filters input:focus, .filters select:focus {
  outline: 2px solid rgba(61,130,214,.35); border-color: var(--kicker); background: #fff;
}
.login-card .control { margin-bottom: 12px; }

.pick { position: relative; min-width: 0; }
.pick-native {
  position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none;
}
.pick-btn {
  width: 100%; min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 12px; border: 1px solid var(--border); border-radius: 10px;
  background: #fff; color: var(--heading); font-weight: 600; text-align: left;
}
.pick-btn span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-btn .is-placeholder { color: var(--muted); font-weight: 500; }
.pick-btn::after {
  content: ""; flex: none; width: 7px; height: 7px; margin-top: -3px;
  border-right: 2px solid #7b8796; border-bottom: 2px solid #7b8796;
  transform: rotate(45deg);
}
.pick.is-open .pick-btn { border-color: var(--kicker); box-shadow: 0 0 0 3px rgba(31, 134, 232, .16); }
.pick.is-open .pick-btn::after { margin-top: 2px; transform: rotate(225deg); }
.pick-menu {
  position: fixed; z-index: 60; padding: 6px;
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 14px 36px rgba(26, 36, 51, .16);
  max-height: min(340px, 60vh); overflow: auto;
}
.pick-opt {
  white-space: nowrap;
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 34px; padding: 6px 10px; border: 0; border-radius: 8px;
  background: transparent; color: var(--heading); font-weight: 600; text-align: left;
}
.pick-opt:hover { background: #e8f3fd; }
.pick-opt.is-on { background: #e7f2fc; color: #1565b0; }
.pick-opt.is-on::after {
  content: ""; width: 6px; height: 10px; flex: none;
  border-right: 2px solid #1f86e8; border-bottom: 2px solid #1f86e8; transform: rotate(45deg);
}
.pick.is-multi .pick-opt { justify-content: flex-start; gap: 9px; }
.pick.is-multi .pick-opt.is-on { background: transparent; color: var(--heading); }
.pick.is-multi .pick-opt:hover { background: #e8f3fd; }
.pick.is-multi .pick-opt.is-on::after { content: none; }
.pick-box {
  position: relative; flex: none; width: 16px; height: 16px;
  border: 1.5px solid #b9c4d1; border-radius: 5px; background: #fff;
  transition: background .12s, border-color .12s;
}
.pick-opt.is-on .pick-box { border-color: #1f86e8; background: #1f86e8; }
.pick-opt.is-part .pick-box { border-color: #1f86e8; background: #eaf3fd; }
.pick-opt.is-part .pick-box::after {
  content: ""; position: absolute; left: 3px; top: 5.5px; width: 7px; height: 2px; border-radius: 1px; background: #1f86e8;
}
.pick-opt.is-on .pick-box::after {
  content: ""; position: absolute; left: 4.5px; top: 1.5px; width: 4px; height: 8px;
  border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg);
}
.pick-count {
  flex: none; min-width: 18px; height: 18px; padding: 0 5px; margin-left: auto; margin-right: -2px;
  border-radius: 9px; background: #1f86e8; color: #fff;
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}
.dt-field { position: relative; display: block; min-width: 0; }
.dt-field > input { padding-right: 32px; }
.dt-ico {
  position: absolute; top: 50%; right: 9px; width: 16px; height: 16px; transform: translateY(-50%);
  border: 1.6px solid #7b8796; border-radius: 3px; cursor: pointer;
}
.dt-ico::before {
  content: ""; position: absolute; left: -1.6px; right: -1.6px; top: 3px; border-top: 1.6px solid #7b8796;
}
.dt-ico::after {
  content: ""; position: absolute; left: 3px; top: -4px; width: 5px; height: 3px;
  border-left: 1.6px solid #7b8796; border-right: 1.6px solid #7b8796;
}
.dt-field.is-open > input { border-color: var(--kicker); background: #fff; box-shadow: 0 0 0 3px rgba(31, 134, 232, .16); }
.dt-field.is-open .dt-ico, .dt-field.is-open .dt-ico::before, .dt-field.is-open .dt-ico::after { border-color: var(--kicker); }
.dt-field.is-bad > input { border-color: var(--danger); background: var(--danger-bg); }
.dt-field.is-pending > input { border-color: #f5c27a; }
.dt-field.is-pending::after {
  content: "待补时分"; position: absolute; top: -4px; right: 0; transform: translateY(-100%);
  padding: 1px 6px; border-radius: 999px; background: #fff1d6; color: #b45309;
  font-size: 11px; font-weight: 700; line-height: 16px; pointer-events: none; white-space: nowrap;
}
.dt-pop {
  position: fixed; z-index: 60; display: flex; flex-direction: column; gap: 8px;
  padding: 10px; background: #fff; border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 18px 44px rgba(26, 36, 51, .18);
}
.dt-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.dt-quick button {
  min-height: 28px; padding: 0 10px; border: 1px solid var(--border); border-radius: 999px;
  background: #fff; color: var(--heading); font-size: 12px; font-weight: 700;
}
.dt-quick button:hover { border-color: var(--kicker); color: var(--kicker); background: #eef5fc; }
.dt-body { display: flex; gap: 10px; }
.dt-cal { flex: 1; min-width: 0; }
.dt-cal .date-day { height: 34px; }
.dt-cal .date-day:hover span { background: #eef5fc; }
.dt-cal .date-day.is-start:hover span { background: #1f86e8; }
.dt-time { width: 120px; flex: none; display: flex; flex-direction: column; border-left: 1px solid var(--phase-line); padding-left: 10px; }
.dt-time-head { display: grid; grid-template-columns: 1fr 1fr; height: 32px; align-items: center; text-align: center; color: #9aa6b4; font-size: 12px; font-weight: 700; }
.dt-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.dt-col { height: 246px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding-right: 2px; scrollbar-width: thin; }
.dt-col button {
  flex: none; height: 28px; border: 0; border-radius: 8px; background: transparent;
  color: var(--heading); font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums;
}
.dt-col button:hover { background: #eef5fc; }
.dt-col button.is-on { background: #1f86e8; color: #fff; }
.dt-col button.is-past { color: #c9d1da; text-decoration: line-through; cursor: not-allowed; }
.dt-col button.is-past:hover { background: transparent; }
.dt-pop .date-day.is-past { color: #c9d1da; cursor: not-allowed; }
.dt-pop .date-day.is-past span { text-decoration: line-through; }
.dt-pop .date-day.is-past:hover::after { display: none; }
.dt-pop .date-cal-bar button:disabled { color: #d3dae2; cursor: not-allowed; background: transparent; }
.dt-foot { display: flex; align-items: center; gap: 8px; padding-top: 8px; border-top: 1px solid var(--phase-line); }
.dt-foot .btn { min-height: 30px; padding: 3px 12px; font-size: 13px; }
.dt-preview { flex: 1; min-width: 0; color: var(--heading); font-weight: 700; font-variant-numeric: tabular-nums; }
.dt-preview.is-empty { color: var(--muted); font-weight: 500; }
.dt-foot .dt-cancel { display: none; }
@media (max-width: 900px) { .dt-foot .dt-cancel { display: inline-flex; } }
.suggest { position: relative; display: block; min-width: 0; }
.suggest > input { padding-right: 30px; }
.suggest-btn {
  position: absolute; top: 1px; right: 1px; bottom: 1px; width: 28px;
  border: 0; border-radius: 0 8px 8px 0; background: transparent;
}
.suggest-btn::after {
  content: ""; display: block; width: 7px; height: 7px; margin: -4px auto 0;
  border-right: 2px solid #7b8796; border-bottom: 2px solid #7b8796; transform: rotate(45deg);
}
.suggest.is-open > input { border-color: var(--kicker); background: #fff; box-shadow: 0 0 0 3px rgba(31, 134, 232, .16); }
.suggest.is-open .suggest-btn::after { margin-top: 2px; transform: rotate(225deg); }
.suggest-menu {
  position: fixed; z-index: 60; display: flex; flex-direction: column; gap: 6px;
  padding: 8px; background: #fff; border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 16px 40px rgba(26, 36, 51, .16);
}
.suggest-search {
  display: flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 8px;
  border: 1px solid var(--border); border-radius: 8px; background: #f5f8fb;
}
.suggest-search:focus-within { border-color: var(--kicker); background: #fff; box-shadow: 0 0 0 3px rgba(31, 134, 232, .12); }
.suggest-search svg { flex: none; width: 14px; height: 14px; color: #7b8796; }
.suggest-search input,
.control .suggest-search input {
  width: 100%; min-height: 32px; padding: 0; border: 0; border-radius: 0;
  background: transparent; box-shadow: none; outline: none; font-weight: 500;
}
.control .suggest-search input:focus { outline: none; border: 0; background: transparent; box-shadow: none; }
.suggest-list { max-height: 220px; overflow: auto; display: grid; gap: 2px; }
.suggest-opt {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 34px; padding: 6px 10px; border: 0; border-radius: 8px;
  background: transparent; color: var(--heading); font-weight: 600; text-align: left;
}
.suggest-opt mark { padding: 0 1px; border-radius: 3px; background: #ffe8a3; color: inherit; }
.suggest-opt:hover, .suggest-opt.is-active { background: #e8f3fd; }
.suggest-opt.is-on { background: #e7f2fc; color: #1565b0; }
.suggest-opt.is-on::after {
  content: ""; width: 6px; height: 10px; flex: none;
  border-right: 2px solid #1f86e8; border-bottom: 2px solid #1f86e8; transform: rotate(45deg);
}
.suggest-empty { margin: 0; padding: 8px 10px; color: var(--muted); font-size: 13px; font-weight: 500; }
.filters { display: grid; grid-template-columns: minmax(180px, 1.5fr) minmax(148px, .8fr) minmax(188px, .85fr) repeat(2, minmax(112px, .55fr)); gap: 8px; margin-bottom: 12px; }
.etd-pick .pick-btn { font-weight: 600; color: var(--heading); }
.etd-pick.is-on .pick-btn { border-color: #f1c58f; background: #fff7ec; color: #a8530b; }
.etd-peek {
  margin-left: 10px; padding: 1px 10px; border: 1px solid #f1c58f; border-radius: 999px;
  background: #fff7ec; color: #a8530b; font-size: 12px; font-weight: 600; cursor: pointer;
}
.etd-peek:hover { background: #ffedd6; }
.sheet-empty .etd-peek, .cards .empty .etd-peek { margin: 10px 0 0; padding: 5px 14px; font-size: 13px; }
.m-filter-row { display: contents; }
.m-filter-row.is-solo { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px; }
.m-filter-row .pick:not(.etd-pick).is-on .pick-btn { border-color: #9cc8f2; background: #eef6ff; color: #1d6fbf; }
.date-filter-btn {
  width: 100%; min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 12px; border: 1px solid var(--border); border-radius: 10px;
  background: #fff; color: var(--heading); font-weight: 600; text-align: left;
}
.date-filter-btn span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.date-filter-btn .is-placeholder { color: var(--muted); font-weight: 500; }
.date-filter-btn::after {
  content: ""; flex: none; width: 7px; height: 7px; margin-top: -3px;
  border-right: 2px solid #7b8796; border-bottom: 2px solid #7b8796; transform: rotate(45deg);
}
.date-filter-btn.is-on { border-color: #b7d7f5; background: #f3f9fe; color: #1565b0; }
.date-filter-btn.is-open { border-color: var(--kicker); box-shadow: 0 0 0 3px rgba(31, 134, 232, .16); }
.date-filter-btn.is-open::after { margin-top: 2px; transform: rotate(225deg); }
.date-pop {
  position: fixed; z-index: 70; display: flex; width: min(640px, calc(100vw - 16px));
  background: #fff; border: 1px solid var(--border); border-radius: 16px;
  box-shadow: 0 18px 48px rgba(26, 36, 56, .16); overflow: hidden;
}
.date-quick {
  width: 168px; flex: none; display: flex; flex-direction: column; gap: 2px;
  padding: 14px 10px 12px; background: #f6f8fb; border-right: 1px solid var(--phase-line);
}
.date-kicker { margin: 0 8px 8px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.date-kicker span { margin-left: 6px; color: #b0bac6; font-weight: 600; }
.date-quick-list { display: flex; flex-direction: column; gap: 2px; }
.date-quick-list button, .date-clear {
  width: 100%; border: 0; border-radius: 10px; background: transparent; text-align: left; color: var(--heading);
}
.date-quick-list button { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 52px; padding: 10px 12px; font-size: 15px; font-weight: 700; }
.date-quick-list button small { color: var(--muted); font-size: 12px; font-weight: 500; }
.date-quick-list button.is-on { background: #fff; color: #1565b0; box-shadow: 0 1px 4px rgba(26, 36, 56, .08); }
.date-quick-list button.is-on small { color: #5d8fbe; }
.date-clear { margin-top: auto; padding: 10px; color: var(--muted); font-weight: 600; }
.date-clear:hover { color: var(--danger); background: var(--danger-bg); }
.date-main { flex: 1; min-width: 0; padding: 16px 16px 14px; }
.date-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.date-head strong { display: block; font-size: 16px; color: var(--heading); }
.date-head p, .date-hint { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.date-mode { display: flex; padding: 3px; border-radius: 999px; background: #eef2f6; }
.date-mode button {
  min-width: 52px; min-height: 28px; padding: 0 12px; border: 0; border-radius: 999px;
  background: transparent; color: var(--muted); font-weight: 700; font-size: 13px;
}
.date-mode button.is-on { background: #fff; color: var(--heading); box-shadow: 0 1px 3px rgba(26, 36, 56, .12); }
.date-fields { display: flex; align-items: flex-end; gap: 8px; margin-top: 14px; }
.date-field { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 12px; font-weight: 600; }
.date-field input {
  width: 100%; min-height: 36px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 10px;
  background: #fff; color: var(--heading); font-weight: 700;
}
.date-field input.is-empty { color: #b0bac6; font-weight: 500; }
.date-arrow { padding-bottom: 8px; color: #9aa6b4; }
.date-span {
  flex: none; min-width: 46px; margin-bottom: 4px; padding: 6px 8px; border-radius: 10px;
  background: #e8f6ee; color: #1f7a45; font-size: 12px; font-weight: 800; text-align: center;
}
.date-cal { margin-top: 8px; }
.date-cal-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.date-cal-bar strong { font-size: 15px; letter-spacing: .04em; }
.date-cal-bar button {
  width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--heading); font-size: 20px;
}
.date-cal-bar button:hover { background: var(--control); }
.date-week, .date-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.date-week span { text-align: center; color: #9aa6b4; font-size: 12px; font-weight: 700; padding: 4px 0; }
.date-day {
  position: relative; z-index: 0; height: 36px; border: 0; background: transparent; color: var(--heading); font-weight: 650; font-size: 13px;
}
.date-day.is-out { color: #c5ced8; }
.date-day.is-future { color: #c9d1da; cursor: not-allowed; }
.date-day.is-future span { opacity: .55; }
.date-day.is-in::before, .date-day.is-start::before, .date-day.is-end::before {
  content: ""; position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 0; right: 0; background: #e7f3fd;
}
.date-day.is-start::before { left: 50%; }
.date-day.is-end::before { right: 50%; }
.date-day.is-start.is-end::before { display: none; }
.date-day.is-today:not(.is-start):not(.is-end) { box-shadow: inset 0 0 0 1px #b7d4f0; border-radius: 999px; }
.date-day span {
  position: relative; z-index: 1; display: inline-flex; width: 30px; height: 30px;
  align-items: center; justify-content: center; border-radius: 999px;
}
.date-day.is-start span, .date-day.is-end span { background: #1f86e8; color: #fff; }
.date-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.table-wrap { overflow: auto; max-height: calc(100vh - 276px); border: 1px solid var(--border); border-radius: var(--radius); }
table { border-collapse: collapse; width: max-content; min-width: 100%; font-size: 13px; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--phase-line); white-space: nowrap; text-align: left; }
th { color: var(--heading); font-weight: 700; background: var(--phase); }
th.commerce, td.commerce { background: var(--commerce); }
th.booking, td.booking { background: var(--booking); }
th.status, td.status { background: var(--status); }
tbody tr { cursor: pointer; }
tbody tr:hover td { background-image: linear-gradient(rgba(26, 36, 51, .045), rgba(26, 36, 51, .045)); }
.sticky { position: sticky; left: 0; z-index: 1; }
td.sticky { background: #fff; }
th.sticky { z-index: 2; }
.chip {
  display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px;
  border-radius: 999px; background: var(--soft); color: var(--kicker); font-size: 12px; font-weight: 700;
}
.chip.is-done { background: var(--ok-bg); color: var(--ok); }
.chip.is-no { background: var(--danger-bg); color: var(--danger); }
.chip.is-wait { background: #fff6e8; color: #9a6b12; }
.chip.is-new { background: #eef1f5; color: #5b6878; }
.chip.is-fwd { background: #e8f1fd; color: #1d6fbf; }
.chip.is-part { background: #f1ebfd; color: #6d3fc0; }
.chip.is-reply { background: #e6f6f4; color: #137a6d; }
.chip.is-talk { background: #fff1e6; color: #b5541a; }
.chip.is-ok { background: #e3f4ea; color: #24804a; }
.chip.is-partdone { background: #eef6d9; color: #5f7d14; }
.adopt {
  display: inline-flex; align-items: center; gap: 4px; margin-left: auto; padding: 2px 10px 2px 6px;
  border: 1px solid var(--border); border-radius: 999px; background: #fff; color: #5b6878;
  font-size: 12px; font-weight: 700; cursor: pointer; user-select: none;
}
.adopt input { width: 14px; height: 14px; margin: 0; accent-color: #24804a; cursor: pointer; }
.adopt.is-on { border-color: #24804a; background: #e3f4ea; color: #24804a; }
.adopt.is-readonly { cursor: default; padding-left: 10px; }
.adopt.is-readonly input { display: none; }
.adopt + .reply-del { margin-left: 8px; }
.adopt-sum { margin-left: auto; padding: 1px 8px; border-radius: 999px; background: #eef1f5; color: #5b6878; font-size: 12px; font-weight: 700; }
.adopt-sum.is-ok { background: #e3f4ea; color: #24804a; }
.adopt-sum.is-short { background: #f1ebfd; color: #6d3fc0; }
.adopt-tag {
  display: inline-block; margin-right: 4px; padding: 0 5px; border-radius: 4px; background: #e3f4ea; color: #24804a;
  font-size: 11px; font-style: normal; font-weight: 700; line-height: 16px; vertical-align: 1px;
}
table.sheet .adopt-tag { margin: 0 0 0 4px; }
.status-cell { display: inline-flex; align-items: center; flex-wrap: nowrap; gap: 6px; max-width: 100%; vertical-align: middle; }
.status-cell .chip { flex: none; }
/* 状态最长 6 个字，表格里状态统一占这么宽，后面的【转发】每行都对齐 */
table.sheet .status-cell .chip { box-sizing: border-box; width: calc(6em + 18px); justify-content: center; white-space: nowrap; }
.fwd-btn {
  flex: none; display: inline-flex; align-items: center; gap: 3px; min-height: 24px; padding: 0 8px;
  border: 1px solid #1f86e8; border-radius: 999px; background: #fff; color: #1f86e8;
  font-size: 12px; font-weight: 700; line-height: 1; cursor: pointer;
}
.fwd-btn:hover { background: #1f86e8; color: #fff; }
.fwd-btn svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fwd-note { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; font-weight: 600; }
.status-pick {
  position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 12px;
  padding: 8px 10px; border-radius: 14px; background: #fff; border: 1px solid var(--border);
}
.status-pick-chips { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.status-now .chip { min-height: 26px; padding: 0 12px; font-size: 13px; }
.status-next { order: 3; flex-basis: 100%; display: flex; align-items: center; gap: 6px; }
.status-next .chip { min-height: 26px; padding: 0 12px; font-size: 13px; box-shadow: inset 0 0 0 1px currentColor; }
.status-arrow { color: var(--muted); font-weight: 700; }
.status-next-tip { color: var(--muted); font-size: 12px; }
.status-undo { padding: 0 4px; border: 0; background: none; color: #1f86e8; font-size: 12px; font-weight: 700; cursor: pointer; }
.status-switch {
  order: 2; display: inline-flex; align-items: center; gap: 6px; min-height: 28px; margin-left: auto; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--heading);
  font-size: 13px; font-weight: 700; cursor: pointer;
}
.status-switch:hover, .status-switch[aria-expanded="true"] { border-color: #1f86e8; color: #1f86e8; }
.status-switch i { width: 6px; height: 6px; margin-top: -3px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
.status-menu {
  position: absolute; top: calc(100% + 4px); right: 0; z-index: 30; min-width: 260px; padding: 6px;
  border: 1px solid var(--border); border-radius: 12px; background: #fff; box-shadow: 0 12px 32px rgba(15, 23, 42, .16);
}
.status-menu-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 7px 8px;
  border: 0; border-radius: 8px; background: none; text-align: left; cursor: pointer;
}
.status-menu-item:hover:not(:disabled), .status-menu-item.is-on { background: #eef6ff; }
.status-menu-item span { color: var(--muted); font-size: 12px; }
.status-menu-item:disabled { cursor: not-allowed; }
.status-menu-item:disabled .chip { background: #eef1f5; color: #a3adba; }
.status-menu-empty { margin: 6px 8px; color: var(--muted); font-size: 12px; }
.status-cancel {
  order: 2; min-height: 28px; margin-left: auto; padding: 0 14px;
  border: 1px solid #f1b4b4; border-radius: 8px; background: #fff5f5; color: #d64545;
  font-size: 13px; font-weight: 700; cursor: pointer;
}
.status-cancel:hover { border-color: #d64545; background: #d64545; color: #fff; }
.status-cancel + .status-switch { margin-left: 0; }
.status-pick-note { color: var(--muted); font-size: 12px; font-weight: 600; }
.status-pick-note.is-cancel { padding: 3px 8px; border-radius: 8px; background: #fff1f0; color: #c0392b; word-break: break-word; }
.record-card .card-cancel {
  padding: 4px 8px; border-radius: 8px; background: #fff1f0; color: #c0392b; font-size: 12.5px; line-height: 1.5; word-break: break-word;
}
.record-card .card-note {
  padding: 4px 8px; border-radius: 8px; background: #fff7e8; color: #9a5b0e; font-size: 12.5px; line-height: 1.5; word-break: break-word;
}
.status-pick-note.is-past-note { padding: 3px 8px; border-radius: 8px; background: #fff7e8; color: #9a5b0e; word-break: break-word; }
.past-mark {
  flex: none; padding: 1px 7px; border: 1px solid #f1c58f; border-radius: 999px;
  background: #fff7ec; color: #a8530b; font-size: 11.5px; font-weight: 700; line-height: 18px; cursor: help;
}
.past-bar {
  display: flex; align-items: center; gap: 8px; margin: -4px 0 10px; padding: 8px 10px 8px 14px;
  border: 1px solid #f1d3a8; border-radius: 12px; background: #fffaf2;
}
.past-bar[hidden] { display: none; }
.past-bar-text { flex: 1; min-width: 0; color: #8a5a1c; font-size: 13px; font-weight: 600; }
.past-bar-text b { color: #a8530b; font-size: 15px; }
.past-bar .btn { min-height: 32px; padding: 0 14px; }
.row-check {
  display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px;
  margin: 0 8px 0 -2px; vertical-align: -4px; cursor: pointer;
}
.row-check input { width: 15px; height: 15px; margin: 0; accent-color: #1f86e8; cursor: pointer; }
table.sheet tr.is-picked > td { background-color: #eaf4ff !important; }
.cancel-form { display: grid; gap: 8px; padding: 10px 20px 0; }
.cancel-label { color: var(--heading); font-size: 13px; font-weight: 700; }
.cancel-label .req { margin-left: 2px; color: #d64545; font-style: normal; }
.cancel-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cancel-chips button {
  min-height: 28px; padding: 0 10px; border: 1px solid var(--border); border-radius: 999px; background: #fff;
  color: var(--text); font-size: 12.5px; cursor: pointer;
}
.cancel-chips button:hover { border-color: #d64545; color: #d64545; }
.cancel-form textarea {
  width: 100%; min-height: 76px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px;
  font: inherit; font-size: 14px; line-height: 1.5; resize: vertical;
}
.cancel-form textarea:focus { outline: none; border-color: #d64545; box-shadow: 0 0 0 3px rgba(214, 69, 69, .12); }
.cancel-msg { margin: 0; color: #d64545; font-size: 12.5px; font-weight: 600; }
/* ---------- 收藏 ---------- */
.fav-view svg, .drawer-fav svg, .status-fav svg, .fav-mark svg {
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round;
}
.h1-fav { display: flex; align-items: center; gap: 4px; }
.fav-view, .drawer-fav, .status-fav { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.fav-view {
  display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; padding: 0;
  border: 0; border-radius: 8px; background: transparent; color: #9aa6b5; cursor: pointer;
}
.fav-view svg { width: 24px; height: 24px; }
.fav-view:hover { color: #d99a00; }
.fav-view.is-on, .drawer-fav.is-on, .status-fav.is-on { color: #e8a200; }
.fav-view.is-on svg, .drawer-fav.is-on svg, .status-fav.is-on svg, .fav-mark svg { fill: #fbc531; stroke: #e8a200; }
.drawer-fav svg { width: 21px; height: 21px; }
.drawer-fav:hover { color: #d99a00; }
.status-fav {
  order: 2; display: grid; place-items: center; width: 32px; height: 32px; margin-left: auto; padding: 0;
  border: 0; border-radius: 8px; background: transparent; color: #9aa6b5; cursor: pointer;
}
.status-fav svg { width: 22px; height: 22px; }
@media (max-width: 900px) {
  .status-fav + .status-cancel, .status-fav + .status-switch { margin-left: 0; }
}
.fav-mark { display: inline-grid; place-items: center; flex: none; width: 16px; height: 16px; margin-right: 2px; }
.fav-mark svg { width: 15px; height: 15px; }
.q-box { position: relative; display: flex; min-width: 0; }
.q-box > input { flex: 1; min-width: 0; width: 100%; }
#view-board.is-fav-only .filters > :not(.q-box), #view-board.is-fav-only .filters #filterQ { opacity: .45; }
.cancel-card.is-drop { box-shadow: 0 0 0 3px #1f86e8, 0 24px 60px rgba(15, 23, 42, .25); }
.cancel-files { display: flex; flex-wrap: wrap; gap: 6px; }
.cf-item {
  position: relative; display: inline-flex; align-items: center; gap: 6px; max-width: 100%; height: 34px; padding: 0 26px 0 10px;
  border: 1px solid var(--border); border-radius: 8px; background: #f7f9fc; font-size: 12px;
}
.cf-item.is-img { width: 64px; height: 64px; padding: 0; overflow: hidden; background: #eef1f5; }
.cf-item.is-img img { width: 100%; height: 100%; object-fit: cover; }
.cf-name { min-width: 0; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--heading); }
.cf-item em { flex: none; color: var(--muted); font-style: normal; }
.cf-item button {
  position: absolute; top: 3px; right: 3px; width: 18px; height: 18px; padding: 0; border: 0; border-radius: 999px;
  background: rgba(15, 23, 42, .55); color: #fff; font-size: 13px; line-height: 18px; cursor: pointer;
}
.cf-item:not(.is-img) button { top: 50%; transform: translateY(-50%); background: rgba(15, 23, 42, .2); }
.cf-item button:hover { background: #d64545; }
.cancel-add { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cancel-add-btn {
  display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px; border: 1px dashed #b8c2cf; border-radius: 8px;
  background: #fff; color: var(--heading); font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.cancel-add-btn:hover { border-color: #1f86e8; color: #1f86e8; }
.cancel-add-btn svg, .log-file svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cancel-tip { color: var(--muted); font-size: 11.5px; }
.log-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.log-file-img {
  width: 72px; height: 54px; padding: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 6px; background: #eef1f5; cursor: zoom-in;
}
.log-file-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.log-file {
  display: inline-flex; align-items: center; gap: 4px; max-width: 260px; height: 26px; padding: 0 8px;
  border: 1px solid var(--border); border-radius: 6px; background: #fff; color: #1d6fbf; font-size: 12px; text-decoration: none;
}
.log-file span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-file em { flex: none; color: var(--muted); font-style: normal; }
.log-file:hover { border-color: #1f86e8; background: #f2f8ff; }
.lf-viewer {
  position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 24px;
  background: rgba(10, 15, 25, .82); cursor: zoom-out;
}
.lf-viewer[hidden] { display: none; }
.lf-viewer img { max-width: 100%; max-height: 100%; border-radius: 6px; box-shadow: 0 20px 60px rgba(0, 0, 0, .4); }
.lf-viewer-x {
  position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 14px; width: 36px; height: 36px; border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, .16); color: #fff; font-size: 22px; cursor: pointer;
}
@media (max-width: 900px) {
  .cancel-tip { display: none; }
}
.modal-card.cancel-card { width: min(420px, calc(100% - 32px)); }
.cancel-card .confirm-body p { font-size: 13px; }
.status-pick-note:empty { display: none; }.card-fwds {
  display: flex; align-items: flex-start; gap: 8px; margin-top: 6px; padding-top: 6px;
  border-top: 1px dashed var(--phase-line);
}
.card-fwds-head {
  flex: none; display: inline-flex; align-items: center; gap: 3px; padding-top: 2px;
  color: #c2410c; font-size: 12px; font-weight: 700; white-space: nowrap;
}
.card-fwds-head svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.card-fwds ul { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; margin: 0; padding: 0; list-style: none; }
.card-fwds li {
  display: inline-flex; align-items: baseline; gap: 4px; padding: 1px 8px;
  border-radius: 999px; background: #fff4ed; font-size: 12px; white-space: nowrap;
}
.card-fwds li b { color: var(--heading); font-weight: 700; }
.card-fwds li span { color: var(--muted); }
.status-fwds { flex-basis: 100%; min-width: 0; }
.status-fwds .card-fwds { margin-top: 0; }
.offer-strip { display: grid; gap: 8px; margin-bottom: 10px; }
.offer-head { display: flex; align-items: baseline; gap: 10px; padding: 0 2px; }
.offer-head strong { color: #b4610c; font-size: 14px; }
.offer-head span { color: var(--muted); font-size: 12px; }
.offer-row {
  display: grid; align-items: center; gap: 14px;
  grid-template-columns: 76px minmax(180px, 1.2fr) minmax(240px, 2fr) 116px auto;
  padding: 10px 14px 10px 0; border: 1px solid #f3dcb8; border-radius: 14px; cursor: pointer;
  background: linear-gradient(90deg, #fff6e9 0, #fffdf9 38%, #fff 100%);
  box-shadow: inset 4px 0 0 #f08a24;
  transition: box-shadow .15s, transform .15s;
}
.offer-row:hover { box-shadow: inset 4px 0 0 #f08a24, 0 6px 18px rgba(240, 138, 36, .14); }
.offer-row.is-full, .offer-row.is-closed { border-color: var(--border); background: #f7f8fa; box-shadow: inset 4px 0 0 #b8c1cc; }
.offer-row.is-closed { opacity: .72; }
.offer-tag { display: grid; justify-items: center; gap: 3px; padding-left: 4px; text-align: center; }
.offer-tag span { color: #b4610c; font-size: 12px; font-weight: 800; letter-spacing: .5px; }
.offer-tag small {
  padding: 1px 8px; border-radius: 999px; background: #f08a24; color: #fff; font-size: 11px; font-weight: 700;
}
.offer-row.is-full .offer-tag span, .offer-row.is-closed .offer-tag span { color: #6b7684; }
.offer-row.is-full .offer-tag small, .offer-row.is-closed .offer-tag small { background: #b8c1cc; }
.offer-main { min-width: 0; display: grid; gap: 3px; }
.offer-route { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 8px; color: var(--heading); font-size: 15px; }
.offer-route b { font-weight: 800; }
.offer-dest { font-weight: 700; color: #1d6fbf; }
.offer-mine {
  padding: 1px 8px; border-radius: 999px; background: #e8f1fd; color: #1d6fbf; font-size: 11.5px; font-weight: 700;
}
.offer-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; }
.offer-progress { min-width: 0; display: grid; gap: 6px; }
.offer-bar {
  display: flex; height: 10px; overflow: hidden; border-radius: 999px;
  background: repeating-linear-gradient(135deg, #eef1f5 0 6px, #f6f8fa 6px 12px);
  box-shadow: inset 0 0 0 1px rgba(26, 36, 51, .06);
}
.offer-seg { height: 100%; min-width: 3px; }
.offer-seg + .offer-seg { box-shadow: inset 2px 0 0 #fff; }
.offer-legend { display: flex; flex-wrap: wrap; gap: 4px 10px; min-width: 0; }
.offer-chip { display: inline-flex; align-items: center; gap: 5px; color: var(--text); font-size: 12px; white-space: nowrap; }
.offer-chip i { width: 8px; height: 8px; border-radius: 3px; }
.offer-chip b { color: var(--heading); }
.offer-chip.is-mine { font-weight: 700; color: #1d6fbf; }
.offer-legend-empty { color: #b4610c; font-size: 12px; font-weight: 600; }
.offer-left { display: grid; justify-items: end; line-height: 1.1; }
.offer-left b { color: #d9480f; font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.offer-row.is-full .offer-left b, .offer-row.is-closed .offer-left b { color: #8b97a6; }
.offer-left span { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.offer-actions { display: flex; justify-content: flex-end; }
.offer-act { min-width: 96px; min-height: 36px; justify-content: center; white-space: nowrap; }
.offer-row.is-open .offer-act.btn-primary { background: #f08a24; border-color: #f08a24; }
.offer-row.is-open .offer-act.btn-primary:hover { filter: brightness(1.05); }
.offer-actions { align-items: center; gap: 6px; }
.offer-hide {
  display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0;
  border: 1px solid transparent; border-radius: 10px; background: none; color: #9aa5b3; cursor: pointer;
}
.offer-hide svg {
  width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.offer-hide:hover { border-color: #f3dcb8; background: #fff; color: #b4610c; }
.offer-show { gap: 6px; border-color: #f3c48d; background: #fff8ef; color: #b4610c; }
.offer-show:hover { border-color: #f08a24; background: #fff1e0; color: #b4610c; }
.offer-show svg {
  width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.offer-show b {
  min-width: 18px; padding: 0 5px; border-radius: 999px; background: #f08a24; color: #fff; font-size: 11.5px; line-height: 18px; text-align: center;
}
.offer-pill { display: none; }
.offer-peek { display: none; }

/* 手机卡片右滑：底层在左，面板右移露出 */
.swipe-row { position: relative; min-width: 0; overflow: clip; border-radius: 12px; }
.swipe-under {
  position: absolute; inset: 0 auto 0 0; z-index: 0; display: flex; align-items: stretch;
  width: var(--swipe-w, 96px); border-radius: 12px; overflow: hidden;
}
.swipe-face {
  position: relative; z-index: 1; min-width: 0; touch-action: pan-y;
  transition: transform .22s cubic-bezier(.2, .8, .2, 1);
}
.swipe-row.is-dragging .swipe-face { transition: none; }
.swipe-row.is-open .swipe-face { transform: translateX(var(--swipe-w, 96px)); }
.swipe-row.is-offer { --swipe-w: 78px; }
.swipe-row.is-offer .swipe-face > .offer-row { background-color: #fff; }
.swipe-row.is-offer .swipe-face > .offer-row.is-closed { opacity: 1; }
.swipe-row.is-offer .swipe-face > .offer-row.is-closed > * { opacity: .72; }
.swipe-row.is-offer .swipe-under { background: linear-gradient(135deg, #5b6675, #3d4653); }
.swipe-act {
  flex: 1; display: grid; place-content: center; justify-items: center; gap: 4px;
  border: 0; background: none; color: #fff; font-size: 12px; font-weight: 700; cursor: pointer;
}
.swipe-act svg, .offer-peek svg {
  width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.swipe-row.is-card { --swipe-w: 158px; }
.swipe-row.is-card .swipe-under {
  background:
    radial-gradient(120px 90px at 0% 0%, rgba(255, 255, 255, .22), transparent 70%),
    radial-gradient(140px 120px at 110% 110%, rgba(10, 40, 90, .35), transparent 70%),
    linear-gradient(150deg, #2b8ef0 0%, #1868c4 55%, #12509c 100%);
}
.card-cn {
  position: relative; display: grid; grid-template-rows: auto auto; align-content: safe center; gap: 6px; width: 100%; padding: 8px 12px;
  color: #fff; text-align: left; overflow: hidden;
}
.card-cn::after {
  content: ""; position: absolute; right: -26px; top: -26px; width: 78px; height: 78px; border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, .16); pointer-events: none;
}
.card-cn small { display: block; font-size: 10.5px; font-weight: 600; letter-spacing: .08em; opacity: .72; }
.cn-cust { display: grid; align-content: center; gap: 1px; min-width: 0; }
.cn-cust b { font-size: 17px; font-weight: 800; line-height: 1.25; word-break: break-all; letter-spacing: .02em; }
.cn-cust em { font-style: normal; font-size: 11px; font-weight: 600; letter-spacing: .06em; opacity: .8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cn-cust.is-empty b { font-size: 14px; opacity: .9; }
.cn-owner { position: relative; padding-top: 6px; min-width: 0; }
.cn-owner::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0));
}
.cn-person { display: flex; align-items: center; gap: 6px; min-width: 0; margin-top: 4px; font-size: 13px; font-weight: 700; }
.cn-person span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cn-av {
  flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: rgba(255, 255, 255, .95); color: #1868c4; font-size: 11px; font-style: normal; font-weight: 800;
  box-shadow: 0 0 0 2px rgba(24, 104, 196, .9);
}
.swipe-row.is-card.is-wide { --swipe-w: 196px; }
.swipe-row.is-card.is-wider { --swipe-w: 252px; }
.swipe-row.is-card.is-wider2 { --swipe-w: 300px; }
.swipe-row.is-card:is(.is-wide, .is-wider, .is-wider2) .card-cn { gap: 4px; padding: 6px 12px; }
.swipe-row.is-card:is(.is-wide, .is-wider, .is-wider2) .cn-cust small { display: none; }
.swipe-row.is-card:is(.is-wide, .is-wider, .is-wider2) .cn-cust b { font-size: 15.5px; }
.swipe-row.is-card:is(.is-wide, .is-wider, .is-wider2) .cn-owner { padding-top: 5px; }
.cn-count { margin-left: 6px; padding: 0 6px; border-radius: 999px; background: rgba(255, 255, 255, .2); font-style: normal; font-weight: 700; letter-spacing: 0; line-height: 15px; }
.cn-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.cn-chip {
  display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 1px 7px 1px 1px; border-radius: 999px;
  background: rgba(255, 255, 255, .16); font-size: 11.5px; font-weight: 700; line-height: 18px; white-space: nowrap;
}
.cn-chip .cn-av { width: 18px; height: 18px; font-size: 10px; box-shadow: none; }
.cn-none { display: inline-block; margin-top: 4px; padding: 2px 8px; border: 1px dashed rgba(255, 255, 255, .55); border-radius: 999px; font-size: 11.5px; font-weight: 600; opacity: .9; }
.swipe-row.is-card:has(.card-cn.is-empty) .swipe-under {
  background:
    radial-gradient(120px 90px at 0% 0%, rgba(255, 255, 255, .18), transparent 70%),
    linear-gradient(150deg, #8d99a9, #66717f);
}
.swipe-row.is-card:has(.card-cn.is-empty) .cn-av { color: #66717f; }
.owner-cell { display: flex; align-items: center; gap: 4px; min-width: 0; max-width: 100%; }
.owner-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.owner-more { flex: none; padding: 0 5px; border-radius: 999px; background: #e8f1fc; color: #1d6fbf; font-size: 11px; font-style: normal; font-weight: 800; line-height: 16px; }
.owner-none { color: #b3bcc8; font-style: normal; font-size: 12px; }

.modal-card.offer-card { width: min(560px, 100%); }
.offer-lead { margin: 0; color: var(--muted); font-size: 13px; }
.offer-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.offer-vol-box { position: relative; display: block; }
.offer-vol-box input { width: 100%; padding-right: 30px; font-weight: 800; }
.offer-vol-box em { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); font-style: normal; font-size: 13px; }
.offer-title { display: flex; align-items: center; gap: 8px; }
.offer-help {
  position: relative; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 999px;
  background: #e8edf3; color: #6b7684; font-size: 12px; font-weight: 700; line-height: 1; cursor: help; outline: none;
}
.offer-help:hover, .offer-help:focus { background: #1f86e8; color: #fff; }
.offer-help-pop {
  position: absolute; top: calc(100% + 8px); left: -8px; z-index: 40; width: max-content; max-width: min(340px, 78vw);
  padding: 8px 10px; border: 1px solid #f3d9b1; border-radius: 10px; background: #fff6e9; color: #9a5b0c;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .16); font-size: 12.5px; font-weight: 500; line-height: 1.6; white-space: normal;
  opacity: 0; visibility: hidden; transition: opacity .12s;
}
.offer-help:hover .offer-help-pop, .offer-help:focus .offer-help-pop { opacity: 1; visibility: visible; }
.offer-foot, .claim-foot { justify-content: flex-start; gap: 8px; }
.offer-foot-gap { flex: 1; }
.modal-card.claim-card { width: min(480px, 100%); }
.claim-card .modal-body { gap: 12px; }
.claim-summary { display: grid; gap: 6px; padding: 12px; border-radius: 14px; background: #fffaf2; border: 1px solid #f3dcb8; }
.claim-route { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.claim-phase { flex: none; padding: 1px 8px; border-radius: 999px; background: #f08a24; color: #fff; font-size: 11px; font-weight: 700; }
.claim-phase.is-full, .claim-phase.is-closed { background: #b8c1cc; }
.claim-summary .offer-meta { white-space: normal; }
.claim-nums { display: flex; gap: 14px; color: var(--muted); font-size: 12.5px; }
.claim-nums b { color: var(--heading); font-size: 14px; }
.claim-nums .is-left b { color: #d9480f; font-size: 16px; }
.claim-groups { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.claim-input { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--heading); font-weight: 700; }
.claim-stepper { display: inline-flex; align-items: center; gap: 6px; }
.claim-stepper input {
  width: 96px; min-height: 44px; padding: 4px 8px; text-align: center;
  border: 1.5px solid var(--border); border-radius: 12px; background: #fff;
  color: var(--heading); font: 800 22px Inter, "Noto Sans SC", sans-serif; font-variant-numeric: tabular-nums;
}
.claim-stepper input:focus { outline: none; border-color: #f08a24; box-shadow: 0 0 0 3px rgba(240, 138, 36, .18); }
.claim-stepper input.is-bad { border-color: #d64545; box-shadow: 0 0 0 3px rgba(214, 69, 69, .14); }
.claim-stepper em { color: var(--muted); font-style: normal; font-weight: 600; }
.claim-step {
  width: 40px; height: 44px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--control); color: var(--heading); font-size: 20px; font-weight: 700; cursor: pointer;
}
.claim-step:hover { border-color: #f08a24; color: #b4610c; }
.claim-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.claim-quick:empty { display: none; }
.claim-quick button {
  min-height: 30px; padding: 0 12px; border: 1px solid var(--border); border-radius: 999px;
  background: #fff; color: var(--heading); font-weight: 700; cursor: pointer;
}
.claim-quick button:hover { border-color: #f08a24; color: #b4610c; }
.claim-quick button.is-all { border-color: #f5c58f; background: #fff6e9; color: #b4610c; }
.claim-hint { margin: 0; min-height: 20px; color: #2f7d4a; font-size: 13px; font-weight: 600; }
.claim-hint.is-bad { color: #d64545; }
.claim-foot #claimSave { background: #f08a24; border-color: #f08a24; }
.claim-foot #claimSave:disabled { opacity: .45; cursor: not-allowed; }
.modal-card.notify-card { width: min(440px, 100%); }
.notify-card .modal-body { padding: 16px; gap: 12px; }
.notify-intro { display: grid; gap: 2px; }
.notify-intro strong { color: var(--heading); font-size: 15px; }
.notify-intro span { color: var(--muted); font-size: 13px; }
.notify-opts { display: grid; gap: 10px; }
.notify-opt {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; text-align: left;
  border: 1.5px solid var(--border); border-radius: 14px; background: #fff; color: var(--text); cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.notify-opt:hover { border-color: #b7d4f0; }
.notify-opt.is-on { border-color: #1f86e8; background: #f3f8fe; box-shadow: 0 0 0 3px rgba(31, 134, 232, .12); }
.notify-ico {
  flex: none; width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 12px; background: #eef1f5; color: #5f6b7a;
}
.notify-opt.is-on .notify-ico { background: #1f86e8; color: #fff; }
.notify-ico svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.notify-copy { flex: 1; min-width: 0; display: grid; gap: 3px; }
.notify-copy b { color: var(--heading); font-size: 15px; }
.notify-copy small { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.notify-radio {
  flex: none; width: 20px; height: 20px; border: 2px solid #c5cfdb; border-radius: 50%; background: #fff;
}
.notify-opt.is-on .notify-radio { border-color: #1f86e8; box-shadow: inset 0 0 0 4px #fff; background: #1f86e8; }
.notify-foot { margin: 0; color: var(--muted); font-size: 12px; text-align: center; }
.notify-foot.is-ok { color: #2f7d4a; font-weight: 700; }
.modal-card.fwd-card { width: min(420px, calc(100% - 32px)); }
.fwd-card #fwdEdit { padding: 18px 20px 20px; }
.fwd-head h2 { margin: 0; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fwd-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.fwd-actions { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 10px; }
.fwd-actions .btn { min-height: 44px; justify-content: center; padding-left: 8px; padding-right: 8px; white-space: nowrap; }
.fwd-card textarea {
  display: block; width: 100%; min-height: 150px; margin: 12px 0 14px; padding: 10px 12px; resize: vertical;
  border: 1px solid var(--border); border-radius: 12px; background: #f7fbfe;
  font: 15px/1.6 Consolas, "SFMono-Regular", Menlo, "Noto Sans SC", monospace; color: var(--heading);
}
.fwd-card textarea:focus { outline: none; border-color: #1f86e8; box-shadow: 0 0 0 3px rgba(31, 134, 232, .16); }
.fwd-skip {
  display: block; margin: 12px auto 0; padding: 4px 8px; border: 0; background: none;
  color: var(--kicker); font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.fwd-card .btn-primary.fwd-wx { background: #07c160; border-color: #07c160; }
.empty { padding: 28px 12px; color: var(--muted); text-align: center; }
.cards { display: none; }

.import-grid, .org-grid { display: grid; gap: 14px; }
.drop {
  position: relative; display: grid; place-items: center; gap: 4px;
  min-height: 180px; padding: 24px; text-align: center;
  border: 1.5px dashed var(--soft-border); border-radius: 18px; background: var(--phase); color: var(--muted);
}
.drop strong { color: var(--heading); font-size: 16px; }
.drop.is-over { border-color: var(--kicker); background: var(--soft); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.path-row { align-items: end; }
.path-row .control { flex: 1; }
.hint-list { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13px; }
.hint-list li { margin: 6px 0; }

.panel { padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.panel.narrow { max-width: 560px; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 10px; color: var(--heading); font-weight: 700;
}
.section-hint { color: var(--muted); font-size: 12px; font-weight: 500; }
.form-section .section-head { position: relative; }
.form-section .section-head > .section-hint { position: absolute; left: 50%; transform: translateX(-50%); }
.section-body { display: grid; grid-template-columns: repeat(4, minmax(140px, 1fr)); gap: 10px 12px; }
.user-form { display: grid; grid-template-columns: repeat(3, minmax(140px, 1fr)); gap: 10px; margin-bottom: 12px; }
.user-form .btn { align-self: end; }
.org-row, .user-row {
  display: grid; grid-template-columns: minmax(80px, 1fr) auto auto; gap: 8px; align-items: center;
  padding: 8px 0; border-top: 1px solid var(--phase-line);
}
.org-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.org-tools .section-head { margin: 0; gap: 8px; justify-content: flex-start; }
.org-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.org-filters input {
  width: 200px; min-height: 36px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--control); color: var(--text); font-size: 14px;
}
.org-filters input:focus { outline: none; border-color: var(--kicker); background: #fff; box-shadow: 0 0 0 3px rgba(31, 134, 232, .16); }
.org-filters .pick { width: 132px; }
.org-table { border: 1px solid var(--phase-line); border-radius: 12px; overflow: hidden; }
.org-thead, .org-tr {
  display: grid; align-items: center; gap: 12px; padding: 0 14px;
  grid-template-columns: minmax(60px, .55fr) minmax(76px, .7fr) 150px 116px minmax(92px, 1.2fr) minmax(200px, 1.8fr) 104px 140px;
  gap: 10px;
}
.org-limit { display: flex; align-items: center; }
.role-seg { display: inline-flex; padding: 2px; border: 1px solid var(--border); border-radius: 8px; background: #f5f7fa; }
.role-seg button {
  min-height: 24px; padding: 0 8px; border: 0; border-radius: 6px; background: transparent;
  color: var(--muted); font-size: 12px; font-weight: 650; white-space: nowrap; cursor: pointer;
}
.role-seg button:hover:not(:disabled) { color: var(--kicker); background: #fff; }
.role-seg button.is-on { background: #fff; color: var(--heading); box-shadow: 0 1px 2px rgba(15, 30, 50, .12); cursor: default; }
.role-seg button.is-on[data-role-set="supervisor"] { color: #a86a12; }
.role-seg button.is-on[data-role-set="leader"] { color: #1667b5; }
.role-seg.is-busy { opacity: .55; pointer-events: none; }
.org-reset.is-danger:hover { border-color: #e2a3a3; background: #fdf0f0; color: #b13c3c; }
.pick-btn:disabled { background: #f5f7fa; color: var(--muted); cursor: default; }
.org-tr .org-op { display: flex; align-items: center; justify-content: center; gap: 4px; }
.org-reset {
  min-height: 28px; padding: 0 10px; border: 1px solid var(--border); border-radius: 7px; background: #fff;
  color: var(--text); font-size: 12px; font-weight: 650; white-space: nowrap; cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.org-reset:hover { border-color: var(--kicker); background: #eef5fc; color: var(--kicker); }
.org-filter-row { min-height: 40px; padding-top: 4px; padding-bottom: 6px; border-top: 1px solid var(--phase-line); }
.org-filter-row .col-filter-box { position: relative; display: block; }
.org-filter-row .col-filter { min-height: 28px; padding-right: 26px; font-size: 12px; font-weight: 500; }
.org-filter-row .col-filter-btn {
  position: absolute; top: 50%; right: 3px; width: 22px; height: 22px; transform: translateY(-50%);
  border: 0; border-radius: 6px; background: transparent;
}
.org-filter-row .col-filter-btn:hover, .org-filter-row .col-filter-btn.is-on { background: #e3eefa; }
.org-filter-clear {
  min-height: 26px; padding: 0 8px; border: 0; border-radius: 6px; background: transparent;
  color: var(--kicker); font-size: 12px; font-weight: 700; cursor: pointer;
}
.org-filter-clear:hover { background: var(--soft); }
.org-filter-clear[hidden] { display: none; }
.perm-tog {
  position: relative; display: inline-flex; align-items: center; gap: 5px; min-height: 26px; padding: 0 9px 0 7px;
  border: 1px solid var(--border); border-radius: 7px; background: #fff; color: var(--muted);
  font-size: 12px; font-weight: 650; white-space: nowrap; cursor: pointer; user-select: none;
  transition: background .15s, border-color .15s, color .15s;
}
.perm-tog input { position: absolute; opacity: 0; pointer-events: none; }
.perm-tog i {
  position: relative; width: 14px; height: 14px; flex: none; border: 1.5px solid #b8c3d0; border-radius: 4px; background: #fff;
  transition: background .15s, border-color .15s;
}
.perm-tog:hover { border-color: var(--kicker); color: var(--kicker); }
.perm-tog.is-on { border-color: #b9d6f5; background: #eef5fc; color: #1667b5; }
.perm-tog.is-on i { border-color: var(--kicker); background: var(--kicker); }
.perm-tog.is-on i::after {
  content: ""; position: absolute; left: 3.5px; top: .5px; width: 4px; height: 8px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.perm-tog.is-office.is-on { border-color: #d6cdf5; background: #f3f0fd; color: #5b45b0; }
.perm-tog.is-office.is-on i { border-color: #6d55c9; background: #6d55c9; }
.perm-tog:has(input:disabled) { cursor: not-allowed; opacity: .6; }
.perm-tog.is-busy { opacity: .55; pointer-events: none; }
.perm-tog:has(input:focus-visible) { box-shadow: 0 0 0 3px rgba(31, 134, 232, .2); }
.perm-tog.is-radio i { border-radius: 50%; }
.perm-tog.is-radio.is-on i::after { left: 3px; top: 3px; width: 5px; height: 5px; border: 0; border-radius: 50%; background: #fff; transform: none; }
.org-pick-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.org-pick-list .perm-tog { min-height: 32px; padding: 0 12px 0 9px; font-size: 13px; }
.org-scope { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.org-scope-edit {
  min-height: 22px; padding: 0 6px; border: 0; border-radius: 6px; background: transparent;
  color: var(--kicker); font-size: 12px; font-weight: 700; cursor: pointer;
}
.org-scope-edit:hover { background: #eef5fc; }
.org-cap {
  min-height: 24px; padding: 0 8px; border: 1px dashed var(--phase-line); border-radius: 6px; background: transparent;
  color: var(--muted); font-size: 12px; font-weight: 650; white-space: nowrap; cursor: pointer;
}
.org-cap:hover { border-color: var(--kicker); color: var(--kicker); }
.org-cap.is-set { border-style: solid; border-color: #f2c98a; background: #fff6e8; color: #a86a12; }
.org-pick-input {
  width: 100%; min-height: 40px; padding: 0 12px; border: 1px solid var(--phase-line); border-radius: 8px;
  background: #fff; color: var(--text); font: inherit; font-size: 15px;
}
.org-pick-input:focus { outline: none; border-color: var(--kicker); box-shadow: 0 0 0 3px rgba(22, 103, 181, .12); }
.org-thead { min-height: 38px; background: var(--phase); color: var(--muted); font-size: 12px; font-weight: 700; }
.org-thead span:last-child, .org-op { text-align: center; }
.org-tr { min-height: 52px; border-top: 1px solid var(--phase-line); font-size: 13px; transition: background .12s; }
.org-tr:hover { background: #f8fbff; }
.org-tr.is-off { color: var(--muted); }
.org-tr.is-off .org-name { color: var(--muted); }
.org-tr > span { min-width: 0; }
.org-name { display: flex; align-items: center; gap: 6px; color: var(--heading); font-size: 14px; font-weight: 800; }
.org-account { overflow: hidden; color: var(--muted); font-family: "JetBrains Mono", Consolas, monospace; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.org-dept, .org-perms { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.org-badge {
  display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: 6px;
  background: var(--control); color: var(--text); font-size: 12px; font-weight: 650; white-space: nowrap;
}
.org-badge.is-role-supervisor { background: #fff3dc; color: #a86a12; }
.org-badge.is-role-admin { background: #fde9e9; color: #b13c3c; }
.org-badge.is-role-leader { background: #e6f1fd; color: #1667b5; }
.org-badge.is-commerce { background: var(--commerce); color: #1667b5; }
.org-badge.is-booking { background: var(--booking); color: #a86a12; }
.org-badge.is-office { background: #ece8fb; color: #5b45b0; }
.org-badge.is-perm { background: #fff; border: 1px solid var(--border); color: var(--muted); }
.org-badge.is-perm.is-office { border-color: #d6cdf5; color: #5b45b0; }
.org-sub, .org-none { color: var(--muted); font-size: 12px; }
.org-none { color: #b3bdca; }
.org-more {
  display: inline-flex; align-items: center; justify-content: center; gap: 3px; flex-direction: column;
  width: 30px; height: 30px; padding: 0; border: 1px solid transparent; border-radius: 8px; background: transparent; cursor: pointer;
}
.org-more i { width: 3.5px; height: 3.5px; border-radius: 50%; background: var(--muted); }
.org-more:hover, .org-more.is-open { border-color: var(--border); background: #fff; }
.org-more:hover i, .org-more.is-open i { background: var(--kicker); }
.org-menu {
  position: fixed; z-index: 80; display: grid; min-width: 168px; padding: 4px;
  border: 1px solid var(--border); border-radius: 12px; background: #fff; box-shadow: var(--shadow);
}
.org-menu[hidden] { display: none; }
.org-menu button {
  padding: 8px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--text);
  font-size: 13px; font-weight: 600; text-align: left; cursor: pointer;
}
.org-menu button:hover { background: var(--control); color: var(--kicker); }
.org-menu button.is-danger { color: var(--danger); }
.org-menu button.is-danger:hover { background: var(--danger-bg); color: var(--danger); }
.org-empty { display: grid; justify-items: center; gap: 10px; padding: 36px 12px; border-top: 1px solid var(--phase-line); color: var(--muted); font-size: 14px; }
.modal-card.account-card { width: min(620px, calc(100% - 32px)); }
.account-card .user-form { margin: 0; }
.notify-opts.is-pair { grid-template-columns: 1fr 1fr; margin-bottom: 4px; }
#officePrefs, #scopePrefs { display: grid; gap: 12px; }
#scopePrefs[hidden], #officePrefs[hidden] { display: none; }
.row-title { font-weight: 700; color: var(--heading); }
.row-meta { color: var(--muted); font-size: 12px; }
.inline-form input { max-width: 220px; }
.panel-actions { margin-top: 12px; }
.tiny { color: var(--muted); font-size: 12px; }

.drawer { position: fixed; inset: 0; z-index: 20; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(26, 36, 51, .28); }
.drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(760px, 100%); display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg); box-shadow: var(--shadow);
}
/* 客户端顶部 36px 是拖动窗口的区域，右上角有窗口按钮 */
html.is-client .drawer-panel { top: 36px; border-top-left-radius: 12px; }
.drawer-head {
  flex: none; display: flex; align-items: center; gap: 8px;
  min-height: 60px; padding: 10px 14px 10px 18px;
  border-bottom: 1px solid var(--phase-line); background: rgba(255,255,255,.96);
}
.drawer-title { flex: 1; min-width: 0; }
.drawer-title h2 { margin: 0; font-size: 18px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-sub { margin: 2px 0 0; color: var(--muted); font-size: 12px; font-weight: 600; }
.drawer-back, .drawer-icon {
  flex: none; width: 40px; height: 40px; display: grid; place-items: center;
  border: 0; border-radius: 12px; background: transparent; color: var(--heading);
}
.drawer-back:hover, .drawer-icon:hover, .drawer-icon[aria-expanded="true"] { background: var(--control); }
.drawer-back svg, .drawer-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.drawer-more svg circle { fill: currentColor; stroke: none; }
.drawer-back { display: none; margin-left: -8px; }
.drawer-more { position: relative; flex: none; }
.drawer-menu {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 5; min-width: 168px; padding: 6px;
  background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 14px 36px rgba(26, 36, 51, .16);
}
.drawer-menu button {
  width: 100%; min-height: 40px; padding: 0 12px; border: 0; border-radius: 8px;
  background: transparent; color: var(--heading); font-weight: 650; text-align: left;
}
.drawer-menu button:hover { background: var(--phase); }
.drawer-menu button.is-danger { color: #d64545; }
.drawer-menu button.is-danger:hover { background: var(--danger-bg); }
.drawer-body { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 18px 20px; overscroll-behavior: contain; }
.smart-card {
  margin-bottom: 12px; padding: 12px; border-radius: 14px;
  background: #fff; border: 1px solid var(--border);
}
.smart-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.smart-head strong { color: var(--heading); }
.smart-head span, .smart-result { color: var(--muted); font-size: 12px; }
.smart-card textarea {
  width: 100%; min-height: 88px; max-height: 180px; padding: 8px 10px; resize: vertical;
  border: 1px dashed #b7d4f0; border-radius: 10px; background: #f7fbfe; line-height: 1.55;
}
.smart-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.smart-result { margin: 0; flex-basis: 100%; }
.smart-result.is-ok { color: #1d6fbf; font-weight: 700; }
.group-pick {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
  padding: 8px 10px; border-radius: 14px; background: #fff; border: 1px solid var(--border);
}
.group-pick-label { flex: none; color: var(--muted); font-size: 12px; font-weight: 700; }
.group-pick-chips {
  display: flex; flex: 1; min-width: 0; flex-wrap: nowrap; gap: 5px; overflow-x: auto; scrollbar-width: none;
}
.group-pick-chips::-webkit-scrollbar { display: none; }
.group-chip {
  flex: none; min-height: 26px; padding: 0 10px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--control); color: var(--heading); font-size: 12px; font-weight: 700; white-space: nowrap;
}
/* 状态最上；智能识别贴着自己要填的那一块；所属组放最下 */
.drawer-body { display: flex; flex-direction: column; }
.drawer-body > * { flex: none; }
#drawerMsg, #drawerConflict { order: 0; }
#statusPickWrap { order: 1; }
#recordForm .smart-card { order: 2; }
#recordForm .form-section.is-commerce { order: 3; }
#recordForm .form-section.is-booking { order: 4; }
#recordForm.is-booking-user .form-section.is-commerce { order: 2; }
#recordForm.is-booking-user .smart-card { order: 3; }
#recordGroupWrap { order: 5; }
.drawer-meta { order: 6; }
#recordTrail { order: 7; }
.group-chip.is-on { background: #1f86e8; border-color: #1f86e8; color: #fff; }
.control.is-hit input, .control.is-hit textarea, .control.is-hit .pick-btn {
  border-color: #1f86e8; box-shadow: 0 0 0 3px rgba(31, 134, 232, .16); background: #fff;
}
.control.is-need input { border: 1px dashed #e08a1e; background: #fffaf2; }
.sheet-vol { color: var(--text, #1a2433); font-weight: 600; }
.control .req { margin-left: 2px; color: #e02424; font-style: normal; font-weight: 700; }
.form-section.is-locked .control .req { display: none; }
.control.is-need input::placeholder { color: #c77a17; }
.form-section { margin-bottom: 12px; padding: 12px; border-radius: var(--radius); background: #fff; border: 1px solid var(--border); }
.form-section.is-commerce { background: var(--commerce); border-color: #d4e8f6; }
.form-section.is-booking { background: var(--booking); border-color: #f3e6c2; }
.form-section.is-commerce .section-hint { color: #1d6fbf; }
.form-section.is-booking .section-hint { color: #8d6914; }
.form-section .control input, .form-section .control select { background: #fff; }
.section-lock {
  margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: rgba(15, 23, 42, .06);
  color: var(--muted); font-size: 11px; font-weight: 600; vertical-align: 1px;
}
.form-section.is-locked .section-body { opacity: .62; }
.form-section.is-locked .control input, .form-section.is-locked .control select,
.form-section.is-locked .control textarea, .form-section.is-locked .pick-btn { background: #f5f7fa; cursor: default; }
.section-body.is-readonly input[readonly], .section-body.is-readonly textarea[readonly] { cursor: text; user-select: text; }
.section-body.is-readonly button:disabled { color: inherit; cursor: default; }
.section-body.is-readonly .suggest-btn, .section-body.is-readonly .dt-ico { visibility: hidden; }
.group-pick.is-locked .group-pick-chips { opacity: .62; }
.note-tpl { margin-top: -2px; }
.note-tpl[hidden] { display: none; }
.note-tpl-head { display: flex; align-items: baseline; gap: 6px; margin-bottom: 6px; font-size: 12px; font-weight: 700; color: #a86a12; }
.note-tpl-head em { font-style: normal; font-weight: 500; color: var(--muted); }
.note-tpl-list {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin: 0 -2px; padding-left: 2px;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.note-tpl-list::-webkit-scrollbar { display: none; }
.note-tpl-chip {
  position: relative; flex: none; display: flex; align-items: flex-start; gap: 6px; max-width: 220px; min-height: 40px;
  padding: 7px 10px; border: 1px solid #f0dcae; border-radius: 10px; background: #fffaf0;
  color: var(--heading); font-size: 13px; line-height: 1.4; text-align: left; scroll-snap-align: start; cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s;
}
.note-tpl-chip span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; word-break: break-all; }
.note-tpl-chip b {
  flex: none; padding: 0 5px; border-radius: 6px; background: #fbe7bd; color: #a86a12; font-size: 11px; line-height: 18px; font-weight: 700;
}
.note-tpl-chip:active { transform: scale(.97); background: #fdf0d4; border-color: #e6c27a; }
.reply-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.reply-no {
  display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px;
  background: #fbe7b0; color: #7a5a0c; font-size: 12px; font-weight: 800;
}
.reply-del {
  min-height: 26px; padding: 0 10px; border: 1px solid transparent; border-radius: 8px;
  background: transparent; color: #c2410c; font-size: 12px; font-weight: 700;
}
.reply-del:hover { background: #fff1e8; border-color: #fbd5bd; }
.reply-meta {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: #8a7a55; font-size: 12px; font-variant-numeric: tabular-nums;
}
.reply-meta:empty { display: none; }
.reply-meta.is-new { color: #b08a2e; font-style: italic; }
#replyMain.is-multi, .more-replies .reply-card {
  padding: 8px 10px 10px; border: 1px solid #f0dca6; border-radius: 12px; background: rgba(255, 255, 255, .55);
  transition: border-color .15s, box-shadow .15s;
}
.more-replies .reply-card { margin-top: 10px; }
#replyMain.is-target, .more-replies .reply-card.is-target {
  border-color: #e0b23c; box-shadow: 0 0 0 3px rgba(224, 178, 60, .16); background: rgba(255, 255, 255, .8);
}
.reply-add {
  display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 38px; margin-top: 10px;
  border: 1px dashed #dfc06b; border-radius: 10px; background: rgba(255, 255, 255, .6);
  color: #8d6914; font-size: 13px; font-weight: 700;
}
.reply-add span { font-size: 17px; line-height: 1; }
.reply-add:hover { background: #fff; border-color: #c99a1e; }
.form-section.is-locked .reply-del { display: none; }
.rep-stack { display: flex; flex-direction: column; gap: 2px; }
.rep-line { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rep-line.is-more { padding-top: 2px; border-top: 1px dashed rgba(141, 105, 20, .28); }
.rep-line.is-last { color: #e02424; font-weight: 700; }
.rep-empty { color: var(--muted); font-style: normal; font-weight: 400; }
.reply-list { display: grid; gap: 3px; margin: 4px 0; padding: 0; list-style: none; }
.reply-list li { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.reply-list li + li { padding-top: 3px; border-top: 1px dashed rgba(141, 105, 20, .25); }
.reply-list b {
  flex: none; padding: 0 6px; border-radius: 999px; background: rgba(255, 255, 255, .75);
  color: #8d6914; font-size: 11px; font-weight: 800; line-height: 18px;
  max-width: 6em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.reply-list span { min-width: 0; }
.drawer-panel .drawer-actions {
  flex: none; display: flex; justify-content: flex-end; gap: 10px;
  padding: 10px 18px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--phase-line); background: rgba(255,255,255,.97);
  box-shadow: 0 -6px 18px rgba(26, 36, 51, .05);
}
.drawer-panel .drawer-actions .btn { min-width: 96px; min-height: 40px; justify-content: center; }
.drawer-panel .drawer-actions .btn-reuse { margin-right: auto; color: var(--primary, #1f86e8); }
.drawer-main { flex: 1; min-height: 0; min-width: 0; display: flex; }
.guide-float {
  position: fixed; z-index: 3; top: 24px; right: calc(min(760px, 100vw) + 14px);
  width: 232px; padding: 14px 16px 12px; border: 1px solid var(--border); border-radius: 16px;
  background: #fff; box-shadow: 0 16px 40px rgba(26, 36, 51, .16); pointer-events: auto;
}
html.is-client .guide-float { top: 52px; }
.guide-kicker { margin: 0 0 10px; color: var(--heading); font-size: 13px; font-weight: 800; line-height: 1.35; }
.guide-line, .guide-price {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0;
}
.guide-line + .guide-line, .guide-price { margin-top: 8px; }
.guide-line span, .guide-price span { color: var(--muted); font-size: 12px; font-weight: 650; }
.guide-line b { color: var(--heading); font-size: 16px; font-variant-numeric: tabular-nums; }
.guide-price { margin-top: 10px; padding-top: 10px; border-top: 1px dashed #e3e8ef; }
.guide-price b { color: #1f6fb8; font-size: 20px; font-variant-numeric: tabular-nums; }
.drawer.is-beside .guide-float { top: 28px; right: calc(min(760px, 52vw) + 28px); }
/* 客户端分栏：指导价收成一行，贴在市场卡片上方的顶栏空位，不压运价 */
html.is-client .drawer.is-beside .guide-float {
  top: 6px; left: 168px; right: auto;
  width: max-content; max-width: calc(100vw - min(760px, 52vw) - 220px);
  overflow: hidden;
  display: flex; align-items: center; gap: 12px;
  height: 32px; padding: 0 14px; border-radius: 999px;
}
html.is-client .drawer.is-beside .guide-kicker {
  flex: 0 1 auto; min-width: 0; margin: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px;
}
html.is-client .drawer.is-beside .guide-line,
html.is-client .drawer.is-beside .guide-price,
html.is-client .drawer.is-beside .guide-line + .guide-line {
  flex: none; margin: 0; padding: 0; border: 0; gap: 4px; white-space: nowrap;
}
html.is-client .drawer.is-beside .guide-line span,
html.is-client .drawer.is-beside .guide-price span { font-size: 12px; }
html.is-client .drawer.is-beside .guide-line b,
html.is-client .drawer.is-beside .guide-price b { font-size: 14px; }
html.is-client:has(#drawer.is-beside):has(#similarRail:not([hidden])) .brand-page { margin-right: auto; }
html.is-client:has(#drawer.is-beside):has(#similarRail:not([hidden])) .past-alert { margin-left: 8px; }
html.is-client:has(#drawer.is-beside):has(#similarRail:not([hidden])) .nav-reload { margin-left: 8px; }
@media (max-width: 900px) {
  .guide-float, .drawer.is-beside .guide-float, html.is-client .guide-float, html.is-client .drawer.is-beside .guide-float {
    top: calc(8px + env(safe-area-inset-top)); bottom: auto; left: 8px; right: 8px; width: auto;
    max-width: none; height: auto; border-radius: 16px;
    display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  }
  html.is-client .drawer.is-beside .guide-kicker { flex: 1 1 auto; }
  .guide-kicker {
    flex: 1 1 auto; min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px;
  }
  .guide-line, .guide-price, .guide-line + .guide-line {
    flex: none; margin: 0; padding: 0; border: 0; gap: 3px; white-space: nowrap;
  }
  .guide-line span, .guide-price span { font-size: 11px; }
  .guide-line b, .guide-price b { font-size: 13px; }
  .drawer:has(#similarRail:not([hidden])) .drawer-body {
    padding-top: calc(52px + env(safe-area-inset-top));
  }
}
.cell-tip {
  position: fixed; z-index: 35; max-width: min(420px, calc(100vw - 16px));
  padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border);
  background: #fff; color: var(--text); box-shadow: var(--shadow);
  font-size: 13px; line-height: 1.5; white-space: pre-wrap; word-break: break-word;
  max-height: 46vh; overflow: auto;
}
.trail { margin-top: 8px; padding-top: 4px; }
.trail-list { list-style: none; margin: 0; padding: 4px 0 12px; }
.trail-item { position: relative; padding: 0 0 14px 22px; }
.trail-item::before {
  content: ""; position: absolute; left: 5px; top: 14px; bottom: -2px; width: 2px;
  background: linear-gradient(#7eb6ea, #e4c56a);
}
.trail-item:last-child::before { display: none; }
.trail-dot {
  position: absolute; left: 0; top: 6px; width: 12px; height: 12px; border-radius: 50%;
  background: #fff; border: 2px solid var(--kicker); box-sizing: border-box;
}
.trail-item.is-new .trail-dot, .trail-item.is-in .trail-dot { background: #1f86e8; border-color: #1f86e8; }
.trail-item.is-edit .trail-dot { background: #fff6dc; border-color: #d4a017; }
.trail-item.is-del .trail-dot { background: var(--danger); border-color: var(--danger); }
.trail-card {
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: #fff;
}
.trail-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.trail-top strong { color: var(--heading); }
.trail-top time { margin-left: auto; color: var(--muted); font-size: 12px; }
.trail-act {
  display: inline-flex; align-items: center; min-height: 20px; padding: 0 7px;
  border-radius: 999px; background: var(--soft); color: var(--kicker); font-size: 12px; font-weight: 700;
}
.trail-item.is-edit .trail-act { background: #fff3d4; color: #8d6914; }
.trail-item.is-del .trail-act { background: var(--danger-bg); color: var(--danger); }
.trail-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.trail-lines li, .trail-sum { margin: 0; color: var(--text); font-size: 13px; white-space: pre-wrap; word-break: break-word; }
.trail-sum, .trail-shared { margin-top: 8px; }
.trail-split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.trail-col { min-width: 0; padding: 8px 10px; border-radius: 10px; }
.trail-col.is-commerce { background: var(--commerce); }
.trail-col.is-booking { background: var(--booking); }
.trail-col-name { margin-bottom: 6px; font-size: 12px; font-weight: 700; }
.trail-col.is-commerce .trail-col-name { color: #1a6fa8; }
.trail-col.is-booking .trail-col-name { color: #8d6914; }
.trail-empty { margin: 0; color: var(--muted); font-size: 12px; }
.spacer { flex: 1; }
.span-2 { grid-column: span 2; }

.me-page { display: flex; flex-direction: column; gap: 8px; max-width: 640px; }
.me-hero {
  display: grid; gap: 16px; margin-bottom: 8px; padding: 16px; border-radius: 16px;
  border: 1px solid #d4e8f6;
  background: linear-gradient(145deg, #e7f3fd, #f6fafe 60%, #fff);
}
.me-id { display: flex; align-items: center; gap: 16px; }
.me-avatar {
  width: 64px; height: 64px; flex: none;
  display: grid; place-items: center; border-radius: 50%;
  background: linear-gradient(145deg, #3b98ee, #1f78d6); color: #fff; font-size: 26px; font-weight: 800;
  box-shadow: 0 6px 16px rgba(31, 134, 232, .26);
}
.me-copy { min-width: 0; flex: 1; }
.me-copy h1 { margin: 0; font-size: 24px; font-weight: 800; line-height: 1.25; color: var(--heading); }
.me-facts {
  display: grid; grid-template-columns: repeat(3, 1fr); margin: 0;
  border-radius: 12px; background: rgba(255,255,255,.78); border: 1px solid #e1edf8;
}
.me-facts div { min-width: 0; padding: 10px 8px; text-align: center; }
.me-facts div + div { border-left: 1px solid #e1edf8; }
.me-facts dt { color: var(--muted); font-size: 12px; font-weight: 600; }
.me-facts dd {
  margin: 4px 0 0; color: var(--heading); font-size: 15px; font-weight: 750;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.me-group-title { margin: 8px 0 0; padding: 0 4px; color: var(--muted); font-size: 12px; font-weight: 700; }
.me-menu { background: #fff; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.me-row {
  width: 100%; min-height: 52px; display: flex; align-items: center; gap: 12px;
  padding: 0 16px; border: 0; background: #fff; color: var(--heading); font-weight: 650; text-align: left;
}
.me-row { position: relative; }
.me-row + .me-row::before { content: ""; position: absolute; top: 0; left: 60px; right: 0; border-top: 1px solid var(--phase-line); }
button.me-row:active { background: var(--phase); }
.me-row.is-static { cursor: default; }
.me-label { flex: 1; min-width: 0; font-size: 15px; }
.me-value { max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 13px; font-weight: 500; }
.me-chevron { color: #c5ced8; font-size: 22px; font-weight: 400; line-height: 1; }
.me-ico { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 10px; }
.me-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.me-ico.is-blue { background: #e7f2fc; color: #1f86e8; }
.me-ico.is-gold { background: #fff3d9; color: #b27a0c; }
.me-ico.is-green { background: #e5f5ea; color: #2f7d4a; }
.me-ico.is-slate { background: #eef1f5; color: #5f6b7a; }
.me-logout {
  width: 100%; min-height: 48px; margin-top: 16px;
  border: 1px solid #f3c4c6; border-radius: 14px; background: #fdf3f3;
  color: #d64545; font-weight: 700; font-size: 16px;
}
.me-logout:active { background: #fbe4e4; }
.btn-danger { border-color: #d64545; background: #d64545; color: #fff; }
.btn-danger:hover { filter: brightness(1.05); background: #d64545; }
.modal-card.confirm-card { width: min(360px, calc(100% - 32px)); }
.confirm-body { padding: 22px 20px 8px; text-align: center; }
.confirm-body h2 { margin: 0; font-size: 17px; }
.confirm-body p { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 16px 20px 20px; }
.confirm-actions .btn { min-height: 44px; justify-content: center; }
.modal-card.smart-pick-card { width: min(400px, calc(100% - 32px)); }
.smart-pick-card .confirm-body p { word-break: break-word; }
.smart-pick-list { display: grid; gap: 8px; max-height: 50vh; overflow-y: auto; padding: 14px 20px 4px; }
.smart-pick-opt {
  display: grid; gap: 2px; width: 100%; padding: 10px 14px; text-align: left;
  border: 1px solid #f0dca6; border-radius: 12px; background: #fffaf0; color: var(--heading);
}
.smart-pick-opt strong { font-size: 14px; }
.smart-pick-opt span { color: var(--muted); font-size: 12px; line-height: 1.5; word-break: break-word; }
.smart-pick-opt:hover { border-color: #e0b23c; background: #fff4d6; }
.smart-pick-opt.is-new { border-color: #1f86e8; background: #eef6ff; }
.smart-pick-opt.is-new strong { color: #1d6fbf; }
.smart-pick-opt.is-new:hover { background: #e1efff; }
.smart-pick-foot { display: grid; padding: 12px 20px 20px; }
.smart-pick-foot .btn { min-height: 42px; justify-content: center; }
.modal-card.info-card { width: min(480px, calc(100% - 32px)); }
.info-body section + section { margin-top: 4px; }
.info-body h3 { margin: 0 0 4px; font-size: 15px; color: var(--heading); }
.info-body p { margin: 0; color: var(--text); font-size: 14px; line-height: 1.65; }
.info-body b { color: var(--kicker); font-variant-numeric: tabular-nums; }
.about-brand { display: flex; align-items: center; gap: 12px; padding-bottom: 4px; }
.about-brand img { width: 92px; height: auto; object-fit: contain; }
.about-brand strong { display: block; font-size: 18px; color: var(--heading); }
.about-brand span { color: var(--muted); font-size: 13px; }
.log-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.log-filters > input { flex: 0 1 380px; min-width: 200px; }
.log-filters .range-btn { flex: none; }
.log-filters input {
  width: 100%; min-height: 36px; padding: 6px 10px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--control); color: var(--text);
}
.log-types { display: flex; gap: 6px; margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.log-types::-webkit-scrollbar { display: none; }
.log-types button {
  flex: none; min-height: 30px; padding: 0 14px; border: 1px solid var(--border); border-radius: 999px;
  background: #fff; color: var(--text); font-size: 13px; font-weight: 650;
}
.log-types button.is-on { border-color: #1f86e8; background: #1f86e8; color: #fff; }
.stats-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.stats-dim { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--control); border: 1px solid var(--border); }
.stats-dim button {
  min-height: 30px; padding: 0 16px; border: 0; border-radius: 9px;
  background: transparent; color: var(--muted); font-size: 14px; font-weight: 700;
}
.stats-dim button.is-on { background: #fff; color: var(--kicker); box-shadow: 0 1px 4px rgba(26, 36, 56, .12); }
.stats-bar .pick { min-width: 150px; }
.stats-sep { width: 1px; height: 24px; margin: 0 4px; background: var(--border); }
.stats-range { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--control); border: 1px solid var(--border); }
.stats-range button {
  display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 14px; border: 0; border-radius: 9px;
  background: transparent; color: var(--muted); font-size: 14px; font-weight: 700; white-space: nowrap; cursor: pointer;
}
.stats-range button:hover { color: var(--heading); }
.stats-range button.is-on, .stats-range button.is-open { background: #fff; color: var(--kicker); box-shadow: 0 1px 4px rgba(26, 36, 56, .12); }
.stats-range svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.range-btn { width: auto; min-width: 220px; }
.range-btn::before {
  content: ""; flex: none; width: 15px; height: 15px; margin-right: -2px;
  background: currentColor; opacity: .7;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Crect x='4' y='5.5' width='16' height='14' rx='2.5'/%3E%3Cpath d='M4 10h16M8.5 3.5v4M15.5 3.5v4'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Crect x='4' y='5.5' width='16' height='14' rx='2.5'/%3E%3Cpath d='M4 10h16M8.5 3.5v4M15.5 3.5v4'/%3E%3C/svg%3E") center / contain no-repeat;
}
.range-btn span { flex: 1; }
.stats-total[hidden] { display: none; }
.stats-total {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  max-width: 760px; margin-bottom: 10px; padding: 10px 14px; border-radius: 12px;
  background: linear-gradient(135deg, #1f86e8, #3fa2f5); color: #fff; font-weight: 700;
}
.stats-total .stats-sum { color: #fff; }
.stats-total .stats-sum b { color: #fff; font-size: 20px; }
.stats-total em { margin-left: auto; font-size: 12px; font-style: normal; font-weight: 500; opacity: .85; }
.stats-list { display: grid; gap: 8px; max-width: 760px; }
.stats-card { border: 1px solid var(--border); border-radius: 12px; background: #fff; overflow: hidden; }
.stats-card summary {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; flex-wrap: wrap;
  cursor: pointer; list-style: none; user-select: none;
}
.stats-card summary::-webkit-details-marker { display: none; }
.stats-card summary::before {
  content: ""; width: 7px; height: 7px; flex: none;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg); transition: transform .15s;
}
.stats-card[open] summary::before { transform: rotate(45deg); }
.stats-card[open] summary { border-bottom: 1px solid var(--phase-line); }
.stats-key { color: var(--heading); font-size: 16px; font-weight: 800; }
.stats-sum { display: inline-flex; align-items: baseline; margin-left: auto; color: var(--muted); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.stats-sum b { color: var(--heading); font-size: 15px; }
/* 票数、方数各占固定宽度靠右，不同行的「票」「CBM」上下对齐 */
.stats-sum .ss-n { min-width: 4.2em; text-align: right; }
.stats-sum .ss-v { min-width: 8.6em; text-align: right; }
.stats-skel { display: flex; align-items: center; justify-content: space-between; height: 46px; padding: 0 14px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.stats-skel i { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, #eef1f5 25%, #f7f9fb 50%, #eef1f5 75%); background-size: 200% 100%; animation: stats-shine 1.2s linear infinite; }
.stats-skel i:first-child { width: 64px; }
.stats-skel i:last-child { width: 132px; }
@keyframes stats-shine { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.stats-table tr.stats-day { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.stats-table tr.stats-day:active td, .stats-table tr.stats-day.is-open td { background: #f3f8fe; }
.stats-day-caret {
  display: inline-block; width: 6px; height: 6px; margin: 0 7px 2px 0;
  border-right: 1.6px solid #9aa6b5; border-bottom: 1.6px solid #9aa6b5; transform: rotate(-45deg); transition: transform .15s;
}
.stats-day.is-open .stats-day-caret { transform: rotate(45deg); margin-bottom: 4px; }
.stats-table tr.stats-day-recs > td { padding: 4px 0 8px; text-align: left; background: #f3f8fe; }
.stats-rec { margin: 6px 4px 0; padding: 9px 11px; border: 1px solid var(--border); border-radius: 10px; background: #fff; cursor: pointer; }
.stats-rec:active { border-color: var(--kicker); }
.stats-rec header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 5px; }
.stats-rec header .route-cust { font-size: 14px; font-weight: 800; color: var(--heading); }
.stats-rec header .route-cust em { margin-left: 6px; color: var(--muted); font-size: 12px; font-style: normal; font-weight: 500; }
.stats-rec p { display: flex; gap: 8px; margin: 3px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--text); white-space: normal; text-align: left; }
.stats-rec p b { flex: none; align-self: center; padding: 0 6px; border-radius: 5px; font-size: 11px; line-height: 18px; font-weight: 700; }
.stats-rec p b.is-biz { background: var(--commerce); color: #1667b5; }
.stats-rec p b.is-book { background: var(--booking); color: #a86a12; }
.stats-rec-wait { padding: 10px; color: var(--muted); font-size: 13px; text-align: center; }
.stats-body { padding: 6px 14px 12px; display: grid; gap: 10px; }

/* 状态：一种状态一个颜色，条、圆点、标签共用 */
.st-dot { display: inline-block; flex: none; width: 7px; height: 7px; border-radius: 50%; background: #9aa6b5; }
.st-bar { display: flex; gap: 2px; height: 5px; border-radius: 99px; overflow: hidden; background: #eef1f5; }
.st-bar i { min-width: 4px; background: #9aa6b5; }
.st-dot.is-new, .st-bar i.is-new { background: #a3aebb; }
.st-dot.is-wait, .st-bar i.is-wait { background: #e3a325; }
.st-dot.is-fwd, .st-bar i.is-fwd { background: #3b8ee0; }
.st-dot.is-reply, .st-bar i.is-reply { background: #1aa391; }
.st-dot.is-talk, .st-bar i.is-talk { background: #e2793a; }
.st-dot.is-part, .st-bar i.is-part { background: #8b5cf6; }
.st-dot.is-partdone, .st-bar i.is-partdone { background: #86a823; }
.st-dot.is-ok, .st-bar i.is-ok { background: #2f9e5c; }
.st-dot.is-done, .st-bar i.is-done { background: #157a42; }
.st-dot.is-no, .st-bar i.is-no { background: #d9534f; }
.st-dot.is-group { background: #fff; box-shadow: inset 0 0 0 2px #1f86e8; }
.st-tags { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; min-width: 0; }
.st-tag {
  display: inline-flex; align-items: center; gap: 5px; min-height: 22px; padding: 0 8px; border-radius: 99px;
  background: #f3f5f8; color: var(--text); font-size: 12px; font-weight: 650; white-space: nowrap;
}
.st-tag b { color: var(--heading); font-weight: 800; font-variant-numeric: tabular-nums; }
.st-more { color: var(--muted); font-size: 12px; font-weight: 700; }
.st-pills { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-top: 3px; }
.chip.st-pill { min-height: 17px; padding: 0 6px; border-radius: 5px; font-size: 10.5px; font-weight: 700; line-height: 1; white-space: nowrap; }
.chip.st-pill b { margin-left: 2px; font-weight: 800; }
.st-pills .st-more { font-size: 10.5px; line-height: 1; }
.stats-table .st-col { width: 34%; padding-left: 14px; text-align: right; }
.stats-table .st-pills { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 4px; margin: 0; }
.stats-table .chip.st-pill { min-height: 20px; font-size: 12px; }
.route-panel-st { display: grid; gap: 8px; padding: 10px 16px 12px; border-bottom: 1px solid var(--phase-line); }
.pick-group { padding: 8px 10px 4px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.pick-group:not(:first-child) { margin-top: 4px; border-top: 1px solid var(--phase-line); }
.pick-opt-text, .pick-btn > span:has(.st-dot) { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.stats-bar .pick.is-on .pick-btn { border-color: #9cc8f2; background: #eef6ff; color: #1d6fbf; }
.stats-sub { border: 1px solid var(--phase-line); border-radius: 10px; padding: 8px 10px 4px; background: #f8fafd; }
.stats-sub-head { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; color: var(--heading); font-weight: 800; }
.stats-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.stats-table th, .stats-table td { padding: 6px 4px; text-align: right; }
.stats-table th:first-child, .stats-table td:first-child { text-align: left; }
.stats-table th { color: var(--muted); font-size: 12px; font-weight: 600; }
.stats-table tbody td { border-top: 1px solid var(--phase-line); }
.stats-table tfoot td { border-top: 1.5px solid var(--border); color: var(--heading); font-weight: 800; }
.route-map {
  position: relative; height: clamp(460px, calc(100vh - 330px), 640px); margin-bottom: 10px; overflow: hidden;
  border: 1px solid var(--border); border-radius: 18px; background: #eef1f4; box-shadow: 0 12px 34px rgba(26, 36, 56, .08);
}
.route-map[hidden], .route-offmap[hidden] { display: none; }
.route-canvas { position: absolute; inset: 0; }
.route-canvas .maplibregl-ctrl-top-right { top: 48px; }
@media (min-width: 901px) {
  #view-stats .stats-total, #view-stats .stats-list { display: none; }
}
@media (max-width: 900px) {
  .stats-pivot { display: none !important; }
}
.route-canvas .maplibregl-ctrl-group { border-radius: 10px; box-shadow: 0 4px 14px rgba(26, 36, 56, .12); }
.route-svg { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.route-line { fill: none; stroke: var(--kicker); stroke-opacity: .5; stroke-linecap: round; transition: stroke-opacity .2s, stroke .2s; }
.route-svg.has-focus .route-line { stroke-opacity: .1; }
.route-svg .route-line.is-focus { stroke: #0b5cad; stroke-opacity: .95; stroke-dasharray: 7 5; animation: route-flow 1.1s linear infinite; }
@keyframes route-flow { to { stroke-dashoffset: -24; } }
.route-dot { transition: opacity .2s; }
.route-svg.has-focus .route-dot:not(.is-focus) { opacity: .28; }
.route-hit { fill: transparent; pointer-events: auto; cursor: pointer; }
.route-ring { fill: rgba(31, 134, 232, .16); stroke: none; pointer-events: none; transition: r .18s; }
.route-core { fill: var(--kicker); stroke: #fff; stroke-width: 1.5; pointer-events: none; }
.route-dot.is-focus .route-core { fill: #0b5cad; }
.route-dot.is-picked .route-ring { fill: rgba(11, 92, 173, .22); animation: route-pulse 1.6s ease-out infinite; }
@keyframes route-pulse { 0% { opacity: 1; } 100% { opacity: .2; } }
.route-dot text {
  fill: #4a5869; font: 600 11px Inter, "Noto Sans SC", sans-serif; text-anchor: middle; pointer-events: none;
  paint-order: stroke; stroke: rgba(255, 255, 255, .94); stroke-width: 3px;
}
.route-dot.is-focus text { fill: var(--heading); font-size: 12px; font-weight: 800; }
.route-dot text.is-hidden { display: none; }
.route-hub {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px;
  background: var(--heading); color: #fff; font: 700 12px Inter, "Noto Sans SC", sans-serif; white-space: nowrap;
  box-shadow: 0 6px 16px rgba(26, 36, 56, .28);
}
.route-hub i { width: 7px; height: 7px; border-radius: 50%; background: #5fb4ff; box-shadow: 0 0 0 3px rgba(95, 180, 255, .3); }
.route-tip {
  position: absolute; z-index: 6; width: 210px; padding: 10px 12px; border: 1px solid var(--soft-border); border-radius: 12px;
  background: #fff; box-shadow: var(--shadow); pointer-events: none;
}
.route-tip[hidden] { display: none; }
.route-tip-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.route-tip-head b { color: var(--heading); font-size: 16px; }
.route-tip-head span { color: var(--muted); font-size: 12px; font-weight: 800; }
.route-tip-sum { margin-top: 4px; color: var(--muted); font-size: 13px; }
.route-tip-sum b { color: var(--kicker); font-size: 15px; }
.route-tip-foot { margin-top: 6px; color: var(--kicker); font-size: 12px; font-weight: 600; }
.route-full {
  position: absolute; top: 14px; right: 14px; z-index: 5; display: grid; place-items: center; width: 34px; height: 34px; padding: 0;
  border: 1px solid var(--border); border-radius: 10px; background: #fff; color: var(--heading); cursor: pointer;
  box-shadow: 0 4px 14px rgba(26, 36, 56, .12); transition: color .15s, background .15s;
}
.route-full:hover { background: var(--soft); color: var(--kicker); }
.route-full svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.route-full .is-exit, .stats-stage.is-full .route-full .is-enter { display: none; }
.stats-stage.is-full .route-full .is-exit { display: block; }
.route-empty {
  position: absolute; top: 50%; left: 50%; z-index: 4; padding: 10px 18px; transform: translate(-50%, -50%);
  border: 1px solid var(--border); border-radius: 999px; background: rgba(255, 255, 255, .94);
  color: var(--muted); font-size: 14px; font-weight: 600; pointer-events: none; box-shadow: 0 8px 22px rgba(26, 36, 56, .1);
}
.route-empty[hidden] { display: none; }
.stats-stage.is-full {
  position: fixed; inset: 0; z-index: 19; display: flex; flex-direction: column; gap: 10px;
  padding: 16px 20px; background: var(--bg, #f5f7fa);
}
html.is-client .stats-stage.is-full { padding-top: 46px; }
.stats-stage.is-full .stats-bar { flex: none; margin: 0; }
.stats-stage.is-full .route-map { flex: 1; height: auto; min-height: 0; margin: 0; }
.stats-stage.is-full .route-offmap { flex: none; margin: 0; }
.stats-stage.is-full .stats-pivot { flex: 1; height: auto; min-height: 0; margin: 0; }
.stats-mode { margin-left: auto; }
.stats-mode button { display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; cursor: pointer; }
.stats-mode svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.stats-pivot {
  display: flex; flex-direction: column; height: clamp(460px, calc(100vh - 330px), 900px); margin-bottom: 10px; overflow: hidden;
  border: 1px solid var(--border); border-radius: 18px; background: #fff; box-shadow: 0 12px 34px rgba(26, 36, 56, .08);
}
.stats-pivot[hidden] { display: none; }
.stats-trend-date { display: inline-flex; align-items: center; gap: 4px; max-width: 220px; margin-left: 8px; }
.stats-trend-date span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stats-trend-range, .stats-trend { display: none; }
#view-stats.is-trend .stats-trend-range { display: inline-flex; }
#view-stats.is-trend .stats-trend { display: block; }
#view-stats.is-trend #statsRange, #view-stats.is-trend .stats-total, #view-stats.is-trend .stats-list,
#view-stats.is-trend .route-map, #view-stats.is-trend .route-offmap, #view-stats.is-trend .stats-pivot { display: none !important; }
.stats-trend {
  margin-bottom: 10px; padding: 14px 18px 12px; border: 1px solid var(--border); border-radius: 18px;
  background: #fff; box-shadow: 0 12px 34px rgba(26, 36, 56, .08);
}
.stats-trend.is-waiting .trend-svg { opacity: .28; }
.trend-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.trend-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-left: auto; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.trend-key { display: inline-flex; align-items: center; gap: 6px; }
.trend-title { color: var(--heading); font-size: 15px; font-weight: 800; }
.trend-key i { width: 18px; height: 0; border-top: 2px solid var(--c, #1f86e8); }
.trend-key.is-cur { color: var(--heading); }
.trend-key-date { font-style: normal; }
.trend-key.is-cur i { border-top-width: 3px; }
.trend-key.is-avg i { border-top: 2px dashed #f59e0b; }
.trend-wk-name { color: var(--c) !important; }
.trend-sum { display: flex; align-items: stretch; gap: 10px; flex-wrap: wrap; margin: 12px 0 6px; color: var(--muted); font-size: 13px; }
.trend-card {
  display: flex; flex-direction: column; gap: 2px; min-width: 112px; padding: 8px 12px; border-radius: 10px;
  background: #f6f8fb; border-left: 3px solid var(--c, #c9d3df);
}
.trend-card span { color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.trend-card b { color: var(--heading); font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.2; }
.trend-card b small { margin-left: 3px; color: var(--muted); font-size: 12px; font-weight: 600; }
.trend-card:first-child { --c: #1f86e8; }
.trend-card.is-avg { --c: #f59e0b; background: #fff8ec; }
.trend-card.is-avg b { color: #b45309; }
.trend-card.is-peak { --c: #1f9254; }
.trend-card.is-low { --c: #d64545; }
.trend-card.is-week { --c: inherit; }
.trend-card.is-week span { color: var(--c); font-weight: 800; }
.trend-card.is-week.is-cur { background: #eef5fd; }
.trend-x.is-note { align-self: flex-end; margin-left: auto; font-size: 12px; }
.trend-wait { color: var(--muted); }
.trend-d { color: var(--muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
.trend-d.is-flat { color: #9aa6b4; font-weight: 600; }
.trend-date { font-weight: 700; color: var(--heading); }
.trend-item.is-empty > .trend-row { color: #b3bcc8; cursor: default; }
.trend-item.is-empty > .trend-row:hover { background: transparent; }
.trend-fold { margin-left: 10px; padding: 1px 8px; border: 1px solid var(--border); border-radius: 999px; background: #fff; color: var(--kicker); font-size: 11.5px; font-weight: 700; cursor: pointer; }
.stats-rec .rec-vol { color: var(--heading); font-weight: 800; }
.trend-d.is-up { color: #1f9254; }
.trend-d.is-down { color: #d64545; }
.trend-chart { position: relative; }
.trend-svg { display: block; width: 100%; height: 260px; overflow: visible; }
.trend-grid { stroke: #edf0f4; stroke-width: 1; }
.trend-axis { fill: #9aa6b4; font-size: 11px; font-weight: 600; }
.trend-area { fill: rgba(31, 134, 232, .08); opacity: 0; }
.trend-line { fill: none; stroke-linejoin: round; stroke-linecap: round; }
.trend-dot { opacity: 0; }
.trend-line { stroke-width: 2; }
.trend-line.is-cur { stroke-width: 3; }
.trend-dot { fill: #fff; stroke-width: 2; }
.trend-val { font-size: 11px; font-weight: 800; }
.trend-avg { stroke: #f59e0b; stroke-width: 1.5; stroke-dasharray: 6 4; opacity: 0; }
.trend-avg-text { fill: #b45309; font-size: 11px; font-weight: 800; }
.trend-tip-dot { display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 50%; }
.trend-guide { stroke: #1f86e8; stroke-opacity: .35; stroke-dasharray: 3 3; }
.trend-hit { fill: #000; fill-opacity: 0; cursor: pointer; }
.trend-tip {
  position: absolute; top: 0; z-index: 3; min-width: 180px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px;
  background: #fff; box-shadow: 0 12px 30px rgba(26, 36, 56, .16); font-size: 12.5px; pointer-events: none;
}
.trend-tip b { display: block; margin-bottom: 6px; color: var(--heading); font-size: 13px; }
.trend-tip-row { display: flex; align-items: baseline; gap: 8px; margin-top: 3px; }
.trend-tip-row span { color: var(--muted); }
.trend-tip-row em { margin-left: auto; color: var(--heading); font-style: normal; font-weight: 800; font-variant-numeric: tabular-nums; }
.trend-tip-sub { margin-top: 2px; color: #9aa6b4; font-size: 11px; text-align: right; }
.trend-tip-old { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--phase-line); color: var(--muted); font-size: 12px; }
.trend-list { margin-top: 10px; border-top: 1px solid var(--phase-line); max-height: 320px; overflow: auto; }
@media (min-width: 901px) {
  #view-stats.is-trend .stats-trend { display: flex; flex-direction: column; height: var(--trend-h, auto); min-height: 480px; }
  .stats-trend .trend-head, .stats-trend .trend-sum, .stats-trend .trend-chart { flex: none; }
  .stats-trend .trend-list { flex: 1; min-height: 120px; max-height: none; }
}
.trend-row {
  display: grid; grid-template-columns: 14px minmax(150px, 1.3fr) .5fr .9fr .6fr .9fr 2.6fr; align-items: center; gap: 12px; padding: 9px 6px;
  border-bottom: 1px solid #f1f3f6; font-size: 13px; font-variant-numeric: tabular-nums; cursor: pointer;
}
.trend-row .stats-day-caret { margin: 0; }
.trend-item.is-open > .trend-row .stats-day-caret { transform: rotate(45deg); }
.trend-row:hover, .trend-row.is-on, .trend-item.is-open > .trend-row { background: #f3f8fe; }
.trend-sub { padding: 2px 0 6px; background: #f3f8fe; border-bottom: 1px solid #e6edf5; }
.trend-item.is-sub > .trend-row > .stats-day-caret { margin-left: 16px; }
.trend-item.is-sub > .trend-row > span:first-of-type { padding-left: 20px; }
.trend-item.is-sub > .trend-recs { padding-left: 30px; }
.trend-item.is-sub > .trend-row { padding: 8px 6px; border-bottom: 1px dashed #dfe7f1; background: transparent; font-size: 12.5px; }
.trend-item.is-sub > .trend-row:hover, .trend-item.is-sub.is-open > .trend-row { background: #e8f1fc; }
.trend-item.is-sub > .trend-recs { background: transparent; border-bottom: 0; }
.trend-grp { color: var(--heading); font-weight: 700; letter-spacing: .02em; }
.trend-cnt { color: var(--heading); font-weight: 600; }
.trend-mix { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; white-space: nowrap; color: var(--muted); font-size: 12px; }
.trend-mix > em { font-style: normal; color: #9aa6b4; }
.trend-mix-i { display: inline-flex; align-items: baseline; gap: 4px; padding: 2px 8px; border-radius: 999px; background: #f1f5fa; color: var(--muted); font-variant-numeric: tabular-nums; }
.trend-mix-i b { color: var(--heading); font-size: 12px !important; font-weight: 700; }
.trend-row.is-head .trend-mix { font-size: 12px; }
.trend-item.is-sub .trend-mix-i { background: #fff; }
.trend-recs {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 0 8px;
  padding: 2px 6px 10px; background: #f3f8fe; border-bottom: 1px solid #e6edf5;
}
.trend-row.is-head { position: sticky; top: 0; z-index: 1; background: #fff; color: var(--muted); font-size: 12px; font-weight: 700; cursor: default; }
.trend-row b { color: var(--heading); font-weight: 800; }
.trend-row.is-foot {
  position: sticky; bottom: 0; z-index: 1; border-top: 1px solid var(--border); border-bottom: 0; background: #f6f9fd;
  color: var(--heading); font-weight: 700; cursor: default; box-shadow: 0 -6px 12px -8px rgba(26, 36, 56, .18);
}
.trend-row.is-foot:hover { background: #f6f9fd; }
.trend-foot-base { color: #b45309; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.trend-foot-base b { color: #b45309 !important; }
.pivot-head { display: flex; align-items: center; gap: 12px; flex: none; padding: 12px 14px 12px 18px; border-bottom: 1px solid var(--phase-line); }
.pivot-sum { display: flex; align-items: baseline; gap: 6px; flex: 1; min-width: 0; color: var(--muted); font-size: 13px; flex-wrap: wrap; }
.pivot-sum > span { margin-right: 4px; color: var(--heading); font-size: 14px; font-weight: 800; }
.pivot-sum b { color: var(--kicker); font-size: 20px; font-weight: 800; }
.pivot-sum em { margin-left: 10px; font-size: 12px; font-style: normal; color: #9aa6b5; }
.pivot-head .route-full { position: static; flex: none; box-shadow: none; }
.pivot-wrap { flex: 1; min-height: 0; overflow: auto; }
.pivot-wrap > .empty { padding: 60px 12px; text-align: center; }
table.pivot { border-collapse: separate; border-spacing: 0; min-width: 100%; font-size: 13px; font-variant-numeric: tabular-nums; }
.pivot th, .pivot td { padding: 0 8px; height: 44px; border-bottom: 1px solid var(--phase-line); white-space: nowrap; background: #fff; }
.pivot thead th {
  position: sticky; top: 0; z-index: 2; height: 46px; background: var(--phase);
  color: var(--muted); font-size: 12px; font-weight: 700; border-bottom: 1px solid var(--border);
}
.pivot .pv-key { position: sticky; left: 0; z-index: 1; width: 190px; min-width: 190px; max-width: 190px; text-align: left; }
.pivot .pv-c { position: sticky; left: 190px; z-index: 1; width: 64px; min-width: 64px; }
.pivot .pv-v { position: sticky; left: 254px; z-index: 1; width: 92px; min-width: 92px; box-shadow: inset -1px 0 0 var(--border); }
.pivot thead .pv-key, .pivot thead .pv-c, .pivot thead .pv-v { z-index: 3; }
.pivot .pv-num { text-align: right; color: var(--heading); font-weight: 700; }
.pivot .pv-v { color: var(--kicker); }
.pv-sort {
  display: inline-flex; align-items: center; gap: 3px; padding: 0; border: 0; background: transparent;
  color: inherit; font: inherit; cursor: pointer;
}
.pv-sort:hover, .pv-sort.is-sort { color: var(--kicker); }
.pv-sort.is-sort::after { content: "↓"; font-size: 11px; }
.pv-sort.is-sort.is-asc::after { content: "↑"; }
.pivot .pv-day { min-width: 70px; text-align: center; }
.pivot tbody .pv-day:not(.is-empty) { padding: 6px 4px; }
.pivot thead .pv-day span { display: block; color: var(--heading); font-size: 12px; font-weight: 700; line-height: 1.2; }
.pivot thead .pv-day small { display: block; font-size: 11px; font-weight: 600; line-height: 1.2; }
.pivot thead .pv-day.is-weekend small { color: #d07a2a; }
.pivot tbody .pv-day { background: rgba(31, 134, 232, var(--heat, 0)); }
.pivot tbody .pv-day.is-weekend.is-empty, .pivot tfoot .pv-day.is-weekend { background: #fafbfd; }
.pivot .pv-day b { display: block; color: var(--heading); font-size: 13px; font-weight: 800; line-height: 1.15; }
.pivot .pv-day small { display: block; color: var(--muted); font-size: 11px; line-height: 1.15; }
.pivot .pv-day.is-empty { color: #cfd6df; }
.pv-label { color: var(--heading); font-weight: 800; }
.pivot .pv-key em { margin-left: 6px; color: var(--muted); font-size: 12px; font-style: normal; font-weight: 500; }
.pivot tr.is-link { cursor: pointer; }
.pivot tbody tr:hover > * { background-color: #f3f8fe; }
.pivot tbody tr:hover .pv-day:not(.is-empty) { background: rgba(31, 134, 232, calc(var(--heat, 0) + .08)); }
.pivot tr.is-link:hover .pv-label { color: var(--kicker); }
.pv-group { cursor: pointer; }
.pv-caret {
  display: inline-block; width: 7px; height: 7px; margin: 0 8px 2px 2px; border: solid var(--muted); border-width: 0 2px 2px 0;
  transform: rotate(-45deg); transition: transform .15s;
}
.pv-group.is-open .pv-caret { transform: rotate(45deg); margin-bottom: 4px; }
.pivot tr.pv-sub > * { height: 38px; background: #fbfcfe; }
.pivot tr.pv-sub .pv-key { padding-left: 34px; }
.pivot tr.pv-sub .pv-label { font-weight: 700; }
.pivot tfoot td, .pivot tfoot th { position: sticky; bottom: 0; z-index: 2; background: #f4f7fb; border-top: 1.5px solid var(--border); border-bottom: 0; }
.pivot tfoot .pv-key, .pivot tfoot .pv-c, .pivot tfoot .pv-v { z-index: 3; }
.pivot tfoot .pv-day b { color: var(--kicker); }
body.route-full-open { overflow: hidden; }
.route-regions {
  position: absolute; bottom: 14px; left: 50%; z-index: 5; display: flex; gap: 2px; max-width: calc(100% - 40px);
  padding: 4px; overflow-x: auto; transform: translateX(-50%);
  border: 1px solid var(--border); border-radius: 999px; background: rgba(255, 255, 255, .94); box-shadow: 0 8px 22px rgba(26, 36, 56, .1);
}
.route-regions button {
  display: inline-flex; align-items: center; gap: 5px; flex: none; min-height: 30px; padding: 0 14px;
  border: 0; border-radius: 999px; background: transparent; color: var(--text); font-size: 13px; font-weight: 650; cursor: pointer;
}
.route-regions button em { color: var(--muted); font-size: 11px; font-style: normal; font-weight: 700; }
.route-regions button:hover:not(:disabled) { background: var(--control); }
.route-regions button.is-on { background: var(--kicker); color: #fff; }
.route-regions button.is-on em { color: rgba(255, 255, 255, .85); }
.route-regions button:disabled { color: #a9b4c2; cursor: default; }
.route-regions button:disabled em { color: #c3ccd7; }
.route-loading {
  position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; color: var(--muted); font-size: 14px; pointer-events: none;
}
.route-loading[hidden] { display: none; }
.route-panel {
  position: absolute; top: 14px; right: 14px; bottom: 14px; z-index: 7; display: flex; flex-direction: column;
  width: min(400px, calc(100% - 28px)); overflow: hidden;
  border: 1px solid var(--border); border-radius: 18px; background: #fff; box-shadow: 0 18px 44px rgba(26, 36, 56, .18);
  animation: route-panel-in .26s var(--ease);
}
.route-panel[hidden] { display: none; }
.route-panel.is-float { position: fixed; right: auto; bottom: auto; z-index: 18; box-shadow: 0 22px 56px rgba(26, 36, 56, .24); }
.route-panel.is-float .route-panel-head { cursor: grab; user-select: none; touch-action: none; }
.route-panel.is-float .route-panel-head::before {
  content: ""; position: absolute; top: 6px; left: 50%; width: 36px; height: 4px; margin-left: -18px;
  border-radius: 2px; background: #d5dce5;
}
.route-panel.is-float .route-panel-head { position: relative; padding-top: 18px; }
.route-panel.is-dragging { animation: none; transition: none; }
.route-panel.is-dragging .route-panel-head { cursor: grabbing; }
.pivot tbody tr.is-focus > th, .pivot tbody tr.is-focus > .pv-num { background-color: #e6f1fd; }
.pivot tbody tr.is-focus .pv-key { box-shadow: inset 3px 0 0 var(--kicker); }
.pivot tbody tr.is-focus .pv-label { color: var(--kicker); }
.route-map.has-panel .route-regions { left: 48px; max-width: calc(100% - 478px); transform: none; }
.route-map.has-panel .route-full { right: 428px; }
.route-map.has-panel .route-canvas .maplibregl-ctrl-top-right { right: 418px; }
@keyframes route-panel-in { from { opacity: 0; transform: translateX(16px); } }
.route-panel-head { display: flex; align-items: flex-start; gap: 10px; padding: 16px 16px 10px; }
.route-panel-head > div { flex: 1; min-width: 0; }
.route-panel-head .kicker { margin: 0 0 2px; }
.route-panel-head h3 { margin: 0; color: var(--heading); font-size: 22px; font-weight: 800; }
.route-panel-head h3 small { margin-left: 8px; color: var(--muted); font-size: 13px; font-weight: 700; }
.route-panel-close {
  width: 30px; height: 30px; padding: 0; border: 1px solid var(--border); border-radius: 50%;
  background: #fff; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer;
}
.route-panel-close:hover { border-color: var(--kicker); color: var(--kicker); }
.route-panel-day {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: -4px 16px 10px; padding: 6px 10px;
  border-radius: 8px; background: #eef5fc; color: #1667b5; font-size: 13px; font-weight: 700;
}
.route-panel-all { padding: 0; border: 0; background: none; color: var(--kicker); font-size: 12px; font-weight: 650; cursor: pointer; }
.route-panel-all:hover { text-decoration: underline; }
.route-panel-sum { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 0 16px 12px; border-bottom: 1px solid var(--phase-line); }
.route-panel-sum div { padding: 8px 6px; border-radius: 10px; background: var(--control); text-align: center; }
.route-panel-sum b { display: block; color: var(--kicker); font-size: 17px; font-variant-numeric: tabular-nums; }
.route-panel-sum span { color: var(--muted); font-size: 11px; font-weight: 600; }
.route-panel-list { flex: 1; display: grid; align-content: start; gap: 10px; padding: 12px 14px 16px; overflow-y: auto; }
.route-rec {
  border: 1px solid var(--border); border-radius: 12px; background: #fff; cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.route-rec:hover, .route-rec:focus-visible { border-color: var(--kicker); box-shadow: 0 4px 14px rgba(31, 134, 232, .14); outline: none; }
.route-rec header { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--phase-line); }
.route-cust { flex: 1; min-width: 0; overflow: hidden; color: var(--heading); font-size: 15px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.route-cust em { margin-left: 6px; color: var(--muted); font-size: 12px; font-style: normal; font-weight: 600; }
.route-cols { display: grid; grid-template-columns: 1fr 1fr; }
.route-cols section { min-width: 0; padding: 8px 12px 10px; background: var(--commerce); }
.route-cols section.is-booking { background: var(--booking); }
.route-cols section:first-child { border-bottom-left-radius: 11px; }
.route-cols section:last-child { border-bottom-right-radius: 11px; }
.route-cols h4 { margin: 0 0 4px; color: var(--kicker); font-size: 12px; font-weight: 800; }
.route-cols .is-booking h4 { color: #b7791f; }
.route-cols dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 8px; margin: 0; font-size: 12px; }
.route-cols dt { color: var(--muted); white-space: nowrap; }
.route-cols dd { min-width: 0; margin: 0; overflow: hidden; color: var(--heading); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.route-none { color: #b3bdca; font-weight: 400; }
.route-wait { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.route-more { margin: 4px 0 0; color: #b7791f; font-size: 12px; font-weight: 600; }
.route-offmap { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: -2px 0 10px; color: var(--muted); font-size: 12px; }
.route-offmap button {
  min-height: 28px; padding: 0 12px; border: 1px solid var(--border); border-radius: 999px;
  background: #fff; color: var(--text); font-size: 12px; font-weight: 650; cursor: pointer;
}
.route-offmap button b { margin: 0 2px 0 6px; color: var(--kicker); }
.route-offmap button:hover, .route-offmap button.is-on { border-color: var(--kicker); color: var(--kicker); }
.log-cards { display: none; }
.log-day { margin: 8px 2px 0; color: var(--muted); font-size: 12px; font-weight: 700; }
.log-day:first-child { margin-top: 0; }
.log-card header { display: flex; align-items: center; gap: 8px; }
.log-actor { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--heading); font-size: 14px; }
.log-card time { flex: none; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.log-tag {
  flex: none; display: inline-flex; align-items: center; min-height: 20px; padding: 0 8px;
  border-radius: 6px; font-size: 12px; font-weight: 750; white-space: nowrap;
}
.log-tag.is-edit { background: #e7f2fc; color: #1565b0; }
.log-tag.is-new { background: #e5f5ea; color: #2f7d4a; }
.log-tag.is-import { background: #efeafd; color: #6a4bc4; }
.log-tag.is-config { background: #eef1f5; color: #5f6b7a; }
.log-tag.is-danger { background: #d64545; color: #fff; }
.log-title { margin: 6px 0 0; color: var(--heading); font-size: 14px; font-weight: 650; word-break: break-word; }
.log-card.is-danger { border-color: #f1c3c3; background: #fffafa; box-shadow: inset 3px 0 0 #d64545; }
.log-card.is-danger .log-title, tr.is-danger .log-title { color: #c53b3b; }
.log-lines { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.log-lines li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; font-size: 13px; line-height: 1.5; word-break: break-word; }
.log-zone { flex: none; padding: 0 5px; border-radius: 4px; font-size: 11px; font-weight: 700; }
.log-zone.is-commerce { background: var(--commerce); color: #1a6fa8; }
.log-zone.is-booking { background: var(--booking); color: #8d6914; }
.log-field { flex: none; color: #1f6fbf; font-weight: 700; }
.log-old { color: #9aa4b1; }
.log-old.is-empty, .log-new.is-empty { color: #b3bcc7; font-style: italic; font-weight: 500; }
.log-arrow { color: #9aa4b1; }
.log-new { color: #1f8a4c; font-weight: 750; }
.log-val { color: var(--text); }
.log-card.is-danger .log-val { color: #9a5a5a; }
.log-plain { color: var(--text); }
.log-fold { margin-top: 4px; }
.log-fold summary { color: var(--kicker); font-size: 12px; font-weight: 700; cursor: pointer; list-style: none; }
.log-fold summary::-webkit-details-marker { display: none; }
.log-fold summary::after { content: " ›"; }
.log-fold[open] summary { display: none; }
.log-more { display: flex; justify-content: center; padding: 12px 0; }
.trail-act.is-del { background: var(--danger-bg); color: var(--danger); }
.trail-act.is-edit { background: #fff3d4; color: #8d6914; }
.tabbar {
  display: none; position: fixed; z-index: 15;
  left: 0; right: 0; bottom: 0;
  padding: 4px 8px calc(4px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--phase-line);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(16px);
}
.tab-ico { width: 24px; height: 24px; display: grid; place-items: center; color: #8b97a6; }
.tab-ico svg { width: 22px; height: 22px; display: block; }
.tab-ico .tab-ico-trend, .tabbar button.is-trend .tab-ico svg:first-child { display: none; }
.tabbar button.is-trend .tab-ico .tab-ico-trend { display: block; }
.tab-swap { display: none; }
.tabbar button.is-active .tab-swap {
  position: absolute; right: -9px; bottom: -2px; display: grid; place-items: center; width: 14px; height: 14px; border-radius: 50%;
  background: #1f86e8; color: #fff; font-size: 9px; font-style: normal; font-weight: 800; line-height: 1; box-shadow: 0 0 0 2px #fff;
}
.tabbar button.is-active .tab-swap::before { content: "⇄"; }
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 30; transform: translateX(-50%);
  max-width: min(520px, calc(100% - 24px));
  padding: 10px 14px; border-radius: 999px; background: var(--heading); color: #fff; font-size: 14px;
}

.modal {
  position: fixed; inset: 0; z-index: 40;
  display: flex; align-items: center; justify-content: center;
  padding: 24px 16px;
  background: rgba(26, 36, 51, .28);
  animation: fade-in .22s ease both;
}
.modal-card {
  width: min(560px, 100%);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  /* 不能用 both：停在 transform 上会让卡片成为 fixed 下拉菜单的定位容器，菜单被裁掉、错位 */
  animation: pop-in .22s var(--ease) backwards;
}
.import-card { width: min(640px, 100%); }
.import-card .drop { min-height: 112px; padding: 16px; }
.log-sheet { width: 100%; min-width: 0; table-layout: fixed; }
.log-sheet th.log-col-time { width: 168px; }
.log-sheet th.log-col-actor { width: 88px; }
.log-sheet th.log-col-action { width: 112px; }
.log-sheet th.log-col-ip { width: 128px; }
.log-sheet th.log-col-device { width: 190px; }
.log-meta-cell { color: var(--muted); font-size: 12px; word-break: break-all; }
.log-meta { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.log-office { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: -4px 0 12px; color: var(--muted); font-size: 13px; }
.log-office[hidden] { display: none; }
.log-office-label { font-weight: 700; color: var(--heading); }
.log-office-gap { flex: 1; }
.log-cols-wrap { position: relative; }
.log-cols-pop {
  position: absolute; z-index: 20; right: 0; top: calc(100% + 6px); min-width: 150px; padding: 8px;
  border: 1px solid var(--border); border-radius: 12px; background: #fff; box-shadow: 0 12px 30px rgba(26, 36, 56, .14);
}
.log-col-opt { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; color: var(--text); cursor: pointer; }
.log-col-opt:hover { background: var(--control); }
.log-sheet td { vertical-align: top; white-space: normal; }
.log-sheet tr.is-openable, .log-card.is-openable { cursor: pointer; }
.log-sheet tr.is-openable:hover td { background: rgba(64, 128, 255, .05); }
.modal-head, .modal-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 14px;
}
.modal-head { border-bottom: 1px solid var(--border); }
.modal-foot { border-top: 1px solid var(--border); justify-content: flex-end; }
.modal-head h2 { font-size: 17px; }
.modal-x { border: 0; background: transparent; color: var(--muted); }
.modal-x:hover { background: var(--phase); color: var(--heading); }
.modal-body { padding: 14px; display: grid; gap: 10px; max-height: 70vh; overflow: auto; }
.import-body { grid-template-columns: 1fr; }
.pwd-form { display: grid; gap: 10px; }
.name-now { margin: 0; color: var(--muted); font-size: 13px; }
.name-now b { color: var(--heading); font-weight: 600; }
.dirty-card { width: min(420px, 100%); }
.dirty-card .modal-body p { color: var(--muted); font-size: 14px; line-height: 1.6; }

.valid-list { display: grid; gap: 8px; }
.valid-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: #fff;
}
.valid-row strong { color: var(--heading); font-size: 14px; }
.valid-row p { margin: 2px 0 0; color: var(--muted); font-size: 13px; word-break: break-all; }
.valid-mark {
  display: grid; place-items: center; width: 20px; height: 20px; flex: none;
  border-radius: 50%; font-size: 13px; font-weight: 700; line-height: 1;
}
.valid-row.is-ok .valid-mark { background: var(--ok-bg); color: var(--ok); }
.valid-row.is-bad .valid-mark { background: var(--danger-bg); color: var(--danger); }
.valid-row.is-wait .valid-mark { background: #fff6e8; color: #9a6b12; }
.valid-row.is-bad { border-color: #f3c4c6; }

.import-card { transition: width .24s var(--ease); }
.import-card.has-changes { width: min(820px, 100%); }
.import-card.has-changes .drop { min-height: 0; padding: 10px 16px; }
.import-card.has-changes .path-row,
.import-card.has-changes .hint-list { display: none; }
.import-card.has-changes .valid-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.import-card.has-changes .valid-row { padding: 8px 10px; }
.chg-tip { margin: -2px 0 8px; color: var(--muted); font-size: 13px; }
.chg-list { display: grid; gap: 8px; max-height: 42vh; overflow: auto; padding-right: 2px; }
.chg-card {
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; overflow: hidden;
  transition: opacity .18s ease, transform .18s ease;
}
.chg-head {
  display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 12px;
  background: var(--phase); border-bottom: 1px solid var(--phase-line);
}
.chg-title { min-width: 0; flex: 1; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.chg-title strong { color: var(--heading); font-size: 14px; }
.chg-title span { color: var(--muted); font-size: 12px; }
.chg-row {
  display: grid; grid-template-columns: 112px minmax(0, 1fr) 30px; align-items: center; gap: 10px;
  padding: 6px 8px 6px 12px; border-top: 1px solid var(--phase-line);
  transition: opacity .18s ease, transform .18s ease, background .12s;
}
.chg-head + .chg-row { border-top: 0; }
.chg-row:hover { background: #f7fafd; }
.chg-card.is-leaving, .chg-row.is-leaving { opacity: 0; transform: translateX(16px); }
.chg-label { color: var(--muted); font-size: 12px; font-weight: 600; }
.chg-values { min-width: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.chg-old, .chg-new { max-width: 100%; padding: 1px 6px; border-radius: 6px; word-break: break-all; }
.chg-old { color: #8a96a4; background: #f2f4f7; text-decoration: line-through; }
.chg-new { color: #0f5c2e; background: var(--ok-bg); text-decoration: none; font-weight: 600; }
.chg-old.is-empty, .chg-new.is-empty { font-style: italic; font-weight: 500; }
.chg-new.is-empty { color: var(--danger); background: var(--danger-bg); }
.chg-arrow { color: var(--muted); }
.chg-trash {
  display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0;
  border: 1px solid transparent; border-radius: 8px; background: transparent; color: #98a3b1; cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
}
.chg-trash svg { width: 16px; height: 16px; }
.chg-trash:hover { background: var(--danger-bg); border-color: #f3c4c6; color: var(--danger); }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

@media (max-width: 900px) {
  .login-gate { grid-template-columns: 1fr; }
  .login-hero { min-height: 42vh; padding: 24px 16px 12px; }
  .login-stage { width: min(280px, 78%); height: 220px; }
  .login-logo { width: min(260px, 78%); }
  .desk { display: block; padding: 0; }
  .sidebar, .side-expand { display: none; }
  .desk-main { height: auto; min-height: 100vh; border-radius: 0; padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .desk-only { display: none !important; }
  .navbar { height: 40px; }
  .navbar-inner { padding: 0 12px; }
  .past-alert { height: 28px; max-width: 52vw; padding: 0 9px; font-size: 12px; }
  .past-alert-m { display: inline-flex; }
  .past-alert-m[hidden] { display: none; }
  .page { padding: 8px 10px 12px; }
  .page-head { display: grid; grid-template-columns: 1fr; gap: 8px; margin-bottom: 8px; }
  h1 { font-size: 20px; }
  .kicker { margin-bottom: 2px; }
  .sub { margin-top: 2px; font-size: 13px; }
  .page-actions { justify-content: flex-end; gap: 6px; }
  .btn { min-height: 32px; padding: 4px 12px; font-size: 13px; }
  .filters, .section-body, .user-form { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px; }
  .filters > input, .filters > .q-box { grid-column: 1 / -1; }
  .q-box > input { padding-right: 40px; }
  .q-box > .fav-view {
    position: absolute; top: 50%; right: 3px; width: 30px; height: 28px; margin: 0; transform: translateY(-50%);
    border: 0; border-radius: 8px; background: transparent; box-shadow: none;
  }
  .date-pop {
    flex-direction: column; width: auto; max-width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px - env(safe-area-inset-bottom)); overflow: auto;
  }
  .date-quick {
    display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; gap: 8px; width: auto;
    padding: 10px; overflow: visible; border-right: 0; border-bottom: 1px solid var(--phase-line);
  }
  .date-kicker { display: none; }
  #dateQuick, .date-quick-list { display: contents; }
  .date-quick-list button, .date-clear {
    width: auto; min-width: 0; min-height: 48px; margin: 0; padding: 8px 10px;
    border: 1px solid var(--border); border-radius: 12px; background: #fff;
    font-size: 16px; line-height: 1.25; white-space: normal; text-align: center;
    overflow-wrap: anywhere;
  }
  .date-quick-list button small { display: none; }
  .date-quick-list button.is-on { border-color: #1f86e8; background: #e7f3fd; box-shadow: none; }
  .date-pop.is-log .date-quick { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .date-pop.is-log .date-quick-list button { white-space: nowrap; }
  .date-clear { grid-column: 1 / -1; border-style: dashed; }
  .date-main { display: flex; flex-direction: column; flex: none; min-width: 0; padding: 12px 12px 0; overflow: visible; }
  .date-head { flex-wrap: wrap; align-items: center; }
  .date-head > div:first-child { flex: 1 1 9em; min-width: 0; }
  .date-head strong { font-size: 1.05rem; overflow-wrap: anywhere; }
  .date-head p, .date-hint { overflow-wrap: anywhere; }
  .date-mode { flex: none; }
  .date-mode button { min-width: 3.2em; min-height: 2.4em; font-size: 1rem; }
  .date-fields { flex-wrap: wrap; align-items: flex-end; }
  .date-field { flex: 1 1 7.5em; }
  .date-field input { min-height: 2.6em; font-size: 1rem; }
  .date-span { min-height: 2.4em; padding: 6px 10px; font-size: 0.95rem; }
  .date-cal { flex: none; overflow: visible; }
  .date-cal-bar strong { font-size: 1rem; }
  .date-cal-bar button { width: 2.4em; height: 2.4em; }
  .date-week span { font-size: 0.85rem; }
  .date-day { height: auto; min-height: 2.5em; padding: 0; font-size: 0.95rem; }
  .date-day span { width: 2em; height: 2em; max-width: 100%; }
  .date-foot {
    position: sticky; bottom: 0; z-index: 5; flex: none; flex-wrap: wrap; margin: 8px -12px 0;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--phase-line); background: #fff;
  }
  .date-foot .btn { flex: 1 1 8em; min-height: 48px; font-size: 1rem; }
  .filters { margin-bottom: 8px; }
  .control { gap: 2px; font-size: 12px; }
  .control input, .control textarea, .filters input, .inline-form input, .user-form input {
    min-height: 32px; padding: 3px 8px; font-size: 14px;
  }
  .pick-btn { min-height: 32px; padding: 3px 10px; font-size: 14px; }
  .table-wrap { display: none; }
  .dt-body { flex-direction: column; }
  .dt-time { width: auto; border-left: 0; border-top: 1px solid var(--phase-line); padding: 6px 0 0; }
  .dt-col { height: 132px; }
  .sheet-foot { flex-wrap: wrap; margin-bottom: 8px; }
  .sheet-stat { display: none; }
  .sheet-pager { margin-left: 0; width: 100%; justify-content: flex-end; }
  .cards { display: grid; gap: 6px; }
  .record-card {
    padding: 8px 10px; border: 1px solid var(--border); border-radius: 12px; background: #fff; text-align: left;
  }
  .record-card header, .record-card footer { display: flex; justify-content: space-between; gap: 6px; align-items: center; }
  .record-card h3 { margin: 0; font-size: 15px; }
  .record-card p { margin: 4px 0; color: var(--text); font-size: 13px; }
  .record-card .ask, .record-card .reply {
    padding: 4px 8px; border-radius: 8px; white-space: normal; word-break: break-word; line-height: 1.55;
  }
  .record-card .ask { background: var(--commerce); }
  .record-card .reply { background: var(--booking); }
  .form-section { margin-bottom: 8px; padding: 8px; }
  .smart-head { flex-direction: column; align-items: flex-start; gap: 2px; }
  .group-pick { gap: 6px; padding: 6px 8px; }
  .group-pick .group-pick-label { font-size: 11px; }
  .group-pick .group-pick-chips { gap: 3px; }
  .group-pick .group-chip { min-height: 24px; padding: 0 7px; font-size: 11px; }
  .smart-card textarea { min-height: 72px; }
  .section-head { margin-bottom: 6px; font-size: 14px; }
  .drawer-head { min-height: 52px; padding: 6px 8px calc(6px) 12px; padding-top: calc(6px + env(safe-area-inset-top)); }
  .drawer-back { display: grid; }
  .drawer-x { display: none; }
  .drawer-title h2 { font-size: 17px; }
  .drawer-body { padding: 10px 10px 16px; }
  .log-cards { display: grid; gap: 8px; }
  .log-card { min-height: 48px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: #fff; }
  .log-filters { flex-wrap: nowrap; }
  .log-filters > input { flex: 1 1 0; min-width: 0; min-height: 32px; padding: 3px 8px; font-size: 14px; }
  .log-types { margin: 0 -10px 8px; padding: 0 10px; }
  .log-filters .log-cols-wrap, .log-filters #logExport, .log-office-gap { display: none !important; }
  .log-filters .range-btn { flex: 0 1 auto; min-width: 0; max-width: 58%; }
  .stats-bar { flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
  .stats-dim { flex: none; padding: 2px; border-radius: 10px; }
  .stats-dim button { min-height: 28px; border-radius: 8px; font-size: 13px; }
  .stats-dim:not(.stats-mode) button { padding: 0 10px; }
  .stats-bar .pick { flex: 1; min-width: 0; }
  .stats-bar .pick-btn { min-height: 34px; padding-top: 0; padding-bottom: 0; font-size: 13px; }
  .stats-sep { display: block; flex: 0 0 100%; width: auto; height: 0; margin: 0; background: none; }
  .stats-dim.stats-basis button { padding: 0 9px; }
  .stats-range { flex: 1 1 0; min-width: 0; padding: 2px; border-radius: 10px; overflow-x: auto; scrollbar-width: none; }
  .stats-range::-webkit-scrollbar { display: none; }
  .stats-range button { flex: 0 0 auto; justify-content: center; min-height: 2.5em; padding: 0.35em 0.8em; border-radius: 8px; font-size: 0.95rem; white-space: nowrap; }
  #view-stats.is-trend .stats-basis { flex: none; }
  #view-stats.is-trend .stats-trend-range { flex: 1 1 0; min-width: 0; }
  .stats-trend-date { flex: 0 0 auto; margin-left: 4px; max-width: none; min-height: 2.5em; }
  .stats-dim button, .stats-bar .pick-btn { min-height: 2.5em; }
  #statsMode { display: none !important; }
  .range-btn { flex: 1; min-width: 0; }
  .stats-list, .stats-total { max-width: none; }
  .stats-list { padding-bottom: 12px; }
  .stats-mode { order: -1; flex: 0 0 100%; margin: 0; }
  .stats-mode button { flex: 1; justify-content: center; min-height: 32px; }
  .stats-trend { padding: 10px 8px 6px; border-radius: 12px; box-shadow: none; }
  .trend-head { gap: 4px 10px; }
  .trend-title { font-size: 14px; }
  .trend-legend { margin-left: auto; gap: 10px; font-size: 11.5px; }
  .trend-sum { gap: 5px; margin: 8px 0 2px; }
  .trend-x.is-note { font-size: 11px; }
  .trend-card { flex: 1 1 0; min-width: 0; padding: 7px 8px; }
  .trend-card span { font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
  .trend-card b { font-size: 17px; }
  .trend-card b small { margin-left: 2px; font-size: 11px; }
  .trend-x.is-note { flex-basis: 100%; margin-left: 0; }
  .trend-row b { font-size: 14.5px; }
  .trend-fold { margin-left: 6px; }
  .trend-svg { height: 184px; }
  .trend-list { max-height: none; }
  .trend-row { grid-template-columns: 12px 2fr 1fr 1fr; gap: 6px; padding: 8px 2px; font-size: 12.5px; }
  .trend-recs { grid-template-columns: 1fr; padding: 0 2px 8px; }
  .trend-item.is-sub > .trend-recs { padding-left: 14px; }
  .trend-key-date { display: none; }
  .trend-row .trend-d { font-size: 11.5px; }
  .trend-row.is-foot { position: static; box-shadow: none; }
  .trend-foot-base { font-size: 11.5px; }
  .stats-card summary { padding: 10px 12px; }
  .stats-body { padding: 4px 10px 10px; }
  .stats-total em { margin-left: 0; flex-basis: 100%; }
  .org-thead { display: none; }
  .org-tr { display: flex; flex-wrap: wrap; gap: 6px 8px; padding: 10px 12px; }
  .org-tr .org-op { margin-left: auto; }
  .org-filters input { width: 100%; }
  .org-filters .pick { flex: 1; width: auto; min-width: 0; }
  .me-page { max-width: none; padding-bottom: 16px; }
  .me-avatar { width: 56px; height: 56px; font-size: 22px; }
  .me-copy h1 { font-size: 22px; }
  #pwdModal, #nameModal, #infoModal, #notifyModal, #offerModal, #claimModal { align-items: flex-end; padding: 0; }
  #pwdCard, #nameCard, #notifyCard, #offerCard, #claimCard, #infoModal .modal-card { width: 100%; border-radius: 18px 18px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .tabbar { display: flex; }
  .tabbar button {
    flex: 1; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; margin: 0; min-height: 50px; padding: 4px 2px 2px;
    border-radius: 0; background: transparent; color: #8b97a6;
    font-size: 11px; font-weight: 600; text-align: center;
  }
  .tabbar button.is-active { background: transparent; color: #1f86e8; font-weight: 800; }
  .tabbar button.is-active .tab-ico { color: #1f86e8; background: transparent; }
  .tabbar button.is-active .tab-ico svg rect,
  .tabbar button.is-active .tab-ico svg circle { fill: rgba(31, 134, 232, .18); stroke-width: 2.1; }
  .tabbar button.is-active .tab-ico svg path { stroke-width: 2.1; }
  .toast { bottom: calc(72px + env(safe-area-inset-bottom)); }
  .drawer-panel .drawer-actions { flex-wrap: nowrap; gap: 10px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); }
  .drawer-panel .drawer-actions .btn { min-height: 44px; font-size: 15px; }
  .drawer-panel .drawer-actions #drawerCancel { flex: 1; }
  .drawer-panel .drawer-actions #btnSave { flex: 2; }
  .span-2, .span-all { grid-column: 1 / -1; }
  .trail-card { padding: 8px 10px; }
  .trail-top time { margin-left: 0; }
  .trail-split { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

table.sheet {
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  --band-h: 28px;
  --title-h: 36px;
}
table.sheet th,
table.sheet td { overflow: hidden; text-overflow: ellipsis; }
table.sheet tbody td,
table.sheet tr.title-row th,
table.sheet tr.filter-row th { max-width: 0; }
table.sheet tbody td { cursor: pointer; }
table.sheet thead th { position: sticky; z-index: 4; background: var(--phase); }
table.sheet thead th.commerce,
table.sheet td.commerce { background: var(--commerce); }
table.sheet thead th.booking,
table.sheet td.booking { background: var(--booking); }
table.sheet thead tr.band-row > th { top: 0; z-index: 6; text-align: center; font-weight: 700; }
table.sheet thead tr.band-row > th.commerce { color: #1565b0; }
table.sheet thead tr.band-row > th.booking { color: #8a6410; }
table.sheet thead tr.title-row > th { top: var(--band-h); z-index: 5; cursor: grab; user-select: none; }
table.sheet thead tr.title-row > th.is-fixed-col { cursor: default; }
table.sheet thead tr.filter-row > th { top: calc(var(--band-h) + var(--title-h)); z-index: 4; cursor: default; padding: 4px 6px; font-weight: 400; }
table.sheet tr.title-row th::after {
  content: "↕";
  position: absolute; right: 3px; top: 50%; transform: translateY(-50%);
  color: var(--empty, #8a96a4);
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s;
}
table.sheet tr.title-row th:hover::after { opacity: .5; }
table.sheet.is-tight tr.title-row > th { white-space: normal; word-break: break-all; line-height: 1.25; vertical-align: middle; }
table.sheet tr.title-row th.is-sort-asc,
table.sheet tr.title-row th.is-sort-desc { padding-right: 16px; }
table.sheet thead tr.band-row > th,
table.sheet thead tr.title-row > th,
table.sheet tbody td { padding: 7px 8px; }
table.sheet thead tr.filter-row > th { padding: 4px 5px; }
table.sheet.is-dense thead tr.band-row > th, table.sheet.is-dense thead tr.title-row > th, table.sheet.is-dense tbody td { padding: 6px 5px; font-size: 12px; }
table.sheet.is-dense tr.title-row th.is-sort-asc, table.sheet.is-dense tr.title-row th.is-sort-desc { padding-right: 14px; }
table.sheet.is-dense thead tr.filter-row > th { padding: 4px 3px; }
table.sheet.is-dense .chip { font-size: 11px; }
table.sheet .col-filter-box { position: relative; display: block; }
table.sheet .col-filter { padding-right: 24px; }
table.sheet .col-filter-btn {
  position: absolute; top: 50%; right: 3px; transform: translateY(-50%);
  width: 22px; height: 22px; border: 0; border-radius: 6px; background: transparent;
}
table.sheet .col-filter-btn:hover, table.sheet .col-filter-btn.is-on { background: #e3eefa; }
table.sheet tr.title-row th.is-sort-asc::after { content: "↑"; color: var(--kicker); opacity: 1; }
table.sheet tr.title-row th.is-sort-desc::after { content: "↓"; color: var(--kicker); opacity: 1; }
table.sheet th.is-drop { box-shadow: inset 3px 0 0 var(--kicker); }
table.sheet tbody td { user-select: none; }
table.sheet tbody tr[data-id]:nth-child(even) td.commerce,
table.sheet tbody tr[data-id]:nth-child(even) td.booking { background: #fff; }
table.sheet tbody tr.is-cancel[data-id] td,
table.sheet tbody tr.is-cancel[data-id] td.commerce,
table.sheet tbody tr.is-cancel[data-id] td.booking { background: #e4e7ec; color: #7d8794; }
table.sheet tbody tr.is-cancel .chip { background: #e6e9ee; color: #8b97a6; }
table.sheet tbody tr[data-id] td.is-last,
table.sheet tbody tr.is-cancel[data-id] td.is-last.commerce,
table.sheet tbody tr.is-cancel[data-id] td.is-last.booking { color: #e02424; font-weight: 700; }
table.sheet tbody tr[data-id] td.is-selected,
table.sheet tbody tr[data-id] td.is-selected.commerce,
table.sheet tbody tr[data-id] td.is-selected.booking { background: #d4e8f8; color: var(--text); }
table.sheet tbody tr[data-id] td.is-active { background: #bddcf6; color: var(--text); }
table.sheet .is-status-col,
table.sheet tbody tr[data-id]:nth-child(even) td.is-status-col,
table.sheet tbody tr.is-cancel[data-id] td.is-status-col {
  position: sticky; right: 0; background: #fff; box-shadow: inset 1px 0 0 var(--border);
}
table.sheet tbody td.is-status-col { z-index: 2; }
table.sheet thead th.is-status-col { background: var(--phase); }
table.sheet tbody td.is-status-col.is-selected { background: #d4e8f8; }
table.sheet tbody td.is-status-col.is-active { background: #bddcf6; }
table.sheet thead tr.band-row > th.is-status-col { z-index: 9; }
table.sheet thead tr.title-row > th.is-status-col { z-index: 8; cursor: default; }
table.sheet thead tr.filter-row > th.is-status-col { z-index: 7; }
.sheet-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 44px; margin-top: 8px; color: var(--muted); font-size: 13px;
}
.sheet-stat {
  position: fixed;
  left: 284px;
  bottom: 22px;
  z-index: 18;
  min-width: 0;
  max-width: calc(100vw - 320px);
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(26, 36, 51, 0.92);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  box-shadow: var(--shadow);
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: left .36s var(--ease);
}
.desk.is-collapsed .sheet-stat { left: 30px; max-width: calc(100vw - 60px); }
.sheet-pager { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.sheet-size, .sheet-jump { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.sheet-size .pick { width: 92px; }
.sheet-jump input {
  width: 56px; min-height: 32px; padding: 4px 8px; border: 1px solid var(--border);
  border-radius: 8px; background: #fff; color: var(--heading); font-weight: 700; text-align: center;
}
.sheet-pager > button {
  width: 32px; height: 32px; border: 1px solid var(--border); border-radius: 8px;
  background: #fff; color: var(--heading); font-size: 18px; line-height: 1;
}
.sheet-pager > button:disabled { opacity: .4; }
#pageLabel { min-width: 52px; text-align: center; color: var(--heading); font-weight: 700; }
.record-card.is-zebra { background: #f7f9fc; }
.record-card.is-cancel { background: #f4f6f8; }
.record-card.is-cancel h3, .record-card.is-cancel footer,
.record-card.is-cancel .ask, .record-card.is-cancel .reply { color: #8b97a6; }
.record-card.is-cancel .ask, .record-card.is-cancel .reply { background: #fff; }
.record-card.is-cancel .chip { background: #e6e9ee; color: #8b97a6; }
.record-card .is-last { color: #e02424; font-weight: 700; }
.col-resize { position: absolute; top: 0; right: 0; z-index: 2; width: 8px; height: 100%; cursor: col-resize; }
.col-resize:hover, .col-resize.is-on { background: var(--kicker); }
.col-filter-box { display: flex; align-items: center; gap: 4px; min-width: 0; }
.col-filter {
  width: 100%; min-width: 0; min-height: 28px; padding: 3px 6px;
  border: 1px solid var(--border); border-radius: 8px; background: #fff;
  color: var(--text); font: 13px Inter, "Noto Sans SC", sans-serif;
}
.col-filter:focus, .col-filter.is-on { outline: none; border-color: var(--kicker); }
.col-filter.is-on { background: #eef5fc; }
.col-filter-btn {
  flex: 0 0 28px; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--muted); cursor: pointer;
}
.col-filter-btn svg { width: 14px; height: 14px; display: block; }
.col-filter-btn:hover, .col-filter-btn.is-on { border-color: var(--kicker); color: var(--kicker); background: #eef5fc; }
.col-filter-pop, .col-settings {
  position: fixed; z-index: 40; background: #fff; border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(26, 36, 51, .14);
}
.col-filter-pop { display: flex; flex-direction: column; max-height: min(420px, 76vh); padding: 8px; }
.col-filter-search {
  width: 100%; min-height: 32px; margin-bottom: 6px; padding: 5px 8px;
  border: 1px solid var(--border); border-radius: 8px; background: #fff; font: 14px Inter, "Noto Sans SC", sans-serif;
}
.col-filter-pop-actions { display: flex; gap: 8px; margin-bottom: 6px; }
.col-filter-pop-actions button { padding: 0; border: 0; background: none; color: var(--kicker); font: 600 13px Inter, "Noto Sans SC", sans-serif; cursor: pointer; }
.col-filter-pop-list { overflow: auto; min-height: 80px; max-height: 240px; }
.col-filter-opt { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.col-filter-opt:hover { background: #eef4fb; }
.col-filter-opt-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-filter-opt .n { color: var(--muted); font-size: 12px; }
.col-filter-empty, .col-filter-pop-count { color: var(--muted); font-size: 12px; }
.col-filter-pop-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 8px; margin-top: 4px; border-top: 1px solid var(--border); }
.col-filter-pop-ok { display: flex; gap: 6px; }
.col-settings { width: min(360px, calc(100vw - 16px)); padding: 12px; }
.col-settings-note { margin: 0 0 8px; color: var(--muted); font-size: 12px; }
.col-set-zone { margin-bottom: 10px; }
.col-set-zone h3 { margin: 0 0 6px; font-size: 14px; }
.col-set-item {
  display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 8px; cursor: grab; background: var(--phase);
  margin-bottom: 4px;
}
.col-set-item.is-drop { box-shadow: inset 3px 0 0 var(--kicker); }
.col-set-item.is-static { cursor: default; }
.col-settings-foot { display: flex; justify-content: flex-end; }
@media (max-width: 900px) {
  .table-wrap { max-height: none; }
  .navbar { display: none; }
  .page { padding-top: 10px; }
  .page-head > div:not(.page-actions) { display: none; }
  .page-head:not(:has(.page-actions)) { display: none; }
  .drawer-head { display: none; }
  .drawer-body { padding-top: calc(10px + env(safe-area-inset-top)); }
  .drawer-panel .drawer-actions { gap: 8px; }
  .drawer-panel .drawer-actions .btn { min-width: 0; }
  .drawer-panel .drawer-actions #btnDeleteM { flex: none; padding: 4px 14px; }
  .drawer-panel .drawer-actions .btn-reuse { flex: none; margin-right: 0; padding: 4px 14px; }
  #recordTrail { display: none; }
  .offer-strip { gap: 6px; margin-bottom: 6px; }
  .offer-head { align-items: center; gap: 8px; }
  .offer-head strong { font-size: 13px; }
  .offer-head span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; }
  .offer-swipe-tip {
    flex: none; margin-left: auto; padding: 0 7px; border-radius: 999px; background: #f2f4f7; color: #6b7684 !important;
    font-size: 10.5px !important; line-height: 18px;
  }
  .offer-row {
    grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 7px 10px 8px 12px; border-radius: 12px;
    grid-template-areas: "main left" "progress actions";
  }
  .offer-tag { display: none; }
  .offer-pill {
    display: inline-block; align-self: center; padding: 0 6px; border-radius: 999px; background: #f08a24; color: #fff;
    font-size: 10.5px; font-weight: 700; line-height: 17px;
  }
  .offer-row.is-full .offer-pill, .offer-row.is-closed .offer-pill { background: #b8c1cc; }
  .offer-main { grid-area: main; gap: 1px; }
  .offer-route { flex-wrap: nowrap; gap: 6px; overflow: hidden; font-size: 14px; white-space: nowrap; }
  .offer-route > * { flex: none; }
  .offer-mine { padding: 0 6px; font-size: 10.5px; line-height: 17px; }
  .offer-meta { font-size: 11.5px; }
  .offer-left { grid-area: left; align-self: center; }
  .offer-left b { font-size: 20px; }
  .offer-left span { font-size: 10.5px; }
  .offer-progress { grid-area: progress; align-self: center; gap: 3px; }
  .offer-bar { height: 6px; }
  .offer-legend { flex-wrap: nowrap; gap: 8px; overflow: hidden; }
  .offer-chip, .offer-legend-empty { font-size: 11px; }
  .offer-actions { grid-area: actions; align-self: center; }
  .offer-act { min-width: 0; min-height: 30px; padding: 0 12px; font-size: 13px; }
  .offer-peek {
    position: fixed; z-index: 14; right: 14px; bottom: calc(59px + 38px + 14px + 44px + 10px + env(safe-area-inset-bottom));
    display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 10px 0 12px;
    border: 0; border-radius: 999px; background: #f08a24; color: #fff; font-size: 14px; font-weight: 700;
    box-shadow: 0 6px 18px rgba(240, 138, 36, .4); cursor: pointer;
  }
  .offer-peek[hidden] { display: none; }
  .offer-peek b {
    min-width: 20px; padding: 0 6px; border-radius: 999px; background: #fff; color: #d9480f; font-size: 12px; line-height: 20px; text-align: center;
  }
  .offer-form { grid-template-columns: 1fr 1fr; }
  #offerCard .modal-body, #claimCard .modal-body { max-height: 64vh; }
  .claim-foot, .offer-foot { flex-wrap: wrap; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .status-pick { column-gap: 6px; }
  .status-pick > .group-pick-label { flex: none; white-space: nowrap; }
  .status-pick-chips { flex: 1 1 0; min-width: 0; align-items: center; gap: 4px 6px; }
  .status-pick-note, .status-fwds { flex-basis: 100%; }
  .status-switch { min-height: 32px; padding: 0 10px; }
  .status-menu { left: 0; right: 0; min-width: 0; }
  .status-menu-item { min-height: 40px; }
  .record-card { cursor: pointer; }
  .record-card header { flex-wrap: wrap; }
  .record-card header .status-cell { flex-wrap: wrap; justify-content: flex-end; margin-left: auto; }
  .record-card .fwd-btn { min-height: 28px; padding: 0 10px; }
  .filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #view-board .page-head { margin: 0; }
  #btnAdd {
    position: fixed; z-index: 14; right: 14px; bottom: calc(59px + 38px + 14px + env(safe-area-inset-bottom));
    min-height: 44px; padding: 0 18px; border-radius: 999px; font-size: 15px;
    box-shadow: 0 6px 18px rgba(31, 134, 232, .38);
  }
  #view-board .sheet-foot {
    position: fixed; z-index: 13; left: 0; right: 0; bottom: calc(59px + env(safe-area-inset-bottom));
    min-height: 0; margin: 0; padding: 3px 10px;
    background: #fff; border-top: 1px solid var(--phase-line);
  }
  #view-board .cards { padding-bottom: 96px; }
  .sheet-pager { gap: 6px; font-size: 12px; }
  #sheetTotal { margin-right: auto; white-space: nowrap; color: var(--muted); }
  #sheetTotal .etd-peek { display: none; }
  .sheet-size { gap: 4px; }
  .sheet-size .pick { width: 72px; }
  .sheet-size .pick-btn { min-height: 28px; padding: 2px 8px; font-size: 13px; }
  .sheet-pager > button { width: 28px; height: 28px; font-size: 16px; }
  .sheet-jump { display: none; }
  #pageLabel { min-width: 36px; font-size: 13px; }
}
@media (min-width: 901px) {
  .mobile-only { display: none !important; }
}
/* 手机编辑页：标签和输入框同一行，两列排；四个字的标签折成两行 */
@media (max-width: 900px) {
  .drawer-body { padding: 8px 8px 12px; padding-top: calc(8px + env(safe-area-inset-top)); }
  .drawer-body .form-section { margin-bottom: 8px; padding: 8px 8px 10px; border-radius: 12px; }
  .drawer-body .section-head { flex-wrap: wrap; row-gap: 4px; align-items: center; margin-bottom: 6px; font-size: 14px; line-height: 1.3; }
  .drawer-body .form-section.is-booking .section-head { justify-content: flex-start; column-gap: 4px; }
  .drawer-body .form-section.is-booking .section-lock { margin-left: auto; }
  .drawer-body .adopt-sum { order: 9; flex: 0 0 100%; margin-left: 0; padding: 0; background: none; font-size: 12px; }
  .drawer-body .section-hint { font-size: 11px; }
  .drawer-body .form-section .section-head > .section-hint { position: static; transform: none; }
  .drawer-body .section-lock { margin-left: 6px; padding: 0 6px; font-size: 10px; vertical-align: 1px; }
  .drawer-body .section-body { gap: 6px 8px; }
  .drawer-body .section-body > .control {
    display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; column-gap: 4px;
    font-size: 12px; line-height: 1.2; text-wrap: balance;
  }
  .drawer-body .section-body > .note-tpl { padding-left: 42px; }
  .drawer-body .control input, .drawer-body .control textarea { min-height: 36px; padding: 4px 8px; font-size: 14px; }
  .drawer-body .control textarea { min-height: 36px; line-height: 1.45; }
  .drawer-body .suggest > input { padding-right: 32px; }
  .drawer-body .suggest-btn { width: 32px; }
  .drawer-body .dt-field.is-pending::after {
    top: -7px; right: 6px; transform: none; padding: 0 5px; font-size: 10px; line-height: 13px;
  }
  .drawer-body .status-pick { margin-bottom: 8px; padding: 6px 8px; row-gap: 4px; border-radius: 12px; }
  .drawer-body .status-fwds .card-fwds {
    gap: 6px; padding: 4px 8px; border-top: 0; border-radius: 8px; background: #fff8f2;
  }
  .drawer-body .status-fwds .card-fwds-head { padding-top: 1px; font-size: 11px; }
  .drawer-body .status-fwds .card-fwds li { padding: 0; background: transparent; font-size: 12px; }
  .drawer-body .smart-card { margin-bottom: 8px; padding: 8px; border-radius: 12px; }
  .drawer-body .smart-head { flex-direction: row; align-items: baseline; gap: 6px; margin-bottom: 6px; }
  .drawer-body .smart-head strong { flex: none; font-size: 14px; }
  .drawer-body .smart-head span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
  .drawer-body .smart-card textarea { height: 60px; min-height: 48px; padding: 6px 8px; font-size: 13px; line-height: 1.45; }
  .drawer-body .smart-actions { gap: 6px; margin-top: 6px; }
  .drawer-body .smart-actions .btn { min-height: 30px; padding: 2px 12px; }
  .drawer-body #replyMain.is-multi, .drawer-body .more-replies .reply-card { padding: 6px 8px 8px; }
  .drawer-body .more-replies .reply-card { margin-top: 8px; }
  .drawer-body .reply-add { min-height: 34px; margin-top: 8px; }
  .drawer-panel .drawer-actions .btn { min-height: 48px; }
  .suggest-menu { gap: 0; padding: 4px; border-radius: 10px; }
  .suggest-list { max-height: 178px; gap: 0; }
  .suggest-opt { min-height: 34px; padding: 4px 10px; border-radius: 6px; font-size: 14px; }
  .suggest-empty { padding: 6px 8px; font-size: 12px; }
}
@media (pointer: coarse) {
  .suggest-search { display: none; }
}

@media (min-width: 901px) {
  #view-board .offer-strip { flex: none; max-height: 36vh; overflow-y: auto; padding: 2px 2px 4px; }
  #view-board {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 116px);
    min-height: 0;
  }
  #view-board .table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
  }
  /* 统计、日志和需求一样：整页不滚，只有表格/地图自己滚，标题和筛选冻结在上面 */
  #view-log, #view-stats {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 116px);
    min-height: 0;
  }
  #view-log > *, #view-stats > * { flex: none; }
  #view-log #logTable { flex: 0 1 auto; min-height: 0; max-height: none; }
  #view-log .log-more { padding: 10px 0 0; }
  .log-sheet thead th { position: sticky; top: 0; z-index: 2; }
  #view-stats .page-head { margin-bottom: 12px; }
  #view-stats .stats-stage:not(.is-full) { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
  #view-stats .stats-stage:not(.is-full) > * { flex: none; }
  #view-stats .stats-stage:not(.is-full) .route-map,
  #view-stats .stats-stage:not(.is-full) .stats-pivot { flex: 1 1 auto; height: auto; min-height: 0; margin-bottom: 0; }
  #view-stats .stats-stage:not(.is-full) .route-offmap { margin: 8px 0 0; }
}

/* ---------- AI 助手（识图 + 市场问答） ---------- */
.ai-dock { position: relative; display: flex; justify-content: center; margin: 0 0 6px; }
.ai-ghost {
  position: relative; width: 112px; height: 112px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; cursor: pointer; transition: transform .2s var(--ease), filter .2s;
}
.ai-ghost:hover { transform: translateY(-3px) scale(1.04); filter: drop-shadow(0 8px 14px rgba(31, 134, 232, .22)); }
.ai-ghost:focus-visible { outline: 2px solid var(--kicker); outline-offset: 2px; }
.ai-anim { display: block; width: 100%; height: 100%; pointer-events: none; }
/* 素材四周留白很多，放大一点让小幽灵本身更显眼 */
.ai-anim svg { display: block; width: 100% !important; height: 100% !important; transform: scale(1.45) translateY(-4%) !important; will-change: transform; }
.ai-dock.is-static .ai-anim { background: url("/logo-mark.png") center / 64% no-repeat; }
.ai-ghost.is-wave { animation: ai-wave 1.1s var(--ease) both; }
.ai-ghost.is-busy { animation: ai-bob 1s ease-in-out infinite; }
.ai-ghost.is-busy::after {
  content: ""; position: absolute; inset: 6px; border-radius: 50%;
  border: 2px solid transparent; border-top-color: var(--kicker); border-right-color: rgba(31, 134, 232, .35);
  animation: reload-spin .9s linear infinite;
}
.ai-ghost.is-catch { transform: scale(1.12); filter: drop-shadow(0 0 18px rgba(31, 134, 232, .45)); }
@keyframes ai-wave { 0% { transform: translateY(16px) scale(.85); opacity: 0; } 55% { transform: translateY(-6px) rotate(-6deg); opacity: 1; } 75% { transform: rotate(5deg); } 100% { transform: none; } }
@keyframes ai-bob { 50% { transform: translateY(-5px); } }
.ai-bubble {
  position: absolute; left: 0; right: 0; bottom: calc(100% + 10px); z-index: 7;
  padding: 10px 12px; border-radius: 14px 14px 14px 14px; background: #fff; color: var(--heading);
  font-size: 13px; line-height: 1.55; white-space: pre-line; cursor: pointer;
  box-shadow: 0 10px 26px rgba(26, 36, 56, .16); border: 1px solid #d6e6f7;
}
.ai-bubble::after {
  content: ""; position: absolute; left: 50%; bottom: -7px; width: 12px; height: 12px; margin-left: -6px;
  background: #fff; border-right: 1px solid #d6e6f7; border-bottom: 1px solid #d6e6f7; transform: rotate(45deg);
}
.ai-bubble.is-in { animation: ai-pop .38s cubic-bezier(.2, .9, .3, 1.25) both; }
@keyframes ai-pop { from { opacity: 0; transform: translateY(8px) scale(.92); } to { opacity: 1; transform: none; } }

.ai-panel {
  position: fixed; left: 270px; bottom: 20px; z-index: 25;
  display: flex; flex-direction: column; width: min(440px, calc(100vw - 300px)); max-height: calc(100vh - 80px);
  border: 1px solid var(--border); border-radius: 16px; background: #fff; box-shadow: 0 20px 50px rgba(26, 36, 56, .22);
  animation: pop-in .24s var(--ease) both;
}
.desk.is-collapsed ~ .ai-panel { left: 20px; }
.ai-panel-head { display: flex; align-items: flex-start; gap: 10px; padding: 14px 14px 10px; border-bottom: 1px solid var(--phase-line); }
.ai-panel-copy { flex: 1; min-width: 0; }
.ai-panel-head h2 { font-size: 16px; }
.ai-panel-head p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }
.ai-panel-body { flex: 1; min-height: 0; overflow: auto; display: grid; grid-auto-rows: max-content; gap: 10px; align-content: start; padding: 12px 14px; }
.ai-composer { display: grid; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--phase-line); background: #fafbfd; border-radius: 0 0 16px 16px; }
.ai-composer textarea {
  width: 100%; min-height: 2.8em; max-height: 7em; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px;
  resize: vertical; font: 13px/1.5 inherit; color: var(--text); background: #fff; outline: none;
}
.ai-composer textarea:focus { border-color: var(--kicker); }
.ai-composer-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.ai-attach { position: relative; width: fit-content; max-width: 100%; }
.ai-attach img { display: block; max-width: 160px; max-height: 72px; border-radius: 8px; border: 1px solid var(--border); object-fit: contain; background: #fff; }
.ai-attach-x {
  position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%;
  background: #1f3b73; color: #fff; font-size: 14px; line-height: 22px; cursor: pointer;
}
.ai-msg { display: grid; gap: 4px; max-width: 100%; }
.ai-msg.is-user { justify-items: end; }
.ai-msg.is-bot { justify-items: start; }
.ai-msg-bubble {
  max-width: 100%; padding: 8px 10px; border-radius: 12px; font-size: 13px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere;
  -webkit-user-select: text; user-select: text; cursor: text;
}
.ai-msg.is-user .ai-msg-bubble { background: #1f3b73; color: #fff; border-bottom-right-radius: 4px; }
.ai-msg.is-bot .ai-msg-bubble { background: #f2f5f9; color: var(--text); border-bottom-left-radius: 4px; white-space: normal; }
.ai-msg.is-bot .ai-msg-bubble strong { font-weight: 700; color: var(--heading); }
.ai-msg.is-bot .ai-msg-bubble em { font-style: italic; }
.ai-msg.is-bot .ai-msg-bubble del { color: var(--muted); text-decoration: line-through; }
.ai-msg.is-bot .ai-msg-bubble code {
  padding: 0 4px; border-radius: 4px; background: #e8eef6; font: 12px/1.4 Consolas, "Microsoft YaHei", monospace;
}
.ai-msg.is-bot .ai-msg-bubble a { color: #1f86e8; text-decoration: underline; }
.ai-md-p { margin: 0 0 8px; }
.ai-md-p:last-child { margin-bottom: 0; }
.ai-md-h { margin: 10px 0 4px; font-weight: 700; color: var(--heading); line-height: 1.35; }
.ai-md-h1 { font-size: 16px; }
.ai-md-h2 { font-size: 15px; }
.ai-md-h3, .ai-md-h4 { font-size: 14px; }
.ai-md-h:first-child { margin-top: 0; }
.ai-md-ul, .ai-md-ol { margin: 4px 0 8px; padding-left: 1.35em; }
.ai-md-ul { list-style: disc; }
.ai-md-ol { list-style: decimal; }
.ai-md-ul li, .ai-md-ol li { margin: 2px 0; }
.ai-md-quote {
  margin: 6px 0 8px; padding: 6px 10px; border-left: 3px solid #1f86e8; border-radius: 0 8px 8px 0;
  background: #eef5ff; color: var(--text);
}
.ai-md-hr { margin: 10px 0; border: 0; border-top: 1px solid #d8e0ea; }
.ai-md-pre {
  margin: 6px 0 8px; padding: 8px 10px; border-radius: 8px; border: 1px solid #d8e0ea; background: #1f2a3a;
  color: #e8eef6; overflow-x: auto; white-space: pre; font: 12px/1.45 Consolas, "Microsoft YaHei", monospace;
}
.ai-md-pre code { padding: 0; background: transparent; color: inherit; font: inherit; }
.ai-md-table { overflow-x: auto; max-width: 100%; margin: 8px 0; border-radius: 8px; border: 1px solid #d8e0ea; background: #fff; }
.ai-md-table table { width: 100%; min-width: 420px; border-collapse: collapse; font-size: 12px; line-height: 1.45; }
.ai-md-table th, .ai-md-table td { padding: 6px 8px; border-bottom: 1px solid #edf1f6; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.ai-md-table th { background: #eef2f7; color: var(--heading); font-weight: 700; white-space: nowrap; }
.ai-md-table tr:last-child td { border-bottom: 0; }
.ai-msg-meta { color: var(--muted); font-size: 11px; -webkit-user-select: text; user-select: text; }
.ai-msg-thumb { display: block; max-width: 140px; max-height: 80px; margin-bottom: 4px; border-radius: 8px; border: 1px solid var(--border); object-fit: contain; }
.ai-thumb { display: block; max-width: 100%; max-height: 120px; margin: 0 auto; border-radius: 10px; border: 1px solid var(--border); object-fit: contain; }
.ai-empty { padding: 18px 8px; text-align: center; color: var(--text); font-size: 14px; }
.ai-empty p { margin: 0 0 6px; }
.ai-empty .ai-tip { color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.ai-loading { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 18px 0; color: var(--muted); font-size: 13px; }
.ai-loading b { margin-left: 6px; font-weight: 600; }
.ai-loading span { width: 8px; height: 8px; border-radius: 50%; background: var(--kicker); animation: ai-dot 1s ease-in-out infinite; }
.ai-loading span:nth-child(2) { animation-delay: .15s; }
.ai-loading span:nth-child(3) { animation-delay: .3s; }
@keyframes ai-dot { 50% { transform: translateY(-5px); opacity: .45; } }
.ai-warn { margin: 0; padding: 8px 10px; border-radius: 10px; background: #fff4e0; color: #9a5b00; font-size: 12.5px; }
.ai-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-chip {
  display: inline-flex; align-items: baseline; gap: 6px; padding: 5px 10px; border: 1px solid var(--soft-border); border-radius: 999px;
  background: var(--commerce); color: var(--heading); font-size: 12.5px;
}
.ai-chip span { color: var(--muted); }
.ai-chip:hover { border-color: var(--kicker); }
.ai-block { border: 1px solid var(--phase-line); border-radius: 12px; overflow: hidden; }
.ai-block.is-main { border-color: var(--soft-border); }
.ai-block-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px; background: var(--phase); }
.ai-block.is-main .ai-block-head { background: var(--commerce); }
.ai-block h3 { margin: 0; color: var(--heading); font-size: 13px; }
.ai-block pre, .ai-block textarea {
  display: block; width: 100%; margin: 0; padding: 8px 10px; border: 0; background: #fff; color: var(--text);
  font: 12.5px/1.6 Consolas, "Microsoft YaHei", monospace; white-space: pre-wrap; overflow-wrap: anywhere; user-select: text;
}
.ai-block textarea { resize: vertical; outline: none; font-size: 13.5px; field-sizing: content; min-height: 5em; max-height: 240px; }
.ai-copy { padding: 2px 10px; border: 1px solid var(--border); border-radius: 999px; background: #fff; color: var(--kicker); font-size: 12px; font-weight: 600; }
.ai-copy:hover { border-color: var(--kicker); }
.ai-dropzone { position: fixed; inset: 0; z-index: 45; display: flex; align-items: center; justify-content: center; background: rgba(31, 134, 232, .10); backdrop-filter: blur(1px); pointer-events: none; }
.ai-dropzone-card { padding: 18px 28px; border: 2px dashed var(--kicker); border-radius: 18px; background: rgba(255, 255, 255, .94); color: var(--kicker); font-size: 18px; font-weight: 700; }
@media (max-width: 900px) {
  .ai-dock, .ai-panel, .ai-dropzone { display: none !important; }
}

/* ---------- 客户中文名 ---------- */
.cn-box { position: relative; display: block; }
.cn-box input { width: 100%; }
.cn-tag {
  position: absolute; top: 50%; right: 8px; transform: translateY(-50%); padding: 0 6px; border-radius: 999px;
  background: #e3f4e8; color: #1f8a4c; font-size: 11px; font-style: normal; font-weight: 700; line-height: 18px; pointer-events: none;
}
.cn-tag[hidden] { display: none; }
.customer-cn input:has(+ .cn-tag:not([hidden])) { padding-right: 56px; }
.suggest-opt { display: flex; align-items: baseline; gap: 8px; }
.suggest-cn { margin-left: auto; color: var(--muted); font-size: 12px; }

/* ---------- 商务备注图片 ---------- */
.note-images {
  margin-top: 10px; padding: 10px 12px 12px; border: 1px solid #cfe3f3; border-radius: 12px; background: #fff;
}
.note-images[hidden] { display: none; }
.ni-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; min-height: 22px; }
.ni-title { display: inline-flex; align-items: center; gap: 6px; color: #1d6fbf; font-size: 13px; font-weight: 700; }
.ni-title svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ni-count { padding: 0 8px; border-radius: 999px; background: var(--commerce); color: #1d6fbf; font-size: 12px; font-weight: 700; line-height: 20px; }
.ni-count:empty { display: none; }
.ni-tip { margin-left: auto; color: var(--muted); font-size: 12px; }
.ni-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.ni-tile {
  position: relative; margin: 0; aspect-ratio: 1; overflow: hidden; cursor: zoom-in;
  border: 1px solid var(--border); border-radius: 10px; background: #f3f6f9;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s;
}
.ni-tile:hover { transform: translateY(-2px); border-color: #9cc8ea; box-shadow: 0 8px 20px rgba(26, 36, 51, .12); }
.ni-tile img { display: block; width: 100%; height: 100%; object-fit: cover; user-select: none; }
.ni-tile figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 5px;
  background: linear-gradient(transparent, rgba(15, 23, 42, .72)); color: #fff; font-size: 11px; font-weight: 600; text-align: center;
}
.ni-tile.is-pending figcaption { background: linear-gradient(transparent, rgba(160, 98, 0, .82)); }
.ni-tile.is-error { border-color: #e06666; cursor: pointer; }
.ni-tile.is-error figcaption { background: linear-gradient(transparent, rgba(190, 40, 40, .85)); }
.ni-tile.is-uploading img, .ni-tile.is-queued img { opacity: .55; }
.ni-tile.is-uploading::after {
  content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 40%;
  background: #1f86e8; animation: ni-load 1.1s ease-in-out infinite;
}
@keyframes ni-load { 0% { left: -40%; } 100% { left: 100%; } }
.ni-tile.is-preparing { cursor: progress; }
.ni-spin {
  position: absolute; top: 50%; left: 50%; width: 26px; height: 26px; margin: -20px 0 0 -13px;
  border: 3px solid #cfe3f3; border-top-color: #1f86e8; border-radius: 50%; animation: ni-spin .8s linear infinite;
}
@keyframes ni-spin { to { transform: rotate(360deg); } }
.ni-del {
  position: absolute; top: 5px; right: 5px; width: 24px; height: 24px; display: grid; place-items: center;
  padding: 0; border: 0; border-radius: 50%; background: rgba(15, 23, 42, .62); color: #fff; font-size: 16px; line-height: 1;
  opacity: 0; transition: opacity .15s, background .15s;
}
.ni-tile:hover .ni-del, .ni-del:focus-visible { opacity: 1; }
.ni-del:hover { background: #d64545; }
@media (hover: none) { .ni-del { opacity: 1; } }
.ni-add {
  aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border: 1.5px dashed #9cc8ea; border-radius: 10px; background: #f5fbff; color: #1d6fbf; font-size: 12px; font-weight: 700;
  transition: background .15s, border-color .15s;
}
.ni-add:hover { background: var(--commerce); border-color: #1f86e8; }
.ni-add svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
#recordForm.is-ni-drop .note-images { border-color: #1f86e8; box-shadow: 0 0 0 3px rgba(31, 134, 232, .18); }
#recordForm.is-ni-drop::after {
  content: "松开鼠标，添加到「商务备注图片」"; position: absolute; inset: 0; z-index: 6;
  display: grid; place-items: center; border: 3px dashed #1f86e8; border-radius: inherit;
  background: rgba(233, 245, 252, .82); color: #1565b0; font-size: 18px; font-weight: 800; pointer-events: none;
}

.ni-menu {
  position: fixed; z-index: 60; min-width: 132px; padding: 5px;
  background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 14px 36px rgba(26, 36, 51, .2);
  animation: fade-in .12s ease both;
}
.ni-menu[hidden] { display: none; }
.ni-menu button {
  display: block; width: 100%; min-height: 34px; padding: 0 12px; border: 0; border-radius: 7px;
  background: transparent; color: var(--heading); font-size: 13px; font-weight: 600; text-align: left; cursor: pointer;
}
.ni-menu button:hover { background: var(--phase); }
.ni-viewer { position: fixed; inset: 0; z-index: 28; background: rgba(10, 14, 20, .93); color: #fff; animation: fade-in .18s ease both; }
.ni-viewer[hidden] { display: none; }
html.is-client .ni-viewer { top: 36px; }
.ni-viewer-bar {
  position: absolute; top: 0; left: 0; right: 0; height: 52px; display: flex; align-items: center; gap: 12px;
  padding: 0 12px 0 18px; background: linear-gradient(rgba(0, 0, 0, .45), transparent);
}
.ni-viewer-index { flex: none; padding: 2px 10px; border-radius: 999px; background: rgba(255, 255, 255, .14); font-size: 13px; font-weight: 700; }
.ni-viewer-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.ni-viewer-meta { flex: none; color: rgba(255, 255, 255, .62); font-size: 12px; }
.ni-viewer-tools { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.ni-tool {
  min-width: 40px; height: 34px; display: inline-grid; place-items: center; padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, .2); border-radius: 999px; background: rgba(255, 255, 255, .08);
  color: #fff; font-size: 13px; font-weight: 600; text-decoration: none;
}
.ni-tool:hover { background: rgba(255, 255, 255, .2); }
.ni-tool.is-danger:hover { background: #d64545; border-color: #d64545; }
.ni-tool.is-close { padding: 0; width: 34px; font-size: 22px; line-height: 1; }
.ni-tool[hidden] { display: none; }
.ni-stage { position: absolute; top: 52px; left: 0; right: 0; bottom: 86px; display: flex; overflow: auto; overscroll-behavior: contain; }
.ni-viewer:has(.ni-strip[hidden]) .ni-stage { bottom: 16px; }
.ni-stage img {
  margin: auto; max-width: calc(100% - 128px); max-height: 100%; object-fit: contain; cursor: zoom-in;
  background: #fff; border-radius: 4px; box-shadow: 0 12px 40px rgba(0, 0, 0, .45);
}
.ni-viewer.is-actual .ni-stage img { max-width: none; max-height: none; cursor: zoom-out; }
.ni-nav {
  position: absolute; top: 50%; width: 48px; height: 48px; margin-top: -24px; display: grid; place-items: center;
  padding: 0 0 4px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; font-size: 34px; line-height: 1;
}
.ni-nav:hover { background: rgba(255, 255, 255, .28); }
.ni-nav.is-prev { left: 16px; }
.ni-nav.is-next { right: 16px; }
.ni-nav[hidden] { display: none; }
.ni-strip {
  position: absolute; left: 0; right: 0; bottom: 12px; height: 62px; display: flex; justify-content: safe center; gap: 8px;
  padding: 0 16px; overflow-x: auto;
}
.ni-strip[hidden] { display: none; }
.ni-strip-item { flex: none; width: 56px; height: 56px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: #222; opacity: .55; }
.ni-strip-item.is-on { border-color: #fff; opacity: 1; }
.ni-strip-item:hover { opacity: .9; }
.ni-strip-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (max-width: 900px) {
  .note-images { margin-top: 8px; padding: 8px; }
  .ni-head { flex-wrap: wrap; row-gap: 2px; margin-bottom: 6px; }
  .ni-tip { flex: 0 0 100%; margin-left: 0; font-size: 11px; }
  .ni-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .ni-viewer-bar { height: auto; flex-wrap: wrap; row-gap: 4px; padding: calc(8px + env(safe-area-inset-top)) 8px 8px 12px; }
  .ni-viewer-meta { display: none; }
  .ni-viewer-name { flex: 1; font-size: 13px; }
  .ni-viewer-tools { margin-left: 0; }
  #niViewerZoom { display: none; }
  .ni-stage { top: calc(56px + env(safe-area-inset-top)); bottom: calc(76px + env(safe-area-inset-bottom)); }
  .ni-stage img { max-width: 100%; border-radius: 0; }
  .ni-nav { display: none; }
  .ni-strip { bottom: calc(8px + env(safe-area-inset-bottom)); height: 56px; justify-content: flex-start; }
  .ni-strip-item { width: 50px; height: 50px; }
}

/* ---------- 编辑页贴纸 ---------- */
.drawer-body { position: relative; }
.stk-layer { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 30; }
.stk-screen { position: fixed; inset: 0; z-index: 39; pointer-events: none; }
.stk { position: absolute; pointer-events: auto; }
.stk-card {
  position: relative; display: flex; flex-direction: column; min-width: 140px; min-height: 90px;
  resize: both; overflow: hidden; border-radius: 10px; background: var(--stk-bg, #fff4b8);
  box-shadow: 0 10px 28px rgba(26, 36, 51, .18), 0 0 0 1px rgba(26, 36, 51, .08);
}
.stk.is-clear .stk-card { box-shadow: none; outline: 1px dashed rgba(26, 36, 51, .28); outline-offset: -1px; }
.stk.is-clear .stk-bar { background: rgba(255, 255, 255, .72); }
.stk.is-editing .stk-card { box-shadow: 0 10px 28px rgba(26, 36, 51, .18), 0 0 0 2px #1f86e8; }
.stk.is-dragging .stk-card { box-shadow: 0 18px 40px rgba(26, 36, 51, .28), 0 0 0 2px #1f86e8; opacity: .96; }
.stk-bar {
  flex: none; display: flex; align-items: center; gap: 2px; height: 26px; padding: 0 4px 0 8px;
  background: rgba(26, 36, 51, .05); user-select: none;
}
.stk.is-mine .stk-bar { cursor: grab; touch-action: none; }
.stk.is-dragging .stk-bar { cursor: grabbing; }
.stk-grip {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: rgba(26, 36, 51, .5); font-size: 11px; font-weight: 700;
}
.stk-btn {
  flex: none; display: grid; place-items: center; width: 22px; height: 22px; padding: 0;
  border: 0; border-radius: 6px; background: none; color: rgba(26, 36, 51, .55); cursor: pointer;
}
.stk-btn:hover { background: rgba(26, 36, 51, .08); color: #1a2433; }
.stk-btn.is-danger:hover { background: #ffe9e9; color: #d64545; }
.stk-btn svg, .stk-eye svg {
  width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.stk-scroll { flex: 1; min-height: 0; overflow: auto; }
.stk-body {
  min-height: 1.5em; padding: 6px 10px; outline: none;
  line-height: 1.5; word-break: break-word; white-space: pre-wrap; user-select: text; cursor: text;
}
.stk-body:empty::before, .stk-body.is-empty::before { content: attr(data-ph); position: absolute; color: rgba(26, 36, 51, .38); pointer-events: none; }
.stk-body { position: relative; }
.stk.is-mine:not(.is-editing) .stk-body { cursor: text; }
.stk.is-mine:not(.is-editing) .stk-scroll:hover { background: rgba(255, 255, 255, .22); }
.stk-img {
  display: inline-block; max-width: 100%; min-width: 40px; margin: 2px 0; overflow: hidden;
  resize: horizontal; border-radius: 6px; vertical-align: top; line-height: 0;
}
.stk-img img { display: block; width: 100%; height: auto; pointer-events: none; user-select: none; }
.stk-replies { margin: 2px 8px 6px; padding-top: 4px; border-top: 1px dashed rgba(26, 36, 51, .18); }
.stk-reply {
  position: relative; padding: 3px 18px 3px 6px; border-radius: 6px; color: #1a2433;
  font-size: 12px; line-height: 1.45; word-break: break-word;
}
.stk-reply-text { white-space: pre-wrap; }
.stk-reply + .stk-reply { margin-top: 2px; }
.stk-reply:hover { background: rgba(255, 255, 255, .55); }
.stk-reply b { margin-right: 4px; color: #1d6fbf; font-weight: 700; }
.stk-reply.is-mine b { color: #8d6914; }
.stk-reply time { margin-left: 6px; color: rgba(26, 36, 51, .42); font-size: 10.5px; white-space: nowrap; }
.stk-reply-del {
  position: absolute; top: 2px; right: 2px; width: 16px; height: 16px; padding: 0; border: 0; border-radius: 4px;
  background: none; color: rgba(26, 36, 51, .4); font-size: 13px; line-height: 16px; cursor: pointer; opacity: 0;
}
.stk-reply:hover .stk-reply-del { opacity: 1; }
.stk-reply-del:hover { background: #ffe9e9; color: #d64545; }
.stk-say { flex: none; display: flex; align-items: center; gap: 4px; padding: 3px 6px 2px; }
.stk-say input {
  flex: 1; min-width: 0; height: 24px; padding: 0 8px; border: 1px solid rgba(26, 36, 51, .14); border-radius: 999px;
  background: rgba(255, 255, 255, .8); color: #1a2433; font-size: 12px; outline: none;
}
.stk-say input:focus { border-color: #1f86e8; background: #fff; }
.stk-like {
  flex: none; display: inline-flex; align-items: center; gap: 2px; height: 22px; padding: 0 5px;
  border: 0; border-radius: 999px; background: none; color: rgba(26, 36, 51, .5); font-size: 11.5px; font-weight: 700; cursor: pointer;
}
.stk-like svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.stk-like:hover { background: rgba(26, 36, 51, .08); color: #1a2433; }
.stk-like.is-on { color: #e5484d; }
.stk-like.is-on svg { fill: rgba(229, 72, 77, .18); }
.status-cell.has-stk-reply .chip { background: #e5484d; color: #fff; animation: stk-breathe 1.6s ease-in-out infinite; }
@keyframes stk-breathe {
  0%, 100% { box-shadow: 0 0 0 0 rgba(229, 72, 77, .55); opacity: 1; }
  50% { box-shadow: 0 0 0 6px rgba(229, 72, 77, 0); opacity: .72; }
}
.stk-foot {
  flex: none; padding: 0 18px 3px 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: rgba(26, 36, 51, .5); font-size: 10.5px; text-align: right; user-select: none;
}
.stk-eye {
  display: none; place-items: center; width: 30px; height: 30px; padding: 0; border: 2px solid #fff; border-radius: 999px;
  background: #f08a24; color: #fff; box-shadow: 0 6px 16px rgba(240, 138, 36, .4); cursor: pointer;
}
.stk-eye svg { width: 16px; height: 16px; }
.stk.is-hidden .stk-card, .stk.is-hidden .stk-tools { display: none; }
.stk.is-hidden .stk-eye { display: grid; }
.stk-tools {
  position: absolute; left: 0; bottom: calc(100% + 6px); z-index: 1;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px; width: max-content; max-width: 440px;
  padding: 6px 8px; border: 1px solid var(--border); border-radius: 10px; background: #fff;
  box-shadow: 0 10px 28px rgba(26, 36, 51, .16);
}
.stk.is-tools-below .stk-tools { top: calc(100% + 6px); bottom: auto; }
.stk.is-tools-right .stk-tools { left: auto; right: 0; }
.stk .stk-tools select, .stk .stk-tools input[type="datetime-local"] {
  width: auto; min-height: 0; height: 28px; padding: 0 6px; border: 1px solid var(--border); border-radius: 6px;
  background: #fff; color: var(--heading); font-size: 12px;
}
.stk .stk-tools .stk-btn { width: 28px; height: 28px; border: 1px solid var(--border); background: #fff; }
.stk-swatches { display: flex; align-items: center; gap: 3px; padding-left: 6px; border-left: 1px solid var(--phase-line); }
.stk-swatches button, .stk-swatches label {
  position: relative; width: 18px; height: 18px; padding: 0; border: 1px solid rgba(26, 36, 51, .18); border-radius: 50%; cursor: pointer;
}
.stk-swatches.is-bg button { border-radius: 4px; }
.stk-swatches button.is-on { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #1f86e8; }
.stk-swatches button.is-clear { background: conic-gradient(#d9dde3 25%, #fff 0 50%, #d9dde3 0 75%, #fff 0) 0 0 / 8px 8px; }
.stk-swatches label { overflow: hidden; background: conic-gradient(#f44, #fd3, #4d6, #3cf, #36f, #c3f, #f44); }
.stk-swatches label input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }

/* 审批 */
.nav-badge, .me-badge, .tab-badge {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: #f04444; color: #fff; font-size: 11px; font-weight: 800; line-height: 1; font-style: normal;
  box-shadow: 0 0 0 2px #fff;
}
.nav-badge[hidden], .me-badge[hidden], .tab-badge[hidden] { display: none; }
.nav-badge { margin-left: auto; }
.me-badge { margin-right: 2px; }
.tab-ico { position: relative; }
.tab-badge { position: absolute; top: -5px; left: 15px; min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; }
.appr-mark {
  flex: none; padding: 1px 7px; border: 1px solid #f2b27a; border-radius: 999px;
  background: #fff3e6; color: #b45309; font-size: 11.5px; font-weight: 800; line-height: 18px; cursor: help;
}

.appr-vs {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px;
  margin: 6px 20px 2px; padding: 12px 14px; border: 1px solid #f6d3ad; border-radius: 14px;
  background: linear-gradient(135deg, #fff8ef, #fff2e2);
}
.appr-vs[hidden] { display: none; }
.appr-vs-item { display: grid; justify-items: center; gap: 2px; }
.appr-vs-item em { color: #9a6b3a; font-size: 12px; font-style: normal; font-weight: 700; }
.appr-vs-item b { color: var(--heading); font-size: 26px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.appr-vs-item span { color: var(--muted); font-size: 12px; }
.appr-vs-item.is-ask b { color: #d9480f; }
.appr-vs-sep {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: #fff; color: #d9480f; font-weight: 800; box-shadow: 0 1px 3px rgba(217, 72, 15, .2);
}
.appr-vs-who { grid-column: 1 / -1; margin: 4px 0 0; color: #8a6a48; font-size: 12px; text-align: center; }
.cancel-card.is-approval .cancel-form textarea:focus { border-color: var(--kicker); box-shadow: 0 0 0 3px rgba(31, 134, 232, .12); }
.cancel-card.is-approval .cancel-msg { color: var(--danger); }

.appr-back {
  margin: 0 0 8px; padding: 4px 10px 4px 4px; border: 0; border-radius: 8px; background: transparent;
  color: var(--kicker); font-size: 14px; font-weight: 700;
}
.appr-tabs {
  display: inline-flex; gap: 4px; margin-bottom: 14px; padding: 3px; border: 1px solid var(--phase-line);
  border-radius: 12px; background: var(--phase);
}
.appr-tabs button {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 16px; border: 0; border-radius: 9px;
  background: transparent; color: var(--muted); font-size: 13px; font-weight: 700; cursor: pointer;
}
.appr-tabs button.is-on { background: #fff; color: var(--kicker); box-shadow: 0 1px 3px rgba(15, 23, 42, .08); }
.appr-tabs b {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #f04444; color: #fff;
  font-size: 11px; line-height: 18px; text-align: center;
}
.appr-tabs b[hidden] { display: none; }
.appr-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 14px; align-items: start; }
.appr-empty { grid-column: 1 / -1; padding: 48px 12px; }
.appr-card {
  display: grid; gap: 12px; padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.appr-card.is-pending { border-color: #f6d3ad; box-shadow: 0 4px 16px rgba(217, 72, 15, .06); }
.appr-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.appr-head h3 { flex: 1; min-width: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; margin: 0; font-size: 16px; }
.appr-head h3 b { color: var(--heading); font-weight: 800; }
.appr-cn { color: var(--muted); font-size: 13px; font-weight: 600; }
.appr-dest { padding: 0 8px; border-radius: 6px; background: var(--soft); color: var(--kicker); font-size: 13px; font-weight: 700; line-height: 22px; }
.appr-kind {
  flex: none; padding: 0 8px; border-radius: 6px; background: #fff3e6; color: #b45309;
  font-size: 12px; font-weight: 800; line-height: 22px;
}
.appr-kind.is-raise { background: #f1ebfd; color: #6d3fc0; }
.appr-state { flex: none; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 800; line-height: 24px; }
.appr-state.is-pending { background: #fff6e8; color: #9a6b12; }
.appr-state.is-approved { background: var(--ok-bg); color: var(--ok); }
.appr-state.is-rejected { background: var(--danger-bg); color: var(--danger); }
.appr-state.is-withdrawn { background: #eef1f5; color: #5b6878; }
.appr-meta { margin: -6px 0 0; color: var(--muted); font-size: 12.5px; }
.appr-meta b { color: var(--text); }
.appr-vol { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 8px; }
.appr-vol > div { display: grid; gap: 2px; padding: 8px 10px; border-radius: 12px; background: var(--phase); }
.appr-vol em { color: var(--muted); font-size: 12px; font-style: normal; font-weight: 700; }
.appr-vol b { color: var(--heading); font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.appr-vol b::after { content: " 方"; color: var(--muted); font-size: 12px; font-weight: 600; }
.appr-vol .is-ask { background: #fff3e6; }
.appr-vol .is-ask b { color: #d9480f; }
.appr-vol .is-over b { color: var(--danger); }
.appr-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px 12px; margin: 0; }
.appr-fields div { min-width: 0; }
.appr-fields .is-wide { grid-column: 1 / -1; }
.appr-fields dt { color: var(--muted); font-size: 12px; font-weight: 700; }
.appr-fields dd { margin: 2px 0 0; color: var(--text); font-size: 13.5px; font-weight: 600; white-space: pre-wrap; word-break: break-word; }
.appr-reason { padding: 10px 12px; border-left: 3px solid #f2b27a; border-radius: 0 10px 10px 0; background: #fffaf3; }
.appr-reason em { color: #9a6b3a; font-size: 12px; font-style: normal; font-weight: 800; }
.appr-reason p { margin: 4px 0 0; color: var(--heading); font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.appr-files { display: grid; gap: 8px; }
.appr-pics { display: flex; flex-wrap: wrap; gap: 8px; }
.appr-pic {
  width: 84px; height: 84px; padding: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 10px;
  background: #f7f9fc; cursor: zoom-in;
}
.appr-pic img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .18s; }
.appr-pic:hover img { transform: scale(1.05); }
.appr-docs { display: flex; flex-wrap: wrap; gap: 6px; }
.appr-doc {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%; height: 34px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: 8px; background: #f7f9fc; color: var(--text); font-size: 12.5px; cursor: pointer;
}
.appr-doc:hover { border-color: var(--kicker); color: var(--kicker); }
.appr-doc svg { flex: none; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.appr-doc span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appr-doc em { flex: none; color: var(--muted); font-style: normal; }
.appr-result { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 10px 12px; border-radius: 10px; background: var(--phase); font-size: 13px; }
.appr-result.is-approved b { color: var(--ok); }
.appr-result.is-rejected b { color: var(--danger); }
.appr-result span { color: var(--muted); }
.appr-result p { flex-basis: 100%; margin: 0; color: var(--text); }
.appr-actions { display: grid; gap: 10px; padding-top: 12px; border-top: 1px dashed var(--phase-line); }
.appr-actions textarea {
  width: 100%; min-height: 38px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px;
  background: #fff; color: var(--text); font: inherit; font-size: 13.5px; resize: vertical;
}
.appr-actions textarea:focus { outline: none; border-color: var(--kicker); box-shadow: 0 0 0 3px rgba(31, 134, 232, .12); }
.appr-btns { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }
.appr-btns .btn { min-height: 40px; }
.appr-no { color: var(--danger); border-color: #f3c4c6; }
.appr-no:hover { background: var(--danger-bg); }

.doc-viewer { z-index: 120; }
.doc-card { width: min(980px, calc(100% - 32px)); height: min(86vh, 900px); display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.doc-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 18px; border-bottom: 1px solid var(--phase-line); }
.doc-head b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--heading); }
.doc-x { width: 34px; height: 34px; border: 0; border-radius: 8px; background: var(--control); color: var(--heading); font-size: 20px; cursor: pointer; }
.doc-card iframe { flex: 1; width: 100%; border: 0; background: #fff; }

@media (max-width: 900px) {
  .appr-tabs { display: flex; }
  .appr-tabs button { flex: 1; justify-content: center; padding: 0 8px; }
  .appr-list { grid-template-columns: 1fr; gap: 10px; }
  .appr-card { padding: 14px; border-radius: 14px; }
  .appr-pic { width: 72px; height: 72px; }
  .appr-btns .btn { min-height: 44px; }
  .doc-card { width: 100%; height: 100%; border-radius: 0; }
}

/* 指定 */
.mine-view {
  display: inline-flex; align-items: center; gap: 3px; flex: none; height: 28px; padding: 0 9px 0 6px;
  border: 1px solid var(--border); border-radius: 999px; background: #fff; color: #7a8696;
  font-size: 12.5px; font-weight: 700; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.mine-view svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; }
.mine-view:hover { border-color: #8fb8e6; color: #1d6fbf; }
.mine-view.is-on { border-color: #1f86e8; background: #1f86e8; color: #fff; box-shadow: 0 2px 8px rgba(31, 134, 232, .28); }
.h1-fav .mine-view { margin-left: 8px; }

.chip.is-named { flex: none; gap: 1px; white-space: nowrap; cursor: help; }
.chip.is-named .bk-name { flex: none; max-width: 4.5em; overflow: hidden; text-overflow: ellipsis; font-weight: 800; }
.chip.is-named .bk-more {
  flex: none; margin: 0 2px 0 1px; padding: 0 4px; border-radius: 999px; background: rgba(255, 255, 255, .75);
  font-size: 10.5px; font-style: normal; font-weight: 800; line-height: 15px;
}

.asg-bar { display: flex; align-items: center; gap: 14px; margin: 0 0 16px; }
.asg-bar input {
  flex: 0 1 360px; min-width: 0; height: 38px; padding: 0 14px; border: 1px solid var(--border); border-radius: 10px;
  background: #fff; color: var(--text); font: inherit; font-size: 13.5px;
}
.asg-bar input:focus { outline: none; border-color: var(--kicker); box-shadow: 0 0 0 3px rgba(31, 134, 232, .12); }
.asg-stats { display: flex; gap: 8px; margin-left: auto; }
.asg-stats span { padding: 6px 12px; border-radius: 999px; background: var(--phase); color: var(--muted); font-size: 12.5px; }
.asg-stats b { margin-left: 2px; color: var(--heading); font-size: 14px; }
.asg-group-h, .asg-rest h3 {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; margin: 0 0 10px; color: var(--heading); font-size: 14px;
}
.asg-group-h b, .asg-rest h3 b {
  padding: 0 7px; border-radius: 999px; background: #e8f1fd; color: #1d6fbf; font-size: 12px; line-height: 20px;
}
.asg-rest h3 b { background: #eef1f5; color: #5b6878; }
.asg-rest h3 span { color: var(--muted); font-size: 12.5px; font-weight: 400; }
.asg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 14px; align-items: start; }
.asg-card {
  display: grid; gap: 10px; padding: 14px 16px; border: 1px solid #bcd7f5; border-radius: 16px;
  background: #fff; box-shadow: 0 4px 16px rgba(31, 134, 232, .06);
}
.asg-card.is-open { grid-column: 1 / -1; border-color: #1f86e8; box-shadow: 0 8px 26px rgba(31, 134, 232, .14); }
.asg-head { display: flex; align-items: center; gap: 10px; min-width: 0; cursor: pointer; }
.asg-role {
  margin-left: 6px; padding: 0 6px; border-radius: 5px; background: #eef1f5; color: #5b6878;
  font-size: 11px; font-style: normal; font-weight: 700; line-height: 18px; vertical-align: 1px;
}
.asg-role.is-boss { background: #fff3e0; color: #a86a12; }
.asg-edit {
  display: inline-flex; align-items: center; gap: 4px; margin-left: auto; height: 30px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--heading); font-size: 12.5px; font-weight: 700; cursor: pointer;
}
.asg-edit i { width: 7px; height: 7px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.asg-card.is-open .asg-edit { border-color: #1f86e8; color: #1d6fbf; }
.asg-card.is-open .asg-edit i { transform: translateY(1px) rotate(-135deg); }
.asg-preview { display: grid; gap: 7px; padding: 10px 12px; border-radius: 12px; background: var(--phase); }
.asg-line { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.asg-k { display: inline-flex; align-items: center; gap: 4px; flex: none; width: 66px; color: var(--muted); font-size: 12px; line-height: 22px; }
.asg-k b { color: #1d6fbf; font-size: 13px; }
.asg-tags { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.asg-tag {
  padding: 0 7px; border-radius: 6px; background: #1f86e8; color: #fff; font-size: 12px; font-weight: 700; line-height: 22px; letter-spacing: .02em;
}
.asg-tag.is-all { background: #24804a; }
.asg-tag.is-more { background: #dbe8f7; color: #1d6fbf; cursor: help; }
.asg-tag.is-hit { background: #f59e0b; }
.asg-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; }
.asg-copy { display: inline-flex; align-items: center; gap: 8px; color: var(--heading); font-size: 12.5px; font-weight: 700; }
.asg-copy select {
  height: 30px; padding: 0 8px; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text); font: inherit; font-size: 12.5px;
}
.asg-stamp { margin-left: auto; color: var(--muted); font-size: 11.5px; }
.asg-rest { margin-top: 22px; padding: 14px 16px; border: 1px dashed var(--border); border-radius: 14px; background: #fafbfc; }
.asg-rest-list { display: flex; flex-wrap: wrap; gap: 8px; }
.asg-person {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px 0 4px; border: 1px solid var(--border);
  border-radius: 999px; background: #fff; color: #5b6878; font-size: 13px;
}
.asg-person i {
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #eef1f5;
  color: #7a8696; font-size: 12px; font-style: normal; font-weight: 800;
}
.asg-person small { color: var(--muted); font-size: 11px; }
.asg-link { padding: 0; border: 0; background: none; color: #1d6fbf; font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; }
.asg-ava {
  display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 12px;
  background: #e8f1fd; color: #1d6fbf; font-size: 16px; font-weight: 800;
}
.asg-who { display: grid; gap: 2px; min-width: 0; }
.asg-who b { color: var(--heading); font-size: 15px; }
.asg-who small { color: var(--muted); font-size: 12px; }
.asg-sum em { color: #1d6fbf; font-size: 13px; font-style: normal; font-weight: 800; }
.asg-body { display: grid; gap: 12px; }
.asg-sec { display: grid; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--phase); }
.asg-sec-h { display: flex; align-items: center; gap: 8px; }
.asg-sec-h b { color: var(--heading); font-size: 13px; }
.asg-sum { color: var(--muted); font-size: 12px; }
.asg-q {
  width: 120px; height: 28px; margin-left: auto; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px;
  background: #fff; color: var(--text); font: inherit; font-size: 12.5px;
}
.asg-q:focus { outline: none; border-color: var(--kicker); }
.asg-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.asg-chips.is-long { max-height: 148px; overflow: auto; padding-right: 2px; }
.asg-chip {
  height: 28px; padding: 0 11px; border: 1px solid var(--border); border-radius: 8px; background: #fff;
  color: var(--text); font-size: 12.5px; font-weight: 700; letter-spacing: .02em; cursor: pointer;
}
.asg-chip:hover { border-color: #8fb8e6; color: #1d6fbf; }
.asg-chip.is-on { border-color: #1f86e8; background: #1f86e8; color: #fff; }
.asg-chip.is-all.is-on { border-color: #24804a; background: #24804a; }
.asg-chip.is-add { border-style: dashed; border-color: #1f86e8; background: #f2f8ff; color: #1d6fbf; }
.asg-chip.is-add:hover { background: #e3f0fd; }
.asg-chip { position: relative; }
.asg-chip.is-focus { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #f59e0b; }
.asg-badge {
  position: absolute; top: -8px; right: -7px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px;
  background: #f04444; color: #fff; box-shadow: 0 0 0 2px #fff; font-size: 10px; font-weight: 800; line-height: 17px; text-align: center;
}
.asg-badge.is-all { background: #24804a; }
.asg-sec.is-dest { border: 1px solid #f6d7a4; background: #fffaf2; }
.asg-for { padding: 0 8px; border-radius: 6px; background: #f59e0b; color: #fff; font-size: 12px; font-weight: 800; line-height: 20px; }
.asg-qbox { display: inline-flex; align-items: center; gap: 6px; margin-left: 4px; }
.asg-qbox .asg-q { margin-left: 0; }
.asg-qbox .asg-chip, .asg-qbox .asg-none { white-space: nowrap; }
.asg-hint { margin-left: auto; color: var(--muted); font-size: 11.5px; }
.asg-chips { padding-top: 6px; }
.asg-tag sup { margin-left: 2px; padding: 0 3px; border-radius: 4px; background: rgba(255, 255, 255, .28); font-size: 9.5px; vertical-align: 2px; }
.asg-tag.is-dest { background: #e8f1fd; color: #1d6fbf; }
.asg-tag.is-open { background: #f59e0b; color: #fff; cursor: pointer; box-shadow: 0 2px 6px rgba(245, 158, 11, .35); }
.asg-tag.is-open:hover, .asg-tag.is-open:focus-visible { background: #d97706; outline: none; }
.asg-open-n {
  margin-left: 4px; padding: 0 5px; border-radius: 999px; background: #fff; color: #b45309;
  font-size: 10.5px; font-style: normal; font-weight: 800; line-height: 15px;
}
.asg-open-all {
  margin-left: auto; height: 28px; padding: 0 10px; border: 1px solid #f6c56d; border-radius: 999px;
  background: #fff7e6; color: #b45309; font-size: 12px; font-weight: 700; white-space: nowrap; cursor: pointer;
}
.asg-open-all b { font-size: 14px; }
.asg-open-all:hover { background: #ffedc7; }
.asg-open-all + .asg-edit { margin-left: 0; }
.asg-done { margin-left: auto; color: #24804a; font-size: 12px; font-weight: 700; white-space: nowrap; }
.asg-done + .asg-edit { margin-left: 0; }
.asg-stats span.is-open { background: #fff7e6; color: #b45309; }
.asg-stats span.is-open b { color: #b45309; }
.asg-stats span.is-warn { background: #fdecec; color: #b13c3c; }
.asg-stats span.is-warn b { color: #b13c3c; }
.asg-gap { position: relative; cursor: help; outline: none; }
.asg-gap-pop {
  display: none; position: absolute; top: calc(100% + 8px); right: 0; z-index: 16; width: 360px; max-width: calc(100vw - 32px);
  padding: 12px 14px; border: 1px solid #f1c4c4; border-radius: 12px; background: #fff; color: var(--text);
  box-shadow: 0 16px 40px rgba(26, 36, 56, .18); font-size: 12.5px; font-weight: 500; white-space: normal; text-align: left; cursor: default;
}
.asg-gap:hover .asg-gap-pop, .asg-gap:focus .asg-gap-pop, .asg-gap:focus-within .asg-gap-pop { display: block; }
.asg-gap-title { margin-bottom: 8px; color: #b13c3c; font-size: 13px; font-weight: 800; }
.asg-gap-pop ul { display: grid; gap: 8px; max-height: 360px; margin: 0; padding: 0; overflow: auto; list-style: none; }
.asg-gap-pop li { padding: 8px 10px; border-radius: 9px; background: #fdf3f3; }
.asg-gap-k { display: flex; align-items: center; gap: 6px; }
.asg-stats .asg-gap-pop .asg-gap-k b { margin: 0; color: var(--heading); font-size: 13px; font-weight: 800; }
.asg-gap-k i { color: var(--muted); font-style: normal; }
.asg-gap-k em { margin-left: auto; color: #b13c3c; font-style: normal; font-weight: 800; }
.asg-gap-why { margin-top: 3px; color: #6b4a4a; line-height: 1.5; }
.asg-gap-more, .asg-gap-tip { margin-top: 8px; color: var(--muted); font-size: 12px; }
.asg-mask { position: fixed; inset: 0; z-index: 17; background: rgba(26, 36, 51, .18); }
.asg-panel { position: fixed; top: 16px; right: 16px; bottom: 16px; z-index: 18; width: min(420px, calc(100% - 32px)); }
.asg-none { color: var(--muted); font-size: 12px; line-height: 28px; }

@media (max-width: 900px) {
  .q-box > .mine-view {
    position: absolute; top: 50%; left: 4px; z-index: 1; height: 28px; padding: 0 7px 0 5px; transform: translateY(-50%);
    border-radius: 8px; font-size: 12px;
  }
  .q-box.has-mine > input { padding-left: 64px; }
  .asg-grid { grid-template-columns: 1fr; gap: 10px; }
  .asg-card { padding: 14px; border-radius: 14px; }
  .asg-bar { flex-wrap: wrap; gap: 8px; }
  .asg-bar input { flex: 1 1 100%; }
  .asg-stats { margin-left: 0; }
  .asg-k { width: 56px; }
  .asg-stamp { margin-left: 0; }
  .asg-q { width: 104px; }
  .asg-sec-h { flex-wrap: wrap; }
  .asg-panel { inset: 0; width: 100%; border-radius: 0; }
  .asg-stats { flex-wrap: wrap; }
  .asg-gap-pop { position: fixed; top: auto; left: 16px; right: 16px; width: auto; max-width: none; margin-top: 8px; }
  .asg-hint { flex-basis: 100%; margin-left: 0; }
  .asg-chip { height: 32px; }
  .chip.is-named .bk-name { max-width: 4em; }
}


/* ---------- 商舱确礼花 ---------- */
.cele { position: fixed; inset: 0; z-index: 2147483000; display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .3s ease; }
.cele[hidden] { display: none; }
.cele.is-on { opacity: 1; }
.cele-glow { position: absolute; inset: 0; background: rgba(15, 23, 38, .48); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.cele-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.cele-card {
  position: relative; z-index: 1; width: min(380px, calc(100vw - 40px)); padding: 28px 28px 0; text-align: center;
  border-radius: 20px; background: rgba(255, 255, 255, .985); color: #0f1b2d;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .15), 0 0 0 1px rgba(15, 27, 45, .05);
  opacity: 0; transform: translateY(12px) scale(.96);
}
.cele-card.is-in { animation: cele-in .45s var(--ease) both; }
.cele-head { display: flex; align-items: center; justify-content: center; gap: 8px; }
.cele-seal {
  width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(145deg, #c9a063, #9c7438); animation: cele-seal .5s var(--ease) .15s both;
}
.cele-seal svg { width: 13px; height: 13px; fill: none; stroke: #fff; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.cele-kicker { color: #8a94a6; font-size: 13px; font-weight: 500; letter-spacing: .12em; }
.cele-title { margin: 10px 0 0; color: #8f6a2e; font-size: 30px; line-height: 1.2; font-weight: 800; letter-spacing: .14em; text-indent: .14em; }
.cele-vol { display: flex; align-items: baseline; justify-content: center; gap: 6px; margin: 6px 0 0; color: #0f1b2d; }
.cele-vol b { font-size: 64px; line-height: 1.05; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.cele-vol span { color: #6b7a90; font-size: 18px; font-weight: 600; }
.cele-org { display: inline-flex; align-items: center; gap: 8px; margin: 14px 0 0; padding: 4px 12px; border-radius: 999px; background: #f1f5fa; color: #3d5a80; font-size: 12px; font-weight: 600; }
.cele-org i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .5; }
.cele-info { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 10px; margin: 10px 0 0; color: #6b7a90; font-size: 13px; line-height: 1.5; }
.cele-org + .cele-info { margin-top: 8px; }
.cele-info b { color: #3d4c63; font-weight: 600; }
.cele-sep { width: 1px; height: 11px; background: #cbd3de; }
.cele-foot { display: flex; justify-content: space-between; align-items: center; margin: 22px -28px 0; padding: 12px 18px 12px 22px; border-top: 1px solid #eef1f5; }
.cele-count { color: #8a94a6; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cele-action {
  display: inline-flex; align-items: center; gap: 2px; height: 32px; padding: 0 10px 0 14px; border-radius: 8px;
  color: #1f5fbf; font-size: 13px; font-weight: 600; transition: background .15s ease;
}
.cele-action svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.cele-card:hover .cele-action { background: #eef4fd; }
@keyframes cele-in { 0% { opacity: 0; transform: translateY(14px) scale(.95); } 100% { opacity: 1; transform: none; } }
@keyframes cele-seal { 0% { transform: scale(.3); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@media (max-width: 520px) {
  .cele-card { padding: 24px 20px 0; border-radius: 18px; }
  .cele-foot { margin: 20px -20px 0; }
  .cele-vol b { font-size: 54px; }
}
@media (prefers-reduced-motion: reduce) { .cele-card.is-in, .cele-seal { animation: none; opacity: 1; transform: none; } }

/* 市场运价：照 CargoMART 的 Rate Management System 排 */
.mkt-btn { border-color: #12a37f; color: #12a37f; }
.mkt-btn:hover { background: #12a37f; color: #fff; }
.modal-card.market-card { width: min(1280px, calc(100% - 32px)); max-height: calc(100vh - 48px); display: flex; flex-direction: column; overflow: hidden; }
.mk-head-actions { display: flex; align-items: center; gap: 6px; }
.mk-detail {
  display: grid; place-items: center;
  border: 1px solid #c5dff8; background: #fff; color: #1f86e8;
}
.mk-detail:hover { background: #f3f9fe; }
.mk-detail svg {
  width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2;
  stroke-linecap: round; stroke-linejoin: round; transition: transform .32s ease;
}
.mk-detail.is-on { background: #e7f3fd; border-color: #9dcef8; color: #1f86e8; }
.mk-detail.is-on svg { transform: scaleX(-1); }
#marketModal.is-split { justify-content: flex-start; align-items: stretch; padding: 16px; padding-right: calc(min(760px, 52vw) + 28px); }
html.is-client #marketModal.is-split { padding-top: 44px; }
#marketModal.is-split .market-card { width: 100%; max-width: none; max-height: none; height: auto; flex: 1; min-width: 0; }
#marketModal.is-split .mk-chip { padding: 8px; }
#marketModal.is-split .mk-chip b,
#marketModal.is-split .mk-chip small { white-space: nowrap; }
#marketModal.is-split .mk-chip b { font-size: 14px; }
.drawer.is-beside { z-index: 45; pointer-events: none; }
.drawer.is-beside .drawer-backdrop { display: none; }
.drawer.is-beside .drawer-panel {
  top: 16px; bottom: 16px; right: 16px; pointer-events: auto;
  width: min(760px, 52vw);
  border: 1px solid var(--border); border-radius: 16px;
  transform: translateX(0);
  transition: transform .34s cubic-bezier(.22, .8, .2, 1);
}
.drawer.is-beside.is-out .drawer-panel { transform: translateX(calc(100% + 32px)); }
.drawer.is-beside.is-instant .drawer-panel { transition: none; }
#dirtyModal { z-index: 80; }
@media (prefers-reduced-motion: reduce) {
  .drawer.is-beside .drawer-panel, .mk-detail svg { transition: none; }
}
.drawer.is-beside .drawer-body { overflow-x: hidden; }
.drawer.is-beside .section-body { grid-template-columns: repeat(4, minmax(0, 1fr)); }
html.is-client .drawer.is-beside .drawer-panel { top: 44px; }
@media (max-width: 900px) {
  #marketModal.is-split { justify-content: center; align-items: center; padding: 10px; }
  .drawer.is-beside .drawer-backdrop { display: block; }
  .drawer.is-beside .drawer-panel { top: 0; right: 0; bottom: 0; width: min(760px, 100%); border: 0; border-radius: 0; }
  .drawer.is-beside .section-body { grid-template-columns: 1fr 1fr; }
}
.market-card .modal-head h2 small { margin-left: 8px; color: var(--muted); font-size: 14px; font-weight: 600; }
.market-body { display: block; max-height: none; flex: 1; min-height: 0; overflow-x: hidden; overflow-y: auto; background: #f5f7fb; overscroll-behavior: contain; }
.market-body,
.drawer-body {
  scrollbar-width: thin;
  scrollbar-color: #8ec5f6 transparent;
}
.market-body::-webkit-scrollbar,
.drawer-body::-webkit-scrollbar { width: 6px; height: 6px; }
.market-body::-webkit-scrollbar-track,
.drawer-body::-webkit-scrollbar-track { background: transparent; }
.market-body::-webkit-scrollbar-thumb,
.drawer-body::-webkit-scrollbar-thumb { background: #8ec5f6; border-radius: 99px; }
.market-body::-webkit-scrollbar-thumb:hover,
.drawer-body::-webkit-scrollbar-thumb:hover { background: #5aa6ee; }
.mk-title { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.mk-title h3 { margin: 0; color: var(--heading); font-size: 20px; }
.mk-title span { color: var(--muted); font-size: 13px; }
.mk-chips { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.mk-chip { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.mk-chip span { color: var(--muted); font-size: 12px; }
.mk-chip b { color: var(--heading); font-size: 16px; }
.mk-chip small { color: #c26a00; font-size: 11px; }
.mk-sources, .mk-dests, .mk-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.mk-sources button, .mk-dests button, .mk-tabs button {
  min-height: 30px; padding: 0 14px; border: 1px solid var(--border); border-radius: 999px; background: #fff;
  color: var(--text); font-size: 13px; font-weight: 700; cursor: pointer;
}
.mk-sources { margin-bottom: 8px; }
.mk-sources button { min-width: 84px; }
.mk-dests button small { margin-left: 6px; color: var(--muted); }
.mk-sources button.is-on, .mk-dests button.is-on, .mk-tabs button.is-on { border-color: #1f3b73; background: #1f3b73; color: #fff; }
.mk-dests button.is-on small { color: #cfe0ff; }
/* S&D 各航司卡片共用固定列宽，跨卡列对齐；短列禁竖排断字 */
.mk-table.is-sd {
  table-layout: fixed;
  width: 100%;
}
.mk-table.is-sd th,
.mk-table.is-sd td {
  vertical-align: top;
  overflow-wrap: anywhere;
}
.mk-table.is-sd.is-rates th:nth-child(1),
.mk-table.is-sd.is-rates td:nth-child(1) { width: 12%; white-space: nowrap; } /* Date Start */
.mk-table.is-sd.is-rates th:nth-child(2),
.mk-table.is-sd.is-rates td:nth-child(2) { width: 5%; white-space: nowrap; word-break: keep-all; } /* 类别：禁止「交/散」竖排 */
.mk-table.is-sd.is-rates th:nth-child(3),
.mk-table.is-sd.is-rates td:nth-child(3) { width: 8%; white-space: nowrap; } /* 适用费率 */
.mk-table.is-sd.is-rates th:nth-child(4),
.mk-table.is-sd.is-rates td:nth-child(4) { width: 22%; white-space: normal; } /* 运价分段 */
.mk-table.is-sd.is-rates th:nth-child(5),
.mk-table.is-sd.is-rates td:nth-child(5) { width: 9%; white-space: nowrap; } /* Freight */
.mk-table.is-sd.is-rates th:nth-child(6),
.mk-table.is-sd.is-rates td:nth-child(6) { width: 16%; white-space: normal; } /* Surcharges */
.mk-table.is-sd.is-rates th:nth-child(7),
.mk-table.is-sd.is-rates td:nth-child(7) { width: 17%; white-space: normal; } /* 备注（不包含） */
.mk-table.is-sd.is-rates th:nth-child(8),
.mk-table.is-sd.is-rates td:nth-child(8) { width: 11%; white-space: nowrap; } /* Total */
.mk-table.is-sd.is-notes th:nth-child(1),
.mk-table.is-sd.is-notes td:nth-child(1) { width: 12%; white-space: nowrap; }
.mk-table.is-sd.is-notes th:nth-child(2),
.mk-table.is-sd.is-notes td:nth-child(2) { width: 5%; white-space: nowrap; word-break: keep-all; }
.mk-table.is-sd.is-notes th:nth-child(3),
.mk-table.is-sd.is-notes td:nth-child(3) { width: 14%; white-space: normal; }
.mk-table.is-sd.is-notes th:nth-child(4),
.mk-table.is-sd.is-notes td:nth-child(4),
.mk-table.is-sd.is-notes th:nth-child(5),
.mk-table.is-sd.is-notes td:nth-child(5),
.mk-table.is-sd.is-notes th:nth-child(6),
.mk-table.is-sd.is-notes td:nth-child(6),
.mk-table.is-sd.is-notes th:nth-child(7),
.mk-table.is-sd.is-notes td:nth-child(7) { width: 17%; white-space: normal; }
.mk-table.is-sd .mk-ladder { max-width: none; }
.mk-table.is-sd td small { white-space: normal; overflow-wrap: anywhere; }
.mk-amt { display: inline-block; white-space: nowrap; }
.mk-fee-list { display: flex; flex-direction: column; gap: 6px; }
.mk-fee { display: flex; flex-direction: column; gap: 2px; }
.mk-fee span { color: var(--muted); font-size: 11px; font-weight: 700; }
.mk-fee b { color: var(--text); font-size: 12px; font-weight: 600; white-space: pre-wrap; }
.mk-cards { display: flex; flex-direction: column; gap: 12px; }
.mk-card { border: 1px solid var(--border); border-radius: 12px; background: #fff; overflow: hidden; }
.mk-card header { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.mk-who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; min-width: 0; }
.mk-card header strong { color: var(--heading); font-size: 15px; }
.mk-card header small { margin-left: auto; color: var(--muted); font-size: 12px; }
.mk-route { color: var(--text); font-weight: 700; }
.mk-route i { color: #1f86e8; font-style: normal; }
.mk-logo { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; background: #eef2f7; overflow: hidden; flex: none; }
.mk-logo b { color: #1f3b73; font-size: 12px; }
.mk-logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.mk-scroll { overflow-x: auto; max-width: 100%; }
.mk-scroll:has(.mk-table.is-ops) { overflow-x: hidden; }
.mk-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mk-table th { padding: 8px 10px; background: #f7f9fc; color: var(--muted); font-size: 12px; font-weight: 700; text-align: left; white-space: nowrap; }
.mk-table td { padding: 10px 10px; border-top: 1px solid #edf1f6; color: var(--text); vertical-align: top; white-space: nowrap; }
.mk-table td small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.mk-table.is-ops { table-layout: fixed; }
.mk-table.is-ops th:nth-child(1) { width: 11%; }
.mk-table.is-ops th:nth-child(2) { width: 12%; }
.mk-table.is-ops th:nth-child(3) { width: 8%; }
.mk-table.is-ops th:nth-child(4) { width: 6%; }
.mk-table.is-ops th:nth-child(5) { width: 8%; }
.mk-table.is-ops th:nth-child(6) { width: 18%; }
.mk-table.is-ops th:nth-child(7) { width: 18%; }
.mk-table.is-ops th:nth-child(8) { width: 10%; }
.mk-table.is-ops th:nth-child(9) { width: 9%; }
.mk-table.is-ops td:nth-child(n+6),
.mk-table.is-ops th:nth-child(n+6) { white-space: normal; overflow-wrap: anywhere; }
.mk-who .mk-al { margin-right: 6px; color: #1f3b73; font-size: 15px; letter-spacing: 0.04em; }
.mk-who .mk-al.is-ask { color: #1f86e8; }
.mk-total { color: #1f3b73; font-size: 14px; }
.mk-type { display: inline-block; padding: 2px 8px; border-radius: 999px; background: #eef2f7; color: #1f3b73; font-size: 12px; font-weight: 700; }
.mk-type.is-ai { background: #e8f7f1; color: #0d8a69; }
.mk-muted { color: var(--muted); }
.mk-ladder { display: flex; flex-wrap: wrap; gap: 4px; max-width: 360px; white-space: normal; }
.mk-break { padding: 1px 6px; border-radius: 6px; background: #f2f5f9; color: var(--muted); font-size: 11px; }
.mk-break b { color: var(--text); }
.mk-break.is-hit { background: #1f86e8; color: #dbeaff; }
.mk-break.is-hit b { color: #fff; }
.mk-tag { display: inline-block; margin-right: 4px; padding: 1px 6px; border: 1px solid var(--border); border-radius: 6px; font-size: 11px; font-weight: 700; }
.mk-contact { display: flex; flex-direction: column; gap: 1px; }
.mk-contact + .mk-contact { margin-top: 6px; }
.mk-contact a, .mk-table td a { color: #1f86e8; overflow-wrap: anywhere; }
.mk-remark { white-space: pre-wrap; font-size: 12px; line-height: 1.5; }
.mk-hle { white-space: pre-wrap; word-break: break-word; }
.mk-fold { max-width: none; }
.mk-fold-body { max-height: 6.6em; overflow: hidden; line-height: 1.5; word-break: break-word; white-space: pre-wrap; }
.mk-fold.is-open .mk-fold-body, .mk-fold.is-fit .mk-fold-body { max-height: none; }
.mk-fold-btn { margin-top: 4px; padding: 0; border: 0; background: none; color: #1f86e8; font-size: 12px; font-weight: 700; cursor: pointer; }
.mk-fold-btn:hover { text-decoration: underline; }
.mk-empty { padding: 36px 12px; color: var(--muted); text-align: center; }
.mk-empty.is-error { color: #c0392b; }
.mk-item { padding: 12px 12px 14px; border-top: 1px solid #edf1f6; }
.mk-item-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: 10px; }
.mk-item-top strong { min-width: 0; color: var(--heading); font-size: 15px; word-break: break-word; }
.mk-item-top .mk-total { margin-left: auto; }
.mk-cat {
  display: inline-block; padding: 0 6px; border-radius: 4px; background: #eef2f7;
  color: #1f3b73; font-size: 11px; font-weight: 700; line-height: 1.5;
}
.mk-dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin: 0; }
.mk-dl div { min-width: 0; }
.mk-dl .is-wide { grid-column: 1 / -1; }
.mk-dl dt { color: var(--muted); font-size: 11px; font-weight: 700; }
.mk-dl dd { margin: 2px 0 0; color: var(--text); font-size: 13px; word-break: break-word; }
.mk-dl dd small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.mk-dl dd .mk-ladder { max-width: none; }
@media (max-width: 900px) {
  #marketModal { align-items: stretch; padding: 0; background: #fff; }
  .modal-card.market-card {
    width: 100%; height: 100%; max-height: 100%; border: 0; border-radius: 0; box-shadow: none;
  }
  .market-card .modal-head { flex: none; padding: 10px 12px; padding-top: max(10px, env(safe-area-inset-top)); }
  .market-card .modal-head h2 { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; font-size: 16px; }
  .market-card .modal-head h2 small { margin-left: 0; font-size: 13px; }
  .market-body { padding: 8px 10px calc(12px + env(safe-area-inset-bottom)); }
  .mk-title { margin-bottom: 4px; gap: 6px; }
  .mk-title h3 { font-size: 15px; }
  .mk-chips { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin-bottom: 6px; }
  .mk-chip { flex-direction: row; align-items: baseline; gap: 4px; padding: 4px 6px; border-radius: 8px; white-space: nowrap; }
  .mk-chip span { font-size: 10px; }
  .mk-chip b { font-size: 12px; line-height: 1.2; }
  .mk-chip small { display: none; }
  .mk-dests { margin-bottom: 6px; }
  .mk-tabs {
    position: sticky; top: -8px; z-index: 2; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px; margin: 0 -2px 6px; padding: 6px 2px; background: #f5f7fb;
  }
  .mk-tabs.is-few { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mk-tabs button { min-height: 32px; padding: 0 4px; border-radius: 8px; font-size: 12px; }
  .mk-cards { gap: 8px; }
  .mk-card header { flex-wrap: nowrap; align-items: center; gap: 8px; padding: 6px 10px; }
  .mk-card header small { margin-left: auto; flex: none; flex-basis: auto; padding-left: 0; white-space: nowrap; }
  .mk-logo { width: 28px; height: 28px; }
  .mk-who { flex: 1; min-width: 0; }
  .mk-who strong { display: block; font-size: 14px; line-height: 1.25; }
  .mk-route { display: block; font-size: 12px; }
  .mk-item { padding: 8px 10px; }
  .mk-item-top { margin-bottom: 4px; gap: 4px 6px; }
  .mk-item-top .mk-total { flex: none; white-space: nowrap; }
  .mk-item-top strong { font-size: 14px; }
  .mk-dl { gap: 2px 10px; }
  .mk-dl div:not(.is-wide) { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 4px; }
  .mk-dl div:not(.is-wide) dd { margin: 0; font-size: 13px; }
  .mk-dl div:not(.is-wide) dd small { display: inline; margin: 0 0 0 4px; }
  .mk-dl .is-wide { margin-top: 2px; }
  .mk-dl dd .mk-ladder { gap: 3px; }
  .mk-break { padding: 0 4px; }
  /* S&D 移动端：压缩顶栏/字段间距，关键价并排，备注折得更狠 */
  .mk-card.is-sd { border-radius: 10px; }
  .mk-card.is-sd header { padding: 4px 8px; }
  .mk-card.is-sd .mk-item { padding: 5px 8px 6px; }
  .mk-card.is-sd .mk-item-top { margin-bottom: 2px; gap: 2px 6px; }
  .mk-card.is-sd .mk-item-top strong { font-size: 12px; font-weight: 700; }
  .mk-card.is-sd .mk-item-top .mk-total { font-size: 12px; }
  .mk-card.is-sd .mk-cat {
    display: inline-block; padding: 0 5px; border-radius: 4px; background: #eef2f7;
    color: #1f3b73; font-size: 11px; font-weight: 700; line-height: 1.5;
  }
  .mk-card.is-sd .mk-dl.is-dense { gap: 1px 8px; }
  .mk-card.is-sd .mk-dl.is-dense dt { font-size: 10px; }
  .mk-card.is-sd .mk-dl.is-dense div:not(.is-wide) dd { font-size: 12px; }
  .mk-card.is-sd .mk-dl.is-dense .is-wide { margin-top: 1px; }
  .mk-card.is-sd .mk-dl.is-dense .is-wide dt { margin-bottom: 0; }
  .mk-card.is-sd .mk-dl.is-dense .is-wide dd { font-size: 12px; }
  .mk-card.is-sd .mk-dl.is-dense dd small { display: block; margin: 0; font-size: 10px; line-height: 1.35; }
  .mk-card.is-sd .mk-break { padding: 0 3px; font-size: 10px; border-radius: 4px; }
  .mk-card.is-sd .mk-ladder { gap: 2px; }
  .mk-card.is-sd .mk-fold-body { max-height: 3.9em; font-size: 11px; line-height: 1.35; }
  .mk-card.is-sd .mk-fold-btn { margin-top: 1px; font-size: 11px; }
  .mk-card.is-sd .mk-fee-list { gap: 3px; }
  .mk-card.is-sd .mk-fee { gap: 0; }
  .mk-card.is-sd .mk-fee span { font-size: 10px; }
  .mk-card.is-sd .mk-fee b { font-size: 11px; line-height: 1.35; }
}
