/* ==================================================================
   话术库 · 样式
   ================================================================== */

:root {
  --ink: #0f211c;
  --ink-2: #2b3d36;
  --muted: #71807a;
  --faint: #98a6a0;
  --line: #e3eae6;
  --line-soft: #eef2f0;
  --bg: #f4f7f5;
  --card: #ffffff;
  --green: #0e7a5c;
  --green-dark: #0a5f48;
  --green-deep: #0b2b23;
  --green-soft: #e8f4ee;
  --amber: #a2621b;
  --red: #b23b32;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(12, 42, 35, 0.05), 0 10px 28px rgba(12, 42, 35, 0.07);
  --shadow-lg: 0 24px 70px rgba(8, 26, 21, 0.22);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, h4, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
input, select, textarea { outline: none; }
[hidden] { display: none !important; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

::selection { background: #cdeadd; color: #0b2b23; }

/* 滚动条 */
.content::-webkit-scrollbar,
.sheet-body::-webkit-scrollbar,
.modal-body::-webkit-scrollbar,
.tags-row::-webkit-scrollbar { width: 8px; height: 0; }
.content::-webkit-scrollbar-thumb,
.sheet-body::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb { background: #dbe3df; border-radius: 8px; }

/* ==================================================================
   登录
   ================================================================== */

.login {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  background: var(--card);
}

.login-brand {
  position: relative;
  overflow: hidden;
  padding: 52px 60px;
  display: flex;
  flex-direction: column;
  color: #fff;
  background: radial-gradient(120% 90% at 8% 0%, #175545 0%, #0b2b23 56%, #081e18 100%);
}

.brand-lockup { display: flex; align-items: center; gap: 12px; }

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #d6eee3;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.brand-mark svg { width: 28px; height: 28px; stroke: none; }
.brand-mark.has-img {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  overflow: hidden;
}
.brand-mark.has-img img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 13px;
}
.brand-mark.small.has-img img { border-radius: 11px; }
.brand-mark.small { width: 38px; height: 38px; border-radius: 11px; }
.brand-mark.small svg { width: 24px; height: 24px; }

.brand-word { font-size: 17px; font-weight: 600; letter-spacing: 5px; }

.brand-copy { margin: auto 0; padding: 40px 0; position: relative; z-index: 2; }
.login-brand-visual {
  margin: auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}
.login-brand-visual img {
  width: min(260px, 56%);
  aspect-ratio: 1;
  border-radius: 30px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  opacity: 0.97;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 2.4px;
  color: #9cc9b8;
  margin-bottom: 22px;
}

.brand-copy h1 {
  font-size: 46px;
  line-height: 1.34;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 22px;
}

.brand-copy .lede {
  max-width: 400px;
  font-size: 14.5px;
  line-height: 1.95;
  color: rgba(255, 255, 255, 0.66);
}

.brand-points {
  list-style: none;
  padding: 0;
  margin: 38px 0 0;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.brand-points li {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
}
.brand-points svg { width: 17px; height: 17px; color: #79c3a7; }

.brand-foot {
  position: relative;
  z-index: 2;
  font-size: 11px;
  letter-spacing: 1.4px;
  color: rgba(255, 255, 255, 0.32);
}

.brand-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(128, 199, 173, 0.16);
  pointer-events: none;
}
.brand-ring.r1 { width: 520px; height: 520px; right: -220px; bottom: -160px; }
.brand-ring.r2 { width: 760px; height: 760px; right: -340px; bottom: -280px; border-color: rgba(128, 199, 173, 0.09); }

.login-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  padding: 40px 24px;
  background: #fbfcfb;
}

.login-card { width: 372px; max-width: 100%; }
.login-card h2 { font-size: 27px; font-weight: 600; letter-spacing: 1px; }
.login-sub { font-size: 13px; color: var(--muted); margin: 9px 0 30px; }

.field { display: block; }
.field + .field,
.field + .form-row,
.form-row + .field { margin-top: 16px; }
.field > span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
  letter-spacing: 0.4px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 11px;
  transition: border-color 0.16s, box-shadow 0.16s;
}
.field input, .field select { height: 46px; padding: 0 14px; }
.field textarea { padding: 12px 14px; line-height: 1.85; min-height: 210px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #b3bdb8; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: #67b79b;
  box-shadow: 0 0 0 4px rgba(14, 122, 92, 0.09);
}

.form-error {
  min-height: 20px;
  font-size: 12.5px;
  color: var(--red);
  margin: 10px 0 2px;
}

.btn {
  height: 40px;
  padding: 0 17px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.16s, border-color 0.16s, transform 0.06s;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; }
.btn.primary {
  background: var(--green);
  color: #fff;
  box-shadow: 0 1px 2px rgba(14, 122, 92, 0.25);
}
.btn.primary:hover { background: var(--green-dark); }
.btn.primary:disabled { opacity: 0.6; cursor: default; }
.btn.ghost { background: #fff; border: 1px solid var(--line); color: var(--ink-2); }
.btn.ghost:hover { background: #f7faf8; border-color: #d3ded9; }
.btn.danger-ghost { background: #fff; border: 1px solid #f0d6d3; color: var(--red); }
.btn.danger-ghost:hover { background: #fdf4f3; }
.btn.danger { background: var(--red); color: #fff; }
.btn.danger:hover { background: #9c3129; }
.btn.block { width: 100%; height: 46px; font-size: 14px; }
.btn.small { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 8px; }

.login-note { margin-top: 18px; text-align: center; font-size: 11.5px; color: var(--faint); }
.login-copy { font-size: 11px; color: #b4beba; letter-spacing: 0.4px; }
.mobile-only { display: none; }

/* ==================================================================
   应用骨架
   ================================================================== */

.app { display: flex; min-height: 100dvh; }

.sidebar {
  width: 254px;
  flex: 0 0 254px;
  height: 100dvh;
  position: sticky;
  top: 0;
  background: var(--green-deep);
  color: rgba(255, 255, 255, 0.72);
  padding: 22px 14px 16px;
  display: flex;
  flex-direction: column;
  z-index: 30;
}

.side-head { display: flex; align-items: center; gap: 11px; padding: 2px 8px 26px; }
.side-name { font-size: 15px; font-weight: 600; color: #fff; letter-spacing: 2.5px; }
.side-sub { font-size: 10.5px; color: rgba(255, 255, 255, 0.4); margin-top: 2px; letter-spacing: 0.6px; }

.side-nav { display: flex; flex-direction: column; gap: 4px; }

.nav-item {
  position: relative;
  height: 44px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.62);
  text-align: left;
  transition: background 0.16s, color 0.16s;
}
.nav-item svg { width: 19px; height: 19px; opacity: 0.9; }
.nav-item span { flex: 1; }
.nav-item em {
  font-style: normal;
  font-size: 10.5px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
}
.nav-item:hover { background: rgba(255, 255, 255, 0.055); color: rgba(255, 255, 255, 0.9); }
.nav-item.active { background: rgba(255, 255, 255, 0.1); color: #fff; font-weight: 500; }
.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 3px;
  background: #58b596;
}

.side-tip {
  margin-top: 24px;
  padding: 0 12px;
  font-size: 11px;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.3);
}

.side-user {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
}
.side-user-meta { flex: 1; min-width: 0; }
.side-user-name {
  font-size: 12.5px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.side-user-role { font-size: 10.5px; color: rgba(255, 255, 255, 0.38); margin-top: 1px; }

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 600;
  background: linear-gradient(135deg, #d9ede4, #bfe0d2);
  color: #17523f;
  user-select: none;
}

.icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--faint);
  transition: background 0.15s, color 0.15s;
}
.icon-btn:hover { background: #f1f5f3; color: var(--ink-2); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn.on-dark { color: rgba(255, 255, 255, 0.45); }
.icon-btn.on-dark:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

.workspace {
  flex: 1;
  min-width: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(260px, 420px) auto;
  align-items: center;
  gap: 18px;
  padding: 24px 32px 14px;
  background: var(--bg);
  z-index: 10;
}
.topbar-title h1 { font-size: 22px; font-weight: 600; letter-spacing: 0.5px; }
.topbar-title p { font-size: 12px; color: var(--muted); margin-top: 3px; }

.searchbox {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color 0.16s, box-shadow 0.16s;
}
.searchbox:focus-within { border-color: #67b79b; box-shadow: 0 0 0 4px rgba(14, 122, 92, 0.08); }
.search-icon { width: 18px; height: 18px; color: var(--faint); }
.searchbox input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: none;
  font-size: 13.5px;
}
.searchbox input::placeholder { color: #a9b5b0; }
.searchbox input::-webkit-search-cancel-button { display: none; }
.search-clear {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #9aa8a2;
  background: #f0f4f2;
}
.search-clear:hover { background: #e5ebe8; color: var(--ink-2); }
.search-clear svg { width: 13px; height: 13px; }

.topbar-actions { display: flex; align-items: center; gap: 10px; }
.add-btn { height: 42px; }
.top-avatar { display: none; border: 0; cursor: pointer; }

.content {
  flex: 1;
  overflow-y: auto;
  padding: 4px 32px 48px;
  outline: none;
}

/* ==================================================================
   列表 / 卡片
   ================================================================== */

.banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 15px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: #fff8ea;
  border: 1px solid #f2e2c2;
  color: #8a5a12;
  font-size: 12.5px;
}
.banner svg { width: 17px; height: 17px; }
.banner .banner-link {
  margin-left: auto;
  color: #8a5a12;
  font-weight: 600;
  font-size: 12.5px;
  white-space: nowrap;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 0 16px;
}
.tags-row {
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0;
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 16px), transparent 100%);
  mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 16px), transparent 100%);
}
.tags-row::-webkit-scrollbar { display: none; }

.chip {
  height: 32px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 12.5px;
  white-space: nowrap;
  transition: all 0.15s;
}
.chip:hover { border-color: #bcd2c8; color: var(--ink-2); }
.chip.active { background: var(--green-deep); border-color: var(--green-deep); color: #fff; }
.chip em { font-style: normal; opacity: 0.55; margin-left: 3px; font-size: 11px; }

.result-count { flex: none; font-size: 12px; color: var(--faint); white-space: nowrap; }
.search-summary {
  margin: 2px 0 16px;
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-height: 196px;
  padding: 17px 17px 13px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.card:hover {
  transform: translateY(-2px);
  border-color: #d2ded8;
  box-shadow: var(--shadow);
}

.card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.cat-chip {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  background: #f0f3f2;
  color: #5c6b65;
  white-space: nowrap;
}
.cat-0 { background: #eaf2ff; color: #2f5fa8; }
.cat-1 { background: #e9f5ee; color: #1b7148; }
.cat-2 { background: #fff3e4; color: #a2621b; }
.cat-3 { background: #fdecea; color: #b23b32; }
.cat-4 { background: #e8f4f2; color: #177168; }
.cat-5 { background: #f0eefa; color: #5a4ba8; }
.cat-6 { background: #f0f3f2; color: #5c6b65; }

.fav-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #c6d0cb;
  transition: background 0.15s, color 0.15s;
}
.fav-btn svg { width: 17px; height: 17px; fill: none; transition: fill 0.15s; }
.fav-btn:hover { background: #faf6ea; color: #d9a02f; }
.fav-btn.active { color: #e8a92c; }
.fav-btn.active svg { fill: #f2bc4b; stroke: #e8a92c; }

.card h3 {
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.55;
  letter-spacing: 0.1px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card .preview {
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: pre-line;
}

.card .tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 1px; }
.tag {
  font-size: 10.5px;
  color: #7c8a84;
  background: #f3f6f4;
  border-radius: 5px;
  padding: 2px 7px;
}

.card-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 9px;
  border-top: 1px dashed var(--line);
  font-size: 11px;
  color: var(--faint);
}
.card-foot .dot { width: 3px; height: 3px; border-radius: 50%; background: #ccd6d1; }
.copy-mini {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 9px;
  border-radius: 7px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 11.5px;
  font-weight: 500;
  transition: background 0.15s;
}
.copy-mini:hover { background: #d8ece3; }
.copy-mini svg { width: 13px; height: 13px; }
.copy-mini.done { background: #dff2e8; color: #0a6a4f; }

mark {
  background: #fff0b3;
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
}

/* 空态 / 骨架 */
.empty { text-align: center; padding: 72px 20px; }
.empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--line);
  color: #9fb3aa;
}
.empty-icon svg { width: 24px; height: 24px; }
.empty h3 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.empty p { font-size: 12.5px; color: var(--faint); }

.sk-card {
  height: 196px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  padding: 18px;
  overflow: hidden;
  position: relative;
}
.sk-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.75), transparent);
  transform: translateX(-100%);
  animation: shimmer 1.3s infinite;
}
.sk-line { height: 11px; border-radius: 6px; background: #eef2f0; margin-bottom: 11px; }
.sk-line.w40 { width: 40%; }
.sk-line.w70 { width: 70%; }
.sk-line.w90 { width: 90%; }
.sk-line.w55 { width: 55%; }
@keyframes shimmer { to { transform: translateX(100%); } }

/* ==================================================================
   详情抽屉
   ================================================================== */

.layer { position: fixed; inset: 0; z-index: 60; }
.backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 26, 21, 0.42);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.22s;
}
.layer.open .backdrop { opacity: 1; }

.sheet {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(560px, 100%);
  background: #fff;
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1);
  display: flex;
  flex-direction: column;
}
.layer.open .sheet { transform: none; }

.sheet-content { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.sheet-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px 0;
}
.sheet-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 26px 24px;
}
.sheet-body h2 { font-size: 22px; line-height: 1.5; font-weight: 600; margin: 10px 0 10px; }
.detail-meta { font-size: 11.5px; color: var(--faint); display: flex; flex-wrap: wrap; gap: 6px 10px; }
.detail-meta span { display: inline-flex; align-items: center; gap: 4px; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 4px; }
.detail-content {
  margin-top: 16px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  font-size: 14px;
  line-height: 1.95;
  color: var(--ink-2);
  white-space: pre-wrap;
  word-break: break-word;
}
.sheet-actions {
  display: flex;
  gap: 9px;
  padding: 14px 24px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}
.sheet-actions .btn { flex: 1; height: 44px; }
.sheet-actions .icon-action { flex: 0 0 44px; padding: 0; }
.sheet-actions .icon-action svg { width: 18px; height: 18px; }
.sheet-actions .fav-on { color: #d99a1f; border-color: #f0e0b8; background: #fffaf0; }

/* ==================================================================
   弹窗 / 表单
   ================================================================== */

.modal {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(560px, calc(100vw - 32px));
  max-height: min(88vh, 820px);
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translate(-50%, -47%) scale(0.985);
  transition: opacity 0.2s, transform 0.2s;
}
.layer.open .modal { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line-soft);
}
.modal-head h2 { font-size: 17px; font-weight: 600; }
.modal-body { padding: 20px 22px 22px; overflow-y: auto; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row .field + .field { margin-top: 0; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.form-hint { font-size: 11px; color: var(--faint); margin-top: 6px; line-height: 1.7; }
.form-error.inline { margin: 0 0 8px; text-align: left; }

.confirm-text { font-size: 13.5px; line-height: 1.85; color: var(--ink-2); }
.install-steps-list { margin: 12px 0 0; padding-left: 20px; font-size: 13px; line-height: 2; color: var(--ink-2); }
.install-steps-list li::marker { color: var(--green); font-weight: 600; }
.confirm-text strong { color: var(--ink); }

/* ==================================================================
   Toast
   ================================================================== */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(12px);
  background: #10231d;
  color: #fff;
  font-size: 12.5px;
  padding: 10px 18px;
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(8, 26, 21, 0.28);
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 120;
  pointer-events: none;
  max-width: calc(100vw - 40px);
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ==================================================================
   账号管理
   ================================================================== */

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 14px 16px;
}
.stat-card .stat-label { font-size: 11.5px; color: var(--faint); }
.stat-card .stat-value { font-size: 23px; font-weight: 600; margin-top: 4px; letter-spacing: 0.5px; }
.stat-card .stat-value small { font-size: 11px; color: var(--faint); font-weight: 400; margin-left: 4px; }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.section-head h2 { font-size: 16px; font-weight: 600; }
.section-head .sub { font-size: 12px; color: var(--faint); margin-top: 2px; }

.user-table { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.user-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.25fr) minmax(230px, 1.9fr) auto;
  align-items: center;
  gap: 14px;
  padding: 13px 18px;
  border-top: 1px solid var(--line-soft);
}
.user-row.head {
  border-top: 0;
  background: #f8faf9;
  padding: 10px 18px;
  font-size: 11px;
  color: var(--faint);
  letter-spacing: 0.5px;
}
.user-row.head span:nth-child(2) { padding-left: 2px; }

.user-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.user-identity .avatar { width: 34px; height: 34px; font-size: 12px; }
.user-identity .u-name { font-size: 13.5px; font-weight: 500; color: var(--ink); }
.user-identity .u-account { font-size: 11.5px; color: var(--faint); }
.user-identity .you {
  font-size: 10px;
  color: var(--green);
  background: var(--green-soft);
  border-radius: 4px;
  padding: 0 5px;
  margin-left: 4px;
}

.user-facts { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 11.5px; color: var(--faint); }
.role-chip { font-size: 10.5px; padding: 2px 8px; border-radius: 999px; background: #f0f3f2; color: #5c6b65; }
.role-chip.admin { background: #eaf1ff; color: #2f5fa8; }
.status-chip { font-size: 10.5px; padding: 2px 8px; border-radius: 999px; background: #e8f4ee; color: #0e7a5c; }
.status-chip.off { background: #f4f5f5; color: #9aa8a2; }

.user-actions { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.mini-btn {
  height: 28px;
  padding: 0 9px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 11.5px;
  white-space: nowrap;
  transition: all 0.15s;
}
.mini-btn:hover { border-color: #c8d6d0; color: var(--ink-2); background: #f8faf9; }
.mini-btn.danger { color: #b0605a; border-color: #f0dedb; }
.mini-btn.danger:hover { background: #fdf5f4; color: var(--red); }

/* ==================================================================
   个人中心
   ================================================================== */

.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 16px;
  align-items: start;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
}
.panel h3 { font-size: 15px; font-weight: 600; }
.panel .panel-sub { font-size: 12px; color: var(--faint); margin-top: 3px; }

.profile-hero { display: flex; align-items: center; gap: 14px; padding-bottom: 18px; border-bottom: 1px solid var(--line-soft); }
.profile-hero .avatar { width: 54px; height: 54px; font-size: 19px; }
.profile-hero .p-name { font-size: 18px; font-weight: 600; }
.profile-hero .p-account { font-size: 12px; color: var(--faint); margin-top: 2px; }
.profile-hero .role-chip { margin-left: auto; }

.pw-form { margin-top: 18px; }
.pw-form .field + .field { margin-top: 13px; }
.pw-form .field input { height: 42px; }

.info-list { margin-top: 14px; }
.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 12.5px;
}
.info-row:last-child { border-bottom: 0; }
.info-row span:first-child { color: var(--faint); }
.info-row span:last-child { color: var(--ink-2); text-align: right; }

.danger-zone { margin-top: 16px; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.danger-zone p { font-size: 11.5px; color: var(--faint); }

/* ==================================================================
   移动端
   ================================================================== */

.tabbar { display: none; }
.install-bar { display: none; }

@media (max-width: 1024px) {
  .login { grid-template-columns: 1fr; min-height: 100dvh; }
  .login-brand { padding: 30px 24px 34px; }
  .brand-copy { padding: 26px 0 0; margin: 0; }
  .login-brand-visual { margin: 20px 0 0; justify-content: center; }
  .login-brand-visual img { width: 122px; border-radius: 22px; }
  .login-card { width: 100%; max-width: 372px; }
  .brand-copy h1 { font-size: 30px; line-height: 1.38; margin-bottom: 14px; }
  .brand-copy .lede { font-size: 13px; line-height: 1.8; max-width: 520px; }
  .brand-points { display: none; }
  .brand-foot { display: none; }
  .brand-ring.r1 { width: 300px; height: 300px; right: -140px; bottom: -110px; }
  .brand-ring.r2 { display: none; }
  .login-panel { justify-content: flex-start; padding: 30px 20px 44px; }
  .login-copy { margin-top: 8px; }

  .app { display: block; }
  .sidebar { display: none; }
  .workspace { height: auto; min-height: 100dvh; overflow: visible; }

  .topbar {
    position: sticky;
    top: 0;
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: calc(12px + env(safe-area-inset-top)) 16px 10px;
    background: rgba(244, 247, 245, 0.93);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(227, 234, 230, 0.7);
  }
  .topbar-title h1 { font-size: 19px; }
  .topbar-title p { font-size: 11px; }
  .searchbox { grid-column: 1 / -1; grid-row: 2; height: 42px; }
  .add-btn {
    display: inline-flex;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 50%;
  }
  .add-btn span { display: none; }
  .add-btn svg { width: 18px; height: 18px; }
  .top-avatar {
    display: grid;
    width: 34px;
    height: 34px;
    border: 0;
    font-size: 12px;
    cursor: pointer;
  }

  .content { padding: 12px 16px calc(104px + env(safe-area-inset-bottom)); overflow: visible; }
  .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .result-head { margin-bottom: 13px; }

  .install-bar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(72px + env(safe-area-inset-bottom));
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 14px;
    background: #0b2b23;
    color: #fff;
    box-shadow: 0 14px 34px rgba(8, 26, 21, 0.3);
  }
  .install-bar[hidden] { display: none !important; }
  .install-bar-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
  .install-bar-text strong { font-size: 12.5px; font-weight: 600; }
  .install-bar-text span { font-size: 10.5px; color: rgba(255, 255, 255, 0.56); }
  .install-bar .btn {
    height: 32px;
    padding: 0 13px;
    border-radius: 8px;
    background: #58b596;
    color: #06251c;
    font-size: 12px;
    font-weight: 600;
    flex: none;
    box-shadow: none;
  }
  .install-close {
    width: 26px;
    height: 26px;
    flex: none;
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.5);
    font-size: 18px;
    line-height: 1;
    display: grid;
    place-items: center;
  }
  .install-close:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
  body.has-install-bar .content { padding-bottom: calc(176px + env(safe-area-inset-bottom)); }

  .tabbar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    padding: 7px 6px calc(7px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
  }
  .tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 3px 0;
    font-size: 10.5px;
    color: #9aa8a2;
    transition: color 0.15s;
  }
  .tab svg { width: 21px; height: 21px; }
  .tab.active { color: var(--green); font-weight: 500; }

  .toast { bottom: calc(82px + env(safe-area-inset-bottom)); }

  .sheet {
    width: 100%;
    transform: translateY(100%);
    border-radius: 18px 18px 0 0;
  }
  .layer.open .sheet { transform: none; }
  .sheet-body { padding: 12px 20px 20px; }
  .sheet-body h2 { font-size: 20px; }
  .sheet-actions { padding: 12px 18px calc(14px + env(safe-area-inset-bottom)); }
  .sheet-actions .btn { height: 46px; }

  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .profile-grid { grid-template-columns: 1fr; }

  .user-row {
    grid-template-columns: 1fr auto;
    gap: 8px 12px;
    padding: 13px 14px;
  }
  .user-row.head { display: none; }
  .user-facts { grid-column: 1 / -1; grid-row: 2; gap: 8px; }
  .user-actions { grid-row: 1; grid-column: 2; }
  .user-actions .mini-btn { padding: 0 8px; }
}

@media (max-width: 640px) {
  .brand-lockup .brand-word { font-size: 15px; letter-spacing: 4px; }
  .brand-mark { width: 40px; height: 40px; }
  .brand-copy h1 { font-size: 26px; margin-top: 4px; }
  .brand-copy .lede { font-size: 12.5px; }
  .login-card h2 { font-size: 23px; }
  .login-sub { margin-bottom: 24px; }
  .login-panel { padding: 26px 18px 40px; }

  .content { padding-left: 14px; padding-right: 14px; }
  .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .card {
    padding: 9px 8px 7px;
    min-height: 0;
    aspect-ratio: 1 / 1;
    gap: 5px;
    border-radius: 11px;
  }
  .card h3 { font-size: 11px; line-height: 1.45; -webkit-line-clamp: 3; }
  .card .preview, .card .tags, .card .card-foot { display: none; }
  .card .cat-chip { height: 18px; padding: 0 6px; font-size: 8.5px; border-radius: 5px; }
  .card-top { gap: 3px; }

  .result-head { flex-direction: column; align-items: stretch; gap: 8px; }
  .result-count { display: none; }

  .modal {
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    width: 100%;
    max-height: 92dvh;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
  }
  .layer.open .modal { transform: none; }
  .modal-body { padding: 18px 18px calc(20px + env(safe-area-inset-bottom)); }
  .modal-head { padding: 16px 18px; }

  .form-row { grid-template-columns: 1fr; gap: 13px; }
  .form-row .field + .field { margin-top: 0; }

  .stats-row { gap: 9px; }
  .stat-card { padding: 12px 13px; }
  .stat-card .stat-value { font-size: 20px; }

  .panel { padding: 18px; }
  .user-actions { flex-wrap: wrap; justify-content: flex-end; }

  .section-head { flex-direction: column; align-items: stretch; gap: 10px; }
  .section-head .btn { width: 100%; height: 42px; }
}

/* 打印不需要 */
@media print {
  .sidebar, .topbar, .tabbar, .sheet, .layer { display: none !important; }
}

/* 管理入口按角色隐藏 */
body:not(.is-admin) .admin-only { display: none !important; }


/* ==================================================================
   启动海报 / 点击动画
   ================================================================== */

.app-splash {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  transition: opacity 0.38s ease, visibility 0.38s ease;
}
.app-splash img {
  width: min(92vw, 560px);
  height: auto;
  display: block;
  border-radius: 0;
  background: transparent;
  animation: splash-poster-in 0.72s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
@keyframes splash-poster-in {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}
.app-splash.hide { opacity: 0; visibility: hidden; }
.app-splash[hidden] { display: none !important; }
body.splash-open { overflow: hidden; }

.content.view-enter { animation: view-in 0.3s cubic-bezier(0.22, 0.61, 0.36, 1); }
@keyframes view-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: none; }
}

.btn,
.chip,
.card,
.nav-item,
.tab,
.mini-btn,
.copy-mini,
.fav-btn,
.icon-btn,
.search-clear,
.install-close,
.install-bar .btn,
.copy {
  transition: transform 0.15s cubic-bezier(0.22, 0.61, 0.36, 1),
    background 0.16s ease, color 0.16s ease, border-color 0.16s ease, box-shadow 0.18s ease;
}
.btn:active,
.chip:active,
.nav-item:active,
.tab:active,
.mini-btn:active,
.copy-mini:active,
.fav-btn:active,
.icon-btn:active,
.search-clear:active,
.install-close:active,
.install-bar .btn:active,
.copy:active { transform: scale(0.95); }
.card:active { transform: scale(0.985); }

.click-ripple {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  background: radial-gradient(circle, rgba(120, 190, 165, 0.18) 0%, rgba(120, 190, 165, 0) 66%);
  transform: scale(0);
  animation: click-ripple 0.18s ease-out forwards;
}
@keyframes click-ripple {
  0% { transform: scale(0); opacity: 0.95; }
  100% { transform: scale(1); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .click-ripple { display: none; }
}


/* ==================================================================
   分类管理 / 权限配置
   ================================================================== */

.cat-head { margin-top: 4px; }
.cat-add { display: flex; align-items: center; gap: 8px; }
.cat-add input {
  width: 190px;
  height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 12.5px;
  background: #fff;
}
.cat-add input:focus { border-color: #67b79b; box-shadow: 0 0 0 3px rgba(14, 122, 92, 0.08); }

.cat-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.cat-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 8px 6px 11px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.cat-name { font-size: 12.5px; color: var(--ink); }
.cat-name em { font-style: normal; font-size: 10.5px; color: var(--faint); margin-left: 4px; }
.cat-actions { display: flex; gap: 3px; }
.cat-actions .mini-btn { height: 25px; padding: 0 7px; font-size: 10.5px; }
.cat-empty { font-size: 12px; color: var(--faint); padding: 4px 0; }

.perm-box {
  margin-top: 16px;
  padding: 12px 14px;
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 11px;
}
.perm-title { font-size: 12px; color: var(--muted); margin-bottom: 9px; }
.perm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 12px; font-size: 12.5px; }
.perm-grid label { display: flex; align-items: center; gap: 7px; cursor: pointer; }
.perm-grid input { width: 15px; height: 15px; accent-color: var(--green); }
.perm-summary { color: #7c8a84; font-size: 10.5px; }

.content.is-refreshing {
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 0.12s ease;
}

@media (max-width: 640px) {
  .cat-head { align-items: stretch; }
  .cat-add { width: 100%; }
  .cat-add input { flex: 1; width: auto; }
  .cat-add .btn { width: auto; }
  .perm-grid { grid-template-columns: 1fr; }
}


/* 登录页入场动画 */
.login-brand .brand-lockup { animation: login-fade 0.55s ease both; }
.login-brand-visual { animation: login-pop 0.8s cubic-bezier(0.2, 0.7, 0.3, 1) both; }
.login-brand-visual img { animation: login-float 6s 1.2s ease-in-out infinite; }
.login-card { animation: login-card-in 0.68s 0.08s cubic-bezier(0.22, 0.61, 0.36, 1) both; }
.login-copy { animation: login-fade 0.6s 0.35s ease both; }

@keyframes login-fade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@keyframes login-pop {
  from { opacity: 0; transform: translateY(16px) scale(0.94); }
  to { opacity: 1; transform: none; }
}
@keyframes login-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
@keyframes login-card-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}


/* 数据备份 */
.backup-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.backup-path { max-width: 200px; overflow-wrap: anywhere; font-size: 11px; line-height: 1.5; }
@media (max-width: 640px) {
  .backup-path { max-width: 150px; }
}


/* 手机触控尺寸 */
@media (max-width: 640px) {
  .cat-actions .mini-btn { height: 32px; padding: 0 9px; font-size: 11px; }
  .cat-item { flex-wrap: wrap; row-gap: 4px; }
  .user-actions .mini-btn { height: 32px; padding: 0 9px; }
  .fav-btn { width: 34px; height: 34px; }
  .copy-mini { height: 30px; padding: 0 10px; }
  .sheet-actions .icon-action { min-width: 46px; }
}


/* 多端下载 */
.dl-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.dl-head h2 { font-size: 20px; margin: 0 0 5px; }
.dl-head p { font-size: 12px; color: var(--muted); margin: 0; line-height: 1.7; }
.dl-version { flex: none; font-size: 11px; color: var(--green); background: #eaf6f0; border: 1px solid #cfe9dd; border-radius: 999px; padding: 5px 10px; }
.dl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.dl-card { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.dl-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: #eaf6f0; color: var(--green); margin-bottom: 13px; }
.dl-icon svg { width: 22px; height: 22px; }
.dl-icon.mobile { background: #eef4ff; color: #3d6fd8; }
.dl-icon.desktop { background: #fff4e6; color: #b06a12; }
.dl-tag { position: absolute; top: 16px; right: 16px; font-size: 9.5px; color: var(--faint); border: 1px solid var(--line); border-radius: 999px; padding: 3px 7px; }
.dl-card h3 { font-size: 17px; margin: 0 0 6px; }
.dl-card p { font-size: 12px; color: var(--muted); line-height: 1.7; margin: 0 0 12px; }
.dl-url { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10.5px; color: #41645a; background: #f5f9f7; border: 1px solid #e3eee8; border-radius: 8px; padding: 8px 9px; word-break: break-all; margin-bottom: 12px; }
.dl-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.dl-actions .btn { height: 34px; padding: 0 11px; font-size: 11.5px; }
.dl-actions .btn.disabled { opacity: 0.5; pointer-events: none; }
.dl-qr-wrap { display: flex; gap: 8px; margin: 0 0 12px; }
.dl-qr { flex: 1; margin: 0; text-align: center; min-width: 0; }
.dl-qr img { width: 100%; max-width: 128px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.dl-qr figcaption { margin-top: 3px; font-size: 9.5px; color: var(--faint); }
.dl-meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 10.5px; color: var(--faint); margin-bottom: 10px; }
.dl-hint { font-size: 10.5px !important; color: var(--faint) !important; margin: 10px 0 0 !important; }

@media (max-width: 1024px) {
  .dl-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .dl-head { flex-direction: column; align-items: flex-start; }
  .dl-grid { grid-template-columns: 1fr; }
  .dl-actions .btn { flex: 1; justify-content: center; }
  .dl-qr img { max-width: 140px; }
}


.dl-warning {
  margin: 0 0 14px;
  padding: 10px 13px;
  background: #fff8e8;
  border: 1px solid #efd9a8;
  border-radius: 10px;
  color: #855a18;
  font-size: 12px;
  line-height: 1.65;
}
.dl-warning code { font-family: ui-monospace, Consolas, monospace; background: #fff2d6; border-radius: 4px; padding: 1px 4px; }
.dl-url-alt { margin: -6px 0 11px; color: var(--faint); font-size: 10.5px; line-height: 1.5; word-break: break-all; }


/* 公网访问 */
.dl-public {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 16px;
  padding: 14px;
  background: #eef8ff;
  border: 1px solid #c9e5f6;
  border-radius: 14px;
}
.dl-public-qr { flex: none; width: 116px; height: 116px; border: 1px solid #c9e5f6; border-radius: 10px; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.dl-public-qr img, .dl-public-qr canvas { width: 108px !important; height: 108px !important; }
.dl-public-main { flex: 1; min-width: 0; }
.dl-public-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 5px; }
.dl-public-head strong { font-size: 14px; color: #14527a; }
.dl-public-head span { font-size: 10.5px; color: #6d93a9; }
.dl-public-url {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 11px;
  color: #1c5e86;
  background: #fff;
  border: 1px solid #d4e9f5;
  border-radius: 7px;
  padding: 7px 9px;
  margin-bottom: 8px;
  word-break: break-all;
}
.dl-public .dl-actions { margin-top: 0; }

@media (max-width: 640px) {
  .dl-public { flex-direction: column; align-items: flex-start; }
  .dl-public-qr { width: 104px; height: 104px; }
  .dl-public-main { width: 100%; }
}


/* 登录按钮加载态 */
.btn:disabled { opacity: 0.55; pointer-events: none; cursor: default; }


/* 登录方式切换 */
.login-tabs {
  display: flex;
  gap: 3px;
  padding: 3px;
  margin: 4px 0 16px;
  background: #eef4f1;
  border-radius: 10px;
}
.login-tab {
  flex: 1;
  height: 34px;
  border-radius: 8px;
  font-size: 12px;
  color: var(--muted);
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.login-tab.active {
  background: #fff;
  color: var(--green);
  box-shadow: 0 1px 3px rgba(20, 60, 48, 0.1);
}
.code-row { display: flex; gap: 8px; align-items: stretch; }
.code-row input { flex: 1; min-width: 0; }
.code-row .btn { flex: none; height: 44px; padding: 0 11px; font-size: 11.5px; }


.head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 640px) {
  .head-actions { width: 100%; }
  .head-actions .btn { flex: 1; }
}


/* 扫码登录 */
.scan-login-box { text-align: center; padding: 4px 0 2px; }
.scan-qr, .scan-login-box img {
  width: 180px;
  height: 180px;
  padding: 8px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 0 28px rgba(34, 230, 176, 0.12);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.scan-qr img, .scan-qr canvas { width: 174px !important; height: 174px !important; display: block; }
.scan-login-box p { margin: 10px 0 12px; font-size: 11.5px; color: var(--muted); }
.scan-login-box .btn { height: 34px; padding: 0 14px; font-size: 11.5px; }
.login-tabs .login-tab { font-size: 11px; }




/* ==================================================================
   ColorOS 17 · 流体轻玻璃主题
   ================================================================== */

:root {
  --ink: #1c2520;
  --ink-2: #48534d;
  --muted: #7a867f;
  --faint: #a0aba4;
  --line: rgba(35, 58, 47, 0.09);
  --line-soft: rgba(35, 58, 47, 0.055);
  --bg: #f3f7f4;
  --card: #ffffff;
  --green: #15a76f;
  --green-dark: #0b8a59;
  --green-deep: #0c3a2b;
  --green-soft: #e8f7ef;
  --amber: #a66a16;
  --red: #d04a45;
  --radius: 24px;
  --shadow: 0 2px 8px rgba(24, 61, 43, 0.045), 0 18px 44px rgba(24, 61, 43, 0.075);
  --shadow-lg: 0 30px 90px rgba(20, 55, 40, 0.18);
}

html { background: #f3f7f4; }

body {
  background:
    radial-gradient(900px 540px at 6% -8%, rgba(124, 234, 189, 0.28), transparent 62%),
    radial-gradient(820px 520px at 104% 2%, rgba(132, 190, 255, 0.22), transparent 60%),
    radial-gradient(720px 500px at 50% 110%, rgba(189, 231, 255, 0.25), transparent 65%),
    #f3f7f4;
  background-attachment: fixed;
  color: var(--ink);
  font-family: "OPPO Sans", "HarmonyOS Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  letter-spacing: 0.1px;
}

::selection { background: #bff1da; color: #0b3a2a; }

/* 滚动状态 */
.content::-webkit-scrollbar-thumb,
.sheet-body::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb { background: rgba(67, 94, 80, 0.18); }

/* ---------- 登录 ---------- */
.login {
  background:
    radial-gradient(700px 520px at 12% 8%, rgba(184, 246, 218, 0.68), transparent 62%),
    radial-gradient(760px 560px at 96% 96%, rgba(190, 222, 255, 0.65), transparent 62%),
    #f4f9f6;
}

.login-brand {
  position: relative;
  overflow: hidden;
  padding: 44px 56px;
  color: var(--ink);
  background:
    radial-gradient(800px 560px at 6% 0%, rgba(152, 242, 203, 0.44), transparent 60%),
    radial-gradient(720px 520px at 92% 90%, rgba(172, 212, 255, 0.42), transparent 62%),
    linear-gradient(155deg, #f9fdfb 0%, #eef8f3 58%, #eef6ff 100%);
  border-right: 1px solid rgba(35, 72, 55, 0.06);
}

.login-brand::before {
  content: "";
  position: absolute;
  width: 560px;
  height: 560px;
  left: -190px;
  bottom: -230px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(57, 211, 153, 0.24), transparent 66%);
  filter: blur(8px);
  pointer-events: none;
}
.login-brand::after {
  content: "";
  position: absolute;
  width: 460px;
  height: 460px;
  right: -180px;
  top: -160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(120, 180, 255, 0.26), transparent 68%);
  filter: blur(10px);
  pointer-events: none;
}

.brand-lockup { position: relative; z-index: 2; }
.brand-mark { background: rgba(255,255,255,.9); border-radius: 18px; box-shadow: 0 8px 28px rgba(30, 90, 64, .12); }
.brand-word { color: #173b2d; letter-spacing: 4px; font-weight: 650; }

.login-brand-visual {
  position: relative;
  z-index: 2;
  margin: auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-brand .brand-ring { border-color: rgba(45, 115, 86, 0.12); }

.engineer-scene {
  display: block;
  stroke: none;
  width: min(560px, 96%);
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 30px 54px rgba(22, 76, 52, 0.20));
  border-radius: 30px;
}
.login-brand-visual { width: 100%; }

.login-panel {
  background: rgba(255, 255, 255, 0.34);
  backdrop-filter: blur(12px);
}

.login-card {
  width: 392px;
  max-width: 100%;
  padding: 34px 34px 30px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 32px;
  box-shadow: 0 26px 70px rgba(29, 76, 54, 0.12), inset 0 1px 0 rgba(255,255,255,.9);
  backdrop-filter: blur(28px) saturate(1.2);
}
.login-card h2 { color: #172a20; font-size: 30px; letter-spacing: 0.5px; font-weight: 650; }
.login-sub { color: #7b8a82; margin: 8px 0 24px; font-size: 13px; }

.login-tabs {
  background: rgba(235, 242, 238, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  padding: 4px;
  gap: 4px;
}
.login-tab {
  height: 40px;
  border-radius: 12px;
  color: #79877f;
  font-size: 13px;
  transition: all .22s cubic-bezier(.2,.8,.2,1);
}
.login-tab.active {
  background: #fff;
  color: var(--green-dark);
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(28, 84, 58, 0.12);
}

.field > span { color: #6f7f76; font-size: 12px; margin-bottom: 8px; letter-spacing: .2px; }
.field input, .field select, .field textarea {
  background: rgba(244, 248, 245, 0.94);
  border: 1px solid rgba(39, 70, 54, 0.07);
  border-radius: 15px;
  color: var(--ink);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field input, .field select { height: 48px; padding: 0 15px; }
.field input::placeholder, .field textarea::placeholder { color: #a9b5ae; }
.field input:focus, .field select:focus, .field textarea:focus {
  background: #fff;
  border-color: rgba(21, 167, 111, 0.5);
  box-shadow: 0 0 0 4px rgba(21, 167, 111, 0.11);
}

.btn {
  border-radius: 14px;
  height: 42px;
  font-size: 13.5px;
}
.btn.primary {
  background: linear-gradient(135deg, #1cc487, #0e9a65);
  color: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 26px rgba(15, 154, 101, 0.24);
}
.btn.primary:hover { background: linear-gradient(135deg, #28d497, #11a96f); }
.btn.ghost { background: rgba(255,255,255,.78); border: 1px solid rgba(36, 68, 52, .10); color: #3c4c43; }
.btn.ghost:hover { background: #fff; border-color: rgba(21,167,111,.3); color: var(--green-dark); }
.btn.block { height: 50px; border-radius: 18px; font-size: 14.5px; }
.btn.danger { background: linear-gradient(135deg,#e5655f,#cf4540); }

.login-forgot {
  display: block;
  margin: 15px auto 0;
  padding: 4px 7px;
  border: 0;
  background: none;
  color: #5f8e7a;
  font-size: 12.5px;
  cursor: pointer;
}
.login-forgot:hover { color: var(--green-dark); text-decoration: underline; }
.login-note, .login-copy { color: #89958e; }
.login-note { margin-top: 16px; }
.login-copy { color: #a0aaa4; }
.code-row .btn { height: 48px; border-radius: 14px; background: #eff7f2; border-color: transparent; color: #2f8c69; }
.code-row .btn:hover { background: #e2f4ea; }
.login-card[hidden], #loginResetCard[hidden] { display: none !important; }

/* ---------- 网页启动动画 ---------- */
.app-splash {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(760px 560px at 16% 10%, rgba(174, 244, 211, 0.72), transparent 64%),
    radial-gradient(800px 560px at 92% 90%, rgba(183, 219, 255, 0.66), transparent 64%),
    #f5faf7;
  transition: opacity .42s ease, visibility .42s ease;
}
.app-splash::before {
  content: "";
  position: absolute;
  width: 54vw;
  height: 54vw;
  left: -18vw;
  bottom: -22vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(53, 209, 151, .3), transparent 68%);
  animation: cos-float 5s ease-in-out infinite;
}
.app-splash::after {
  content: "";
  position: absolute;
  width: 46vw;
  height: 46vw;
  right: -16vw;
  top: -18vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(125, 180, 255, .28), transparent 70%);
  animation: cos-float 6s ease-in-out infinite reverse;
}
.app-splash img {
  position: relative;
  z-index: 1;
  width: min(92vw, 600px);
  height: auto;
  display: block;
  border-radius: 30px;
  animation: cos-splash-in .8s cubic-bezier(.22,.61,.36,1) both;
  filter: drop-shadow(0 30px 65px rgba(30, 86, 58, 0.15));
}
.app-splash.hide { opacity: 0; visibility: hidden; }
.app-splash.hide img { transform: scale(1.025); }
.app-splash[hidden] { display: none !important; }
body.splash-open { overflow: hidden; }
@keyframes cos-float {
  0%,100% { transform: translate3d(0,0,0) scale(1); }
  50% { transform: translate3d(16px,-18px,0) scale(1.05); }
}
@keyframes cos-splash-in {
  from { opacity: 0; transform: scale(.92) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ---------- 应用外壳 ---------- */
.app { display: flex; min-height: 100dvh; gap: 0; }

.sidebar {
  width: 238px;
  flex: 0 0 238px;
  height: calc(100dvh - 28px);
  position: sticky;
  top: 14px;
  margin: 14px 0 14px 14px;
  padding: 20px 12px 14px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 18px 55px rgba(24, 65, 46, 0.10);
  backdrop-filter: blur(28px) saturate(1.2);
  color: var(--ink);
  z-index: 30;
}
.side-head { padding: 4px 10px 24px; }
.side-name { color: #18392c; letter-spacing: 3px; font-size: 14px; }
.side-sub { color: #8b9991; }
.side-nav { gap: 6px; }
.nav-item {
  height: 48px;
  border-radius: 15px;
  color: #6f7e76;
  font-size: 13.5px;
  padding: 0 13px;
  transition: background .22s, color .22s, transform .18s;
}
.nav-item svg { width: 20px; height: 20px; }
.nav-item:hover { background: rgba(21, 167, 111, 0.07); color: #2e6c53; }
.nav-item.active {
  background: #e5f6ed;
  color: #0d8158;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}
.nav-item.active::before { display: none; }
.nav-item em { background: rgba(21,167,111,.12); color: #238361; }
.side-tip { color: #9aa69f; padding: 0 13px; }
.side-user {
  background: rgba(244, 248, 245, 0.92);
  border: 1px solid rgba(30, 65, 48, .05);
  border-radius: 20px;
  padding: 11px;
}
.side-user-name { color: #20352b; }
.side-user-role { color: #8f9c95; }
.avatar { background: linear-gradient(135deg, #d8f6e6, #b9e7d4); color: #176c4c; }

.workspace { background: transparent; }
.topbar {
  padding: 24px 30px 12px;
  background: transparent;
  grid-template-columns: minmax(150px, 1fr) minmax(280px, 430px) auto;
}
.topbar::after { display: none; }
.topbar-title h1 { color: #172a20; font-size: 26px; letter-spacing: -.3px; }
.topbar-title p { color: #87948d; }
.searchbox {
  height: 48px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 26px rgba(25, 65, 46, .06);
  backdrop-filter: blur(18px);
}
.searchbox:focus-within { border-color: rgba(21,167,111,.45); box-shadow: 0 0 0 4px rgba(21,167,111,.1); }
.searchbox input { font-size: 13.5px; }
.add-btn { border-radius: 16px; height: 46px; }
.content { padding: 8px 30px 54px; }

/* ---------- 卡片 / 九宫格 ---------- */
.card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 24px;
  min-height: 198px;
  padding: 18px 18px 14px;
  box-shadow: 0 2px 5px rgba(27, 62, 45, .035), 0 18px 38px rgba(27, 62, 45, .07);
  backdrop-filter: blur(16px);
}
.card:hover {
  transform: translateY(-4px) scale(1.005);
  border-color: rgba(21, 167, 111, 0.18);
  box-shadow: 0 6px 14px rgba(27, 62, 45, .05), 0 26px 55px rgba(27, 62, 45, .12);
}
.card h3 { color: #1c3026; font-size: 16px; }
.card .preview { color: #7e8b84; }
.cat-chip {
  height: 24px;
  padding: 0 10px;
  border-radius: 9px;
  background: #edf6f1;
  color: #3e7f64;
  font-size: 10.5px;
}
.cat-0 { background: #e8f2ff; color: #3167a5; }
.cat-1 { background: #e7f7ee; color: #287a55; }
.cat-2 { background: #fff3e2; color: #9a641f; }
.cat-3 { background: #ffebe9; color: #b04842; }
.cat-4 { background: #e6f6f3; color: #22776e; }
.cat-5 { background: #efedfb; color: #5e52a0; }
.cat-6 { background: #eef3ef; color: #5c6c63; }
.tag { background: #f2f7f4; color: #71837a; border-radius: 7px; }
.card-foot { border-top-color: rgba(35, 58, 47, .07); color: #96a39c; }
.copy-mini { border-radius: 11px; border: 1px solid rgba(21,167,111,.12); background: #eef8f3; color: #288363; }
.copy-mini:hover { background: #e2f4eb; }
.card h3 mark, .preview mark { color: #0c7f58; background: #c9f1de; border-radius: 4px; }
.chip { border: 1px solid rgba(35,58,47,.08); background: rgba(255,255,255,.8); color: #68776f; border-radius: 14px; height: 34px; }
.chip.active { background: #173d2d; color: #fff; border-color: #173d2d; box-shadow: 0 8px 18px rgba(23,61,45,.18); }
.result-count, .search-summary { color: #8b9991; }
.banner {
  border-radius: 18px;
  background: #fff8e9;
  border: 1px solid #f3e5c8;
  color: #8b601c;
}
.banner-link { color: #9b661b; }

/* ---------- 通用面板 / 表单 ---------- */
.panel {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 28px;
  box-shadow: 0 18px 46px rgba(24, 62, 44, .075);
  backdrop-filter: blur(20px);
}
.panel h3, .section-head h2 { color: #1d3127; }
.panel h3 { font-size: 16px; }
.panel-sub, .form-hint { color: #89968f; }
.profile-grid { gap: 18px; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); }
.profile-hero { background: linear-gradient(135deg, #e7f8ef, #eef6ff); border-radius: 22px; padding: 16px; }
.profile-hero .p-name { color: #1a3227; }
.p-account { color: #7e8e85; }
.role-chip, .role-chip.admin, .status-chip {
  background: #e2f6eb;
  color: #16835a;
  border: 1px solid rgba(21,167,111,.14);
}
.status-chip.off { background: #ffebe9; color: #b94a45; border-color: #f4d4d1; }
.info-list .info-row { border-color: rgba(35,58,47,.065); }
.info-row span:first-child { color: #8c9992; }
.info-row span:last-child { color: #2a3c32; }
.profile-menu-panel { padding: 8px; }
.profile-menu-row { border-radius: 20px; padding: 13px 12px; }
.profile-menu-row:hover { background: #eff8f3; }
.profile-menu-icon { background: #e4f5ec; color: #11865b; border-radius: 13px; width: 42px; height: 42px; }
.profile-menu-text strong { color: #1e3328; }
.profile-menu-text small { color: #8b9891; }
.profile-menu-arrow { color: #9aaba1; }
.phone-bind-box { background: #f2f8f5; border: 1px solid rgba(35,58,47,.06); border-radius: 18px; }
.phone-bind-box p { color: #7f8e86; }
.danger-zone {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #fff5f4;
  border: 1px solid #f6dcda;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.danger-zone p { color: #a75d59; }
.danger-zone .btn { flex: none; }
.user-table { background: rgba(255,255,255,.84); border: 1px solid rgba(255,255,255,.95); border-radius: 24px; box-shadow: var(--shadow); overflow: hidden; }
.user-row { border-color: rgba(35,58,47,.06); }
.user-row:hover { background: #f5faf7; }
.user-row.head { background: #f4f9f6; color: #8a9891; }
.card-menu { background: rgba(255,255,255,.95); border: 1px solid rgba(35,58,47,.08); border-radius: 16px; box-shadow: 0 18px 48px rgba(20,60,40,.16); backdrop-filter: blur(20px); }
.card-menu button { border-radius: 10px; color: #46554c; }
.card-menu button:hover { background: #eef8f3; color: #0d8158; }
.card-menu button.danger { color: #cc4d48; }
.card-menu button.danger:hover { background: #fff0ef; }
.mini-btn, .icon-btn, .copy-mini { border-radius: 11px; background: #f5f9f6; border: 1px solid rgba(35,58,47,.07); color: #65776c; }
.mini-btn:hover, .copy-mini:hover { background: #eaf7f0; border-color: rgba(21,167,111,.25); color: #0d8158; }
.icon-btn { background: transparent; border: 0; }
.icon-btn:hover { background: #eff6f2; }
.fav-btn { color: #b4c0b8; }
.fav-btn.active { color: #e8a92c; }
.top-avatar { background: #e4f5ec; color: #12855b; border: 1px solid rgba(21,167,111,.18); }
.user-actions .mini-btn, .cat-actions .mini-btn { background: #f5f9f6; border-color: rgba(35,58,47,.07); color: #65776c; }
.user-actions .mini-btn.danger { color: #cc4d48; border-color: #f4d6d3; }
.modal, .sheet { background: #fbfdfc; border: 1px solid rgba(255,255,255,.95); border-radius: 28px; box-shadow: 0 30px 100px rgba(20,55,38,.2); }
.modal-head, .sheet-top, .sheet-actions { border-color: rgba(35,58,47,.07); background: rgba(251,253,252,.94); }
.sheet { border-radius: 30px 30px 0 0; }
.backdrop { background: rgba(17, 36, 27, .28); backdrop-filter: blur(10px); }
.sheet-body h2 { color: #172a20; }
.detail-meta { color: #8c9992; }
.detail-content { color: #33483d; line-height: 1.95; }
.empty h3 { color: #2a3e33; }
.empty p { color: #89968f; }
.stat-card { background: rgba(255,255,255,.8); border: 1px solid rgba(255,255,255,.95); border-radius: 22px; box-shadow: var(--shadow); }
.stat-value { color: #173b2c; }
.stat-label { color: #8d9a93; }

/* ---------- 下载 / 其他打开方式 ---------- */
.dl-head h2 { color: #172a20; }
.dl-version { background: #e6f7ef; border: 1px solid rgba(21,167,111,.16); color: #12835a; border-radius: 999px; }
.dl-card { background: rgba(255,255,255,.86); border: 1px solid rgba(255,255,255,.96); border-radius: 26px; box-shadow: 0 16px 42px rgba(24,62,44,.075); }
.dl-icon.web, .dl-icon.mobile, .dl-icon.desktop { background: #e8f7ef; color: #11875c; border-radius: 16px; }
.dl-tag { border: 1px solid rgba(35,58,47,.08); color: #77877d; border-radius: 999px; }
.dl-url, .dl-public-url { background: #f2f8f5; border: 1px solid rgba(35,58,47,.06); color: #2e7d60; border-radius: 12px; }
.dl-url-alt, .dl-meta, .dl-hint { color: #8b9991; }
.dl-warning { background: #fff8e9; border-color: #f2e3c4; color: #8a5d18; border-radius: 16px; }
.dl-public { background: linear-gradient(135deg, #e8f8f0, #eaf2ff); border: 1px solid rgba(255,255,255,.9); border-radius: 26px; box-shadow: var(--shadow); }
.dl-public-head strong { color: #1b4c39; }
.dl-public-head span { color: #6f8d7d; }
.dl-public-qr { border-color: rgba(35,58,47,.08); background: #fff; border-radius: 16px; }
.dl-share { background: linear-gradient(135deg, #e9f8f1, #eef5ff); border: 1px solid rgba(255,255,255,.9); border-radius: 22px; box-shadow: var(--shadow); }
.dl-share strong { color: #174a36; }
.dl-share p { color: #6f8578; }
.dl-back { color: #587c6b; border-radius: 10px; }
.dl-back:hover { color: #0d8158; background: #eaf6ef; }
.dl-grid.single { grid-template-columns: minmax(0, 620px); }

/* ---------- 修改记录 ---------- */
.audit-toolbar input, .audit-toolbar select { background: rgba(255,255,255,.86); border: 1px solid rgba(35,58,47,.08); border-radius: 15px; color: #2e4036; }
.audit-toolbar input:focus, .audit-toolbar select:focus { border-color: rgba(21,167,111,.4); box-shadow: 0 0 0 4px rgba(21,167,111,.08); }
.audit-summary { color: #8a9891; }
.audit-entry { background: rgba(255,255,255,.86); border: 1px solid rgba(255,255,255,.96); border-radius: 22px; box-shadow: 0 12px 32px rgba(24,62,44,.06); }
.audit-entry-head strong { color: #1d3227; }
.audit-action { border: 1px solid rgba(35,58,47,.09); color: #667b70; background: #f5f9f6; }
.audit-action.create { color: #16835a; border-color: #bfe8d4; background: #e9f8f0; }
.audit-action.update { color: #9a6a22; border-color: #f0ddb7; background: #fff7e8; }
.audit-action.delete { color: #b94a45; border-color: #f1d0cd; background: #fff0ef; }
.audit-time, .audit-meta { color: #8b9891; }
.audit-field { color: #84948b; }
.audit-old { color: #c0605b; }
.audit-new { color: #16835a; }
.audit-arrow { color: #9aaba1; }
.audit-diff { background: #f6faf7; border: 1px solid rgba(35,58,47,.07); border-radius: 14px; }
.audit-diff .add { color: #0f8359; background: rgba(21,167,111,.07); }
.audit-diff .del { color: #ba514c; background: rgba(208,74,69,.06); }
.audit-diff .note { color: #85948b; }
.audit-snapshot { border: 1px dashed rgba(35,58,47,.14); border-radius: 14px; color: #6c8175; }
.audit-snapshot span { color: #95a39b; }
.audit-empty-change { color: #95a39b; }

/* ---------- 移动端底栏：流体胶囊 ---------- */
.tabbar {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 40;
  gap: 6px;
  padding: 7px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 50px rgba(20, 60, 40, 0.16);
  backdrop-filter: blur(26px) saturate(1.2);
}
.tabbar::before { display: none; }
.tab {
  flex: 1;
  border-radius: 19px;
  padding: 8px 0 7px;
  color: #7c8d83;
  font-size: 10.5px;
  gap: 3px;
  transition: background .22s, color .22s;
}
.tab svg { width: 21px; height: 21px; }
.tab.active { background: #e4f6ec; color: #0c8258; font-weight: 600; }
.tab.active::after { display: none; }

/* ---------- 登录工程师动画 ---------- */
.engineer-scene .code-scroll { animation: code-scroll 2.6s linear infinite; }
.engineer-scene .hand-left { transform-box: fill-box; transform-origin: center; animation: hand-left .16s steps(2, end) infinite; }
.engineer-scene .hand-right { transform-box: fill-box; transform-origin: center; animation: hand-right .13s steps(2, end) infinite; }
.engineer-scene .head { transform-box: fill-box; transform-origin: center; animation: head-bob 1.5s ease-in-out infinite; }
.engineer-scene .sweat { animation: sweat-fly 1.8s ease-in infinite; }
.engineer-scene .bug-badge { animation: bug-pulse 4s infinite; }
.engineer-scene .fixed-badge { opacity: 0; animation: fixed-flash 4s infinite; }
.engineer-scene .scan-line { animation: scan-line 2.8s linear infinite; }
.engineer-scene .progress-fill { transform-box: fill-box; transform-origin: left; animation: progress-fix 4s ease-in-out infinite; }
.engineer-scene .live-dot { animation: live-pulse 1.2s ease-in-out infinite; }
.engineer-scene .steam { animation: steam 2.4s ease-in-out infinite; }
.engineer-scene .keys rect:nth-child(3n) { animation: key-flash .18s steps(2, end) infinite; }
.engineer-scene .keys rect:nth-child(4n) { animation: key-flash .23s steps(2, end) infinite reverse; }
.engineer-scene .dots { animation: dots-blink 1s steps(2, end) infinite; }
.engineer-scene .spark { animation: spark .24s steps(2, end) infinite; }
.engineer-scene .spark.s2 { animation-delay: .06s; }
.engineer-scene .spark.s3 { animation-delay: .12s; }
.engineer-scene .spark.s4 { animation-delay: .18s; }
@keyframes code-scroll { from { transform: translateY(0); } to { transform: translateY(-140px); } }
@keyframes hand-left { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-4px) rotate(-3deg); } }
@keyframes hand-right { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-4px) rotate(3deg); } }
@keyframes head-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(2px); } }
@keyframes sweat-fly { 0% { opacity: 0; transform: translate(0,0); } 25% { opacity: 1; } 100% { opacity: 0; transform: translate(-8px,14px); } }
@keyframes bug-pulse { 0%,42% { opacity: 1; } 52%,100% { opacity: 0; } }
@keyframes fixed-flash { 0%,48% { opacity: 0; } 56%,92% { opacity: 1; } 100% { opacity: 0; } }
@keyframes scan-line { from { transform: translateY(0); opacity: .15; } 20% { opacity: .8; } to { transform: translateY(126px); opacity: .15; } }
@keyframes progress-fix { 0%,15% { transform: scaleX(.18); } 65%,85% { transform: scaleX(1); } 100% { transform: scaleX(.28); } }
@keyframes live-pulse { 0%,100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes steam { 0% { opacity: 0; transform: translateY(4px); } 40% { opacity: .6; } 100% { opacity: 0; transform: translateY(-12px); } }
@keyframes key-flash { 0%,100% { fill: #1c4a50; } 50% { fill: #58ffd6; } }
@keyframes dots-blink { 0%,49% { opacity: .25; } 50%,100% { opacity: 1; } }
@keyframes spark { 0%,100% { opacity: .15; } 40% { opacity: 1; } }

/* ---------- 动效 ---------- */
.content.view-enter { animation: cos-view-in .34s cubic-bezier(.22,.61,.36,1); }
@keyframes cos-view-in { from { opacity: 0; transform: translateY(10px) scale(.995); } to { opacity: 1; transform: none; } }
.btn, .chip, .card, .nav-item, .tab, .mini-btn, .copy-mini, .fav-btn, .icon-btn, .search-clear, .install-close, .copy {
  transition: transform .18s cubic-bezier(.22,.61,.36,1), background .18s ease, color .18s ease, border-color .18s ease, box-shadow .22s ease;
}
.btn:active, .chip:active, .nav-item:active, .tab:active, .mini-btn:active, .copy-mini:active, .fav-btn:active, .icon-btn:active { transform: scale(.95); }
.card:active { transform: scale(.986); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px) scale(.96); } to { opacity: 1; transform: translate(-50%,0) scale(1); } }
.toast { background: rgba(25, 45, 34, .92); color: #fff; border-radius: 14px; box-shadow: 0 16px 40px rgba(15,40,25,.24); backdrop-filter: blur(16px); }

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  .content { padding-left: 20px; padding-right: 20px; }
  .topbar { padding-left: 20px; padding-right: 20px; }
  .card-grid { gap: 12px; }
  .login-card { width: 370px; padding: 30px 28px 26px; }
}

@media (max-width: 1024px) {
  .sidebar { margin: 12px; width: 226px; flex-basis: 226px; height: calc(100dvh - 24px); top: 12px; }
  .login { background: #f5faf7; }
  .login-brand { padding: 30px 24px 34px; }
  .login-card { width: 100%; max-width: 400px; }
  .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .profile-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  body { background:
    radial-gradient(520px 360px at 0% -6%, rgba(136, 236, 194, .3), transparent 62%),
    radial-gradient(500px 360px at 108% 12%, rgba(155, 199, 255, .24), transparent 62%),
    #f4f8f5;
    background-attachment: fixed;
  }
  .topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    grid-template-columns: 1fr auto;
    padding: calc(14px + env(safe-area-inset-top)) 16px 10px;
    background: rgba(246, 250, 247, .78);
    backdrop-filter: blur(24px) saturate(1.2);
  }
  .topbar-title h1 { font-size: 23px; }
  .topbar-title p { font-size: 11px; }
  .topbar-actions { gap: 8px; }
  .add-btn { height: 42px; border-radius: 14px; }
  .top-avatar { width: 42px; height: 42px; border-radius: 15px; }
  .content { padding: 8px 14px calc(104px + env(safe-area-inset-bottom)); }
  .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .card {
    border-radius: 18px;
    padding: 9px 8px 7px;
    min-height: 0;
    aspect-ratio: 1 / 1;
    gap: 5px;
    background: rgba(255,255,255,.9);
  }
  .card h3 { font-size: 11px; line-height: 1.45; -webkit-line-clamp: 3; color: #20372b; }
  .card .preview, .card .tags, .card .card-foot { display: none; }
  .card .cat-chip { height: 18px; padding: 0 6px; font-size: 8.5px; border-radius: 6px; }
  .card-top { gap: 3px; }
  .result-head { margin: 2px 0 12px; }
  .chip { height: 31px; padding: 0 12px; font-size: 11px; }
  .panel { border-radius: 22px; }
  .profile-menu-panel { padding: 7px; }
  .profile-menu-row { padding: 11px 10px; border-radius: 17px; }
  .profile-menu-icon { width: 40px; height: 40px; border-radius: 12px; }
  .login-brand { padding: 22px 18px 18px; }
  .login-brand-visual { margin: 10px 0 0; }
  .engineer-scene { width: min(232px, 68%); }
  .login-panel { padding: 14px 16px 30px; background: transparent; }
  .login-card { background: rgba(255,255,255,.86); border-radius: 28px; padding: 26px 20px 24px; }
  .login-card h2 { font-size: 24px; }
  .login-tabs { border-radius: 14px; }
  .login-tab { height: 38px; border-radius: 11px; }
  .login-copy { color: #99a49e; }
  .tabbar {
    left: 14px; right: 14px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    border-radius: 24px;
    padding: 6px;
  }
  .tab { border-radius: 18px; padding: 8px 0 7px; }
  .toast { bottom: calc(88px + env(safe-area-inset-bottom)); }
  .sheet { border-radius: 28px 28px 0 0; background: #fbfdfc; }
  .modal { border-radius: 26px; }
  .dl-grid.single { grid-template-columns: 1fr; }
  .audit-toolbar input { flex: 1 1 100%; }
  .app-splash img { width: min(94vw, 540px); border-radius: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .click-ripple { display: none; }
  .app-splash::before, .app-splash::after { animation: none; }
}


/* ---------- 我的：顶部身份卡与逻辑排序 ---------- */
.profile-hero-panel { padding: 18px 20px; margin-bottom: 18px; }
.profile-hero-panel .profile-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  background: linear-gradient(135deg, #e9f9f1 0%, #eef5ff 100%);
  border: 1px solid rgba(255,255,255,.95);
  border-radius: 22px;
  padding: 16px 18px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}
.profile-hero-main { flex: 1 1 180px; min-width: 0; }
.profile-hero-meta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.profile-hero-hint { color: #7c9185; font-size: 11.5px; }
.profile-grid > .profile-security-panel { order: 2; }
.profile-grid > div { order: 1; }
@media (max-width: 640px) {
  .profile-hero-panel { padding: 14px; margin-bottom: 14px; }
  .profile-hero-panel .profile-hero { border-radius: 18px; padding: 14px; }
  .profile-hero-meta { width: 100%; margin-left: 0; justify-content: flex-start; }
}


/* 分享卡片布局 */
.dl-share {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 14px;
  padding: 15px 18px;
}
.dl-share .btn { flex: none; }
@media (max-width: 640px) {
  .dl-share { flex-direction: column; align-items: stretch; gap: 10px; }
  .dl-share .btn { width: 100%; }
}


.perm-preset { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 11px; }
.perm-preset .mini-btn { height: 28px; padding: 0 10px; font-size: 10.5px; }


/* ---------- 头像 ---------- */
.avatar { overflow: hidden; background-size: cover; background-position: center; }
.avatar.has-img { background-size: cover; background-position: center; color: transparent !important; font-size: 0 !important; }
.top-avatar.has-img, .side-user .avatar.has-img { background-size: cover; }
.avatar-edit {
  position: relative;
  flex: none;
  border-radius: 50%;
  padding: 0;
  background: transparent;
  line-height: 0;
  cursor: pointer;
}
.avatar-edit .avatar { width: 58px; height: 58px; font-size: 18px; }
.avatar-edit-badge {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  color: #12845b;
  border: 1px solid rgba(21,167,111,.2);
  box-shadow: 0 4px 12px rgba(24,62,44,.18);
}
.avatar-edit-badge svg { width: 12px; height: 12px; }

/* ---------- 多方案 ---------- */
.variant-count {
  margin-left: auto;
  font-size: 9.5px;
  color: #2b8063;
  background: #e6f7ef;
  border: 1px solid rgba(21,167,111,.14);
  border-radius: 999px;
  padding: 2px 7px;
  white-space: nowrap;
}
.card-top { justify-content: space-between; }
.variant-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 4px;
  margin: 4px 0 12px;
  scrollbar-width: none;
}
.variant-tabs::-webkit-scrollbar { display: none; }
.variant-tab {
  flex: none;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(35,58,47,.08);
  background: rgba(255,255,255,.62);
  color: #64766b;
  font-size: 12px;
  transition: all .2s ease;
}
.variant-tab.active {
  background: #173d2d;
  border-color: #173d2d;
  color: #fff;
  box-shadow: 0 8px 20px rgba(23,61,45,.18);
}
.variant-editor {
  margin-top: 16px;
  padding: 13px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.9);
  background: rgba(246,250,247,.66);
  backdrop-filter: blur(18px);
}
.variant-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}
.variant-editor-head strong { display: block; font-size: 13px; color: #243a2f; }
.variant-editor-head span { display: block; margin-top: 3px; font-size: 10.5px; color: #8a9890; }
.variant-editor-head .mini-btn { flex: none; height: 30px; padding: 0 10px; font-size: 10.5px; }
.variant-rows { display: flex; flex-direction: column; gap: 9px; }
.variant-row {
  padding: 10px;
  border-radius: 15px;
  border: 1px solid rgba(35,58,47,.07);
  background: rgba(255,255,255,.62);
}
.variant-row-head { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.variant-row-head input {
  flex: 1;
  height: 36px;
  min-width: 0;
  border: 1px solid rgba(35,58,47,.08);
  border-radius: 11px;
  background: rgba(255,255,255,.75);
  padding: 0 11px;
  font-size: 12px;
}
.variant-remove { flex: none; height: 30px; padding: 0 9px; font-size: 10.5px; color: #b6514c; border-color: #f0d6d3; }
.variant-row textarea {
  width: 100%;
  min-height: 112px;
  resize: vertical;
  border: 1px solid rgba(35,58,47,.08);
  border-radius: 12px;
  background: rgba(255,255,255,.75);
  padding: 10px 11px;
  font-size: 12.5px;
  line-height: 1.7;
}

/* ---------- 玻璃质感强化 ---------- */
body::before {
  content: "";
  position: fixed;
  inset: -22%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(closest-side at 18% 22%, rgba(53, 222, 161, .28), transparent 100%),
    radial-gradient(closest-side at 84% 12%, rgba(126, 184, 255, .22), transparent 100%),
    radial-gradient(closest-side at 58% 96%, rgba(172, 235, 255, .22), transparent 100%);
  filter: blur(52px);
  opacity: .7;
}
.card,
.panel,
.stat-card,
.dl-card,
.dl-public,
.dl-share,
.user-table,
.searchbox,
.audit-entry,
.profile-hero-panel .profile-hero,
.sidebar,
.tabbar,
.modal,
.sheet {
  backdrop-filter: blur(30px) saturate(1.45);
  -webkit-backdrop-filter: blur(30px) saturate(1.45);
}
.card,
.panel,
.stat-card,
.dl-card,
.audit-entry,
.user-table {
  background-image: linear-gradient(135deg, rgba(255,255,255,.86), rgba(255,255,255,.58));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.9),
    inset 0 -1px 0 rgba(255,255,255,.22),
    0 18px 44px rgba(24,62,44,.08);
}
.card { position: relative; }
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,.38), transparent 34%, transparent 70%, rgba(255,255,255,.16));
  opacity: .7;
}
.card > * { position: relative; z-index: 1; }
.sidebar {
  background: linear-gradient(145deg, rgba(255,255,255,.74), rgba(255,255,255,.48));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 22px 60px rgba(24,65,46,.12);
}
.topbar {
  background: linear-gradient(180deg, rgba(247,251,248,.74), rgba(247,251,248,.42));
  backdrop-filter: blur(24px) saturate(1.3);
}
.searchbox { background: rgba(255,255,255,.58); box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 10px 28px rgba(24,62,44,.06); }
.login-card {
  background: linear-gradient(145deg, rgba(255,255,255,.82), rgba(255,255,255,.56));
  backdrop-filter: blur(36px) saturate(1.35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 30px 80px rgba(29,76,54,.14);
}
.modal, .sheet {
  background: linear-gradient(145deg, rgba(255,255,255,.9), rgba(251,253,252,.72));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 30px 100px rgba(20,55,38,.2);
}
.tabbar { background: linear-gradient(145deg, rgba(255,255,255,.82), rgba(255,255,255,.58)); }
.profile-hero-panel .profile-hero {
  background: linear-gradient(135deg, rgba(228,249,239,.76), rgba(233,243,255,.62));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}
.dl-public { background: linear-gradient(135deg, rgba(231,249,241,.78), rgba(234,242,255,.62)); }
.dl-share { background: linear-gradient(135deg, rgba(233,248,241,.8), rgba(238,245,255,.62)); }


/* ---------- 全局粗体 + 更舒展的间距 ---------- */
body, button, input, select, textarea { font-weight: 600; }
h1, h2, h3, h4, strong, .p-name, .side-name, .brand-word, .card h3, .panel h3,
.stat-value, .dl-head h2, .sheet-body h2 { font-weight: 700; }
.panel-sub, .form-hint, .login-sub, .login-note, .login-copy, .detail-meta,
.card-foot, .result-count, .search-summary, .info-row span:first-child,
.audit-meta, .audit-time, .dl-url-alt, .dl-meta, .dl-hint { font-weight: 500; }
.field > span, .login-tab, .nav-item, .tab, .chip, .btn { font-weight: 600; }
input::placeholder, textarea::placeholder { font-weight: 500; }

.info-list { margin-top: 15px; }
.info-row { padding: 12px 0; }
.info-list .info-row + .info-row { margin-top: 2px; }
.panel { padding: 22px; }
.panel h3 + .panel-sub { margin-top: 5px; }
.profile-grid > div > .panel + .panel { margin-top: 16px; }
.danger-zone { margin-top: 18px; padding: 14px 15px; }
.danger-zone p { font-size: 12px; line-height: 1.6; }
.login-sub { margin-bottom: 24px; }
.login-card .field + .field { margin-top: 18px; }
.login-card .btn.block { margin-top: 22px; }
.login-note { margin-top: 18px; }

/* ---------- 启动动画：平滑过渡而非逐帧 ---------- */
.app-splash img {
  animation: none !important;
  opacity: 0;
  transform: scale(0.985) translateZ(0);
  transition: opacity 0.42s ease, transform 0.52s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
  backface-visibility: hidden;
}
.app-splash.ready img { opacity: 1; transform: scale(1) translateZ(0); }
.app-splash.hide img { opacity: 0; transform: scale(1.012) translateZ(0); }
.app-splash { transition: opacity 0.36s ease, visibility 0.36s ease; }
body.splash-open #loginView, body.splash-open #appView { visibility: hidden; }
@media (max-width: 640px) {
  .app-splash::before, .app-splash::after { display: none; }
  .app-splash img {
    filter: none !important;
    transition: opacity 0.32s ease, transform 0.38s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  .app-splash { background: linear-gradient(155deg, #f6fbf8, #eef6ff); }
}


/* 我的二级菜单：补齐布局 */
.profile-menu-row {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.profile-menu-icon { display: grid; place-items: center; flex: none; }
.profile-menu-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.profile-menu-text strong { font-size: 13px; line-height: 1.4; }
.profile-menu-text small { font-size: 11px; line-height: 1.5; }
.profile-menu-arrow { margin-left: auto; flex: none; font-size: 22px; line-height: 1; }


/* 账号管理二级页 */
.profile-menu-row + .profile-menu-row {
  margin-top: 3px;
  border-top: 1px solid rgba(35, 58, 47, .06);
  border-radius: 0 0 18px 18px;
}
.account-admin-panel { padding: 18px; }
.account-admin-panel .stats-row { margin-bottom: 18px; }
.account-admin-panel .section-head { margin-bottom: 14px; }
.account-admin-panel .user-table { margin-top: 0; }
@media (max-width: 640px) {
  .account-admin-panel { padding: 12px; }
  .account-admin-panel .stats-row { gap: 8px; }
  .account-admin-panel .stat-card { padding: 10px 12px; }
  .account-admin-panel .stat-value { font-size: 22px; }
  .account-admin-panel .section-head {
    flex-direction: column;
    align-items: stretch;
    gap: 9px;
  }
  .account-admin-panel .head-actions { width: 100%; }
  .account-admin-panel .head-actions .btn { flex: 1; justify-content: center; }
  .account-admin-panel .user-table { border-radius: 18px; }
}


/* ==================================================================
   登录页：全屏层次 + 居中登录卡
   ================================================================== */
.login {
  display: block;
  position: relative;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  background:
    radial-gradient(760px 560px at 14% 12%, rgba(156, 244, 205, .62), transparent 64%),
    radial-gradient(800px 620px at 92% 92%, rgba(171, 215, 255, .58), transparent 64%),
    linear-gradient(150deg, #f7fcfa, #eff8f4 45%, #edf5ff);
}
.login-brand {
  position: absolute;
  inset: 0;
  z-index: 0;
  padding: 0;
  border: 0;
  pointer-events: none;
  background:
    radial-gradient(760px 560px at 10% 4%, rgba(126, 238, 190, .36), transparent 62%),
    radial-gradient(700px 520px at 88% 96%, rgba(145, 197, 255, .34), transparent 64%),
    linear-gradient(150deg, rgba(250, 255, 252, .55), rgba(237, 247, 255, .5));
  overflow: hidden;
}
.login-brand > .brand-lockup {
  position: absolute;
  left: 48px;
  top: 34px;
  z-index: 4;
}
.login-brand-visual {
  position: absolute;
  left: 3.5%;
  top: 50%;
  width: 27%;
  margin: 0;
  transform: translateY(-50%);
  opacity: .78;
  z-index: 1;
  animation: none !important;
}
.login-brand-visual .engineer-scene { width: min(410px, 100%); }
.login-brand .brand-ring { opacity: .55; }
.login-panel {
  position: relative;
  z-index: 2;
  min-height: 100dvh;
  padding: 88px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: transparent;
}
.login-card {
  width: 410px;
  max-width: 100%;
  margin: 0 auto;
}
.login-panel .login-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 24px;
  text-align: center;
}
.login-brand .brand-mark { box-shadow: 0 12px 32px rgba(22, 75, 52, .13); }
.login-brand .brand-word { color: #153d2d; }
.login-card .brand-lockup.mobile-only { display: none; }
.login.login-leaving {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0;
  transform: scale(1.012);
  transition: opacity .28s ease, transform .34s cubic-bezier(.2,.8,.2,1);
}
@media (max-width: 1024px) {
  .login-brand > .brand-lockup { left: 24px; top: 22px; }
  .login-brand-visual { left: 3.5%; width: 30%; opacity: .7; }
  .login-panel { padding: 100px 20px 72px; justify-content: center; }
}
@media (max-width: 640px) {
  .login { background: radial-gradient(500px 400px at 4% 4%, rgba(156, 244, 205, .55), transparent 65%), radial-gradient(500px 400px at 100% 100%, rgba(171, 215, 255, .5), transparent 65%), #f4faf7; }
  .login-brand { background: transparent; }
  .login-brand > .brand-lockup { left: 22px; top: 22px; }
  .login-brand-visual { display: none; }
  .login-panel { padding: 84px 16px; justify-content: center; }
  .login-card { width: 100%; max-width: 390px; }
  .login-panel .login-copy { bottom: 16px; }
}


/* ==================================================================
   页面切换玻璃幕 + 层级
   ================================================================== */
.view-curtain {
  position: fixed;
  inset: 0;
  z-index: 18;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  background:
    radial-gradient(600px 460px at 30% 20%, rgba(164, 244, 210, .28), transparent 68%),
    radial-gradient(640px 500px at 78% 82%, rgba(164, 210, 255, .26), transparent 68%),
    rgba(244, 249, 246, .62);
  backdrop-filter: blur(13px) saturate(1.18);
  -webkit-backdrop-filter: blur(13px) saturate(1.18);
  transition: opacity .2s ease, visibility .2s ease;
}
.view-curtain::after {
  content: "";
  position: absolute;
  left: 20%;
  right: 20%;
  top: 50%;
  height: 2px;
  border-radius: 99px;
  background: linear-gradient(90deg, transparent, rgba(21, 167, 111, .45), transparent);
  opacity: 0;
  transform: scaleX(.3);
  transition: opacity .18s ease, transform .26s ease;
}
.view-curtain.on { opacity: 1; visibility: visible; pointer-events: auto; }
.view-curtain.on::after { opacity: .9; transform: scaleX(1); }

.app .sidebar { z-index: 30; }
.app .topbar { z-index: 45; }
.tabbar { z-index: 45; }

/* 导航胶囊滑轨 */
.side-nav { position: relative; }
.tabbar { position: fixed; }
.nav-pill {
  position: absolute;
  z-index: 0;
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(213, 245, 229, .95), rgba(228, 243, 255, .9));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 8px 20px rgba(24, 70, 48, .08);
  pointer-events: none;
  opacity: 0;
  transition: left .34s cubic-bezier(.22,.8,.2,1), top .34s cubic-bezier(.22,.8,.2,1),
    width .34s cubic-bezier(.22,.8,.2,1), height .34s cubic-bezier(.22,.8,.2,1),
    opacity .2s ease;
}
.nav-pill.show { opacity: 1; }
.nav-item, .tab { position: relative; z-index: 1; }
.nav-item.active, .tab.active { background: transparent !important; box-shadow: none !important; }

/* 内容与按钮的衔接动效 */
.content.view-enter { animation: view-enter-soft .34s cubic-bezier(.22,.8,.2,1) both; }
@keyframes view-enter-soft {
  from { opacity: 0; transform: translateY(9px) scale(.997); }
  to { opacity: 1; transform: none; }
}
.card { animation: card-enter .4s cubic-bezier(.22,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 28ms); }
@keyframes card-enter {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to { opacity: 1; transform: none; }
}
.profile-menu-row:active, .variant-tab:active, .user-actions .mini-btn:active, .head-actions .btn:active {
  transform: scale(.97);
}
.login-card { animation: login-card-center-in .62s cubic-bezier(.22,.8,.2,1) both; }
@keyframes login-card-center-in {
  from { opacity: 0; transform: translateY(16px) scale(.975); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .view-curtain, .nav-pill, .card, .content.view-enter, .login-card { animation: none !important; transition: none !important; }
}


/* 全屏登录时保持背景清晰，避免整块品牌被磨砂 */
.login-panel {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: transparent !important;
}


/* 登录卡文字保持锐利 */
.login-card {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: linear-gradient(145deg, rgba(255,255,255,.93), rgba(255,255,255,.82)) !important;
}
.topbar-title h1, .topbar-title p { will-change: opacity, transform; }
.topbar-title.title-enter h1 { animation: title-in .3s cubic-bezier(.22,.8,.2,1); }
.topbar-title.title-enter p { animation: subtitle-in .34s .03s cubic-bezier(.22,.8,.2,1) both; }
@keyframes title-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes subtitle-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }


/* 登录页顶部状态、卡片与场景分层 */
.login-top-meta {
  position: absolute;
  right: 48px;
  top: 38px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .64);
  border: 1px solid rgba(255, 255, 255, .92);
  box-shadow: 0 8px 24px rgba(39, 87, 62, .07), inset 0 1px 0 rgba(255,255,255,.9);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  color: #5d766a;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
}
.login-meta-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #18a873;
  box-shadow: 0 0 0 4px rgba(24, 168, 115, .11);
}
.login-meta-sep { width: 1px; height: 12px; background: rgba(39, 87, 62, .15); }
.login-card {
  box-shadow: 0 28px 80px rgba(28, 73, 51, .13), 0 4px 18px rgba(28, 73, 51, .05), inset 0 1px 0 #fff !important;
  border: 1px solid rgba(255, 255, 255, .98) !important;
  background: linear-gradient(145deg, rgba(255, 255, 255, .975), rgba(252, 255, 253, .95)) !important;
}
.login-card input:-webkit-autofill,
.login-card input:-webkit-autofill:hover,
.login-card input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #f3faf6 inset !important;
  -webkit-text-fill-color: #183d2d !important;
  transition: background-color 9999s ease-out 0s;
}
@media (max-width: 1120px) {
  .login-brand-visual { display: none !important; }
}
@media (max-width: 760px) {
  .login-top-meta { display: none; }
}


/* ==================================================================
   OriginOS 7 视觉层：清透蓝白、圆润原子卡片、连续动效
   ================================================================== */
:root {
  --ink: #141a2a;
  --ink-2: #30384a;
  --muted: #667085;
  --faint: #98a2b3;
  --line: #e4e9f2;
  --line-soft: #eef1f8;
  --bg: #f3f6fc;
  --card: #ffffff;
  --green: #2f6bff;
  --green-dark: #1f55dd;
  --green-deep: #102a63;
  --green-soft: #eaf1ff;
  --radius: 22px;
  --shadow: 0 2px 4px rgba(31, 55, 105, .04), 0 16px 40px rgba(31, 68, 140, .08);
  --shadow-lg: 0 30px 90px rgba(17, 42, 92, .22);
}
body {
  background:
    radial-gradient(920px 620px at 4% -8%, rgba(181, 211, 255, .72), transparent 66%),
    radial-gradient(860px 640px at 102% 2%, rgba(202, 240, 255, .8), transparent 64%),
    radial-gradient(760px 620px at 92% 100%, rgba(226, 216, 255, .62), transparent 66%),
    #f4f7fd !important;
  color: var(--ink);
}
body::before {
  background:
    radial-gradient(820px 600px at 10% 12%, rgba(86, 148, 255, .16), transparent 65%),
    radial-gradient(900px 700px at 90% 88%, rgba(104, 218, 255, .16), transparent 66%),
    radial-gradient(700px 560px at 70% 20%, rgba(182, 167, 255, .12), transparent 65%) !important;
  filter: none !important;
  animation: none !important;
}
.app, .workspace { background: transparent !important; }
.topbar {
  background: linear-gradient(180deg, rgba(255,255,255,.82), rgba(249,252,255,.7)) !important;
  border-bottom: 1px solid rgba(74, 117, 196, .08) !important;
  box-shadow: 0 6px 30px rgba(32, 68, 135, .05) !important;
}
.sidebar {
  background: rgba(255,255,255,.74) !important;
  border-color: rgba(255,255,255,.95) !important;
  box-shadow: 0 22px 60px rgba(33, 70, 140, .08), inset 0 1px 0 #fff !important;
}
.panel, .card, .stat-card, .user-table, .empty, .banner, .modal, .sheet, .install-card, .dl-card, .audit-entry {
  border-radius: 26px !important;
  background: rgba(255,255,255,.82) !important;
  border-color: rgba(70, 112, 190, .09) !important;
  box-shadow: 0 2px 5px rgba(34, 70, 138, .03), 0 18px 46px rgba(34, 70, 138, .07), inset 0 1px 0 rgba(255,255,255,.95) !important;
}
.card { transition: transform .28s cubic-bezier(.22,.8,.2,1), box-shadow .28s ease, border-color .28s ease; }
@media (hover: hover) {
  .card:hover { transform: translateY(-3px); box-shadow: 0 24px 56px rgba(41, 86, 172, .13), inset 0 1px 0 #fff !important; border-color: rgba(47,107,255,.18) !important; }
  .panel:hover { border-color: rgba(47,107,255,.12) !important; }
}
.btn { border-radius: 16px !important; transition: transform .18s cubic-bezier(.22,.8,.2,1), background .2s, box-shadow .2s, color .2s; }
.btn.primary, .dl-actions .btn.primary {
  background: linear-gradient(135deg, #2f6bff, #6b9bff) !important;
  box-shadow: 0 12px 26px rgba(47,107,255,.25), inset 0 1px 0 rgba(255,255,255,.28) !important;
}
.btn.primary:hover, .dl-actions .btn.primary:hover { background: linear-gradient(135deg, #245ee8, #5e90ff) !important; }
.btn:active { transform: scale(.97); }
.chip.active { background: #14295a !important; border-color: #14295a !important; color: #fff !important; }
.chip { border-radius: 999px !important; transition: transform .2s, background .2s, color .2s; }
.tag, .cat-chip, .variant-count { background: #edf3ff !important; color: #2b62d6 !important; border-color: rgba(47,107,255,.12) !important; }
.nav-pill { background: linear-gradient(135deg, #e4edff, #e9f8ff) !important; box-shadow: inset 0 1px 0 #fff, 0 10px 24px rgba(47,107,255,.12) !important; }
.nav-item { border-radius: 17px !important; transition: color .22s, transform .22s; }
.nav-item.active { color: #245de0 !important; }
.tabbar { background: rgba(255,255,255,.8) !important; border-color: rgba(255,255,255,.96) !important; box-shadow: 0 16px 48px rgba(36,74,145,.14), inset 0 1px 0 #fff !important; }
.tab.active { color: #245de0 !important; }
.tab { transition: color .22s, transform .22s; }
.selection, ::selection { background: #d9e7ff; color: #102a63; }
input:focus, select:focus, textarea:focus { border-color: rgba(47,107,255,.55) !important; box-shadow: 0 0 0 4px rgba(47,107,255,.10) !important; }
.stat-value, .u-name, .info-row strong { color: #18233a; }
.profile-hero { background: linear-gradient(135deg, rgba(237,245,255,.92), rgba(242,252,255,.82)) !important; border-color: rgba(255,255,255,.95) !important; }
.profile-menu-icon { background: #edf3ff !important; color: #2f6bff !important; }
.view-curtain {
  background:
    radial-gradient(600px 460px at 28% 18%, rgba(151, 199, 255, .3), transparent 68%),
    radial-gradient(640px 500px at 80% 84%, rgba(162, 232, 255, .26), transparent 68%),
    rgba(247, 250, 255, .66) !important;
}
.view-curtain::after { background: linear-gradient(90deg, transparent, rgba(47,107,255,.52), transparent) !important; }
.profile-menu-row + .profile-menu-row { border-color: rgba(73,112,190,.09) !important; }

/* 登录页 OriginOS 蓝白 */
.login {
  background:
    radial-gradient(800px 620px at 8% 6%, rgba(149, 195, 255, .62), transparent 64%),
    radial-gradient(820px 620px at 96% 96%, rgba(162, 231, 255, .55), transparent 66%),
    radial-gradient(600px 560px at 70% 6%, rgba(207, 194, 255, .34), transparent 65%),
    linear-gradient(145deg, #f7fbff, #eef5ff 52%, #f4f9ff) !important;
}
.login-brand {
  background:
    radial-gradient(720px 540px at 12% 4%, rgba(130, 180, 255, .34), transparent 62%),
    radial-gradient(700px 540px at 92% 98%, rgba(144, 225, 255, .3), transparent 64%),
    linear-gradient(145deg, rgba(255,255,255,.52), rgba(244,250,255,.48)) !important;
}
.login-brand-visual { filter: hue-rotate(82deg) saturate(.82); opacity: .7 !important; }
.login-card {
  background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(250,253,255,.95)) !important;
  border-color: rgba(255,255,255,.98) !important;
  box-shadow: 0 30px 90px rgba(34, 82, 170, .16), 0 4px 18px rgba(34, 82, 170, .06), inset 0 1px 0 #fff !important;
}
.login-top-meta { background: rgba(255,255,255,.72) !important; border-color: rgba(255,255,255,.98) !important; color: #536b91 !important; box-shadow: 0 10px 28px rgba(40,90,170,.08), inset 0 1px 0 #fff !important; }
.login-meta-dot { background: #2f6bff !important; box-shadow: 0 0 0 4px rgba(47,107,255,.12) !important; }
.login-meta-sep { background: rgba(47,107,255,.16) !important; }
.login-card .field input { background: #f5f8ff !important; border-color: #e2e9f7 !important; }
.login-card .field input:focus { background: #fff !important; }
.login-card .btn.primary { background: linear-gradient(135deg, #2f6bff, #5e91ff) !important; box-shadow: 0 14px 34px rgba(47,107,255,.28) !important; }
.login-copy { color: #8292ab !important; }

/* 启动等待动画 */
.splash-loader {
  position: absolute;
  left: 0; right: 0; bottom: 9%;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: #5f789e; font-size: 12px; font-weight: 600; letter-spacing: .08em;
  opacity: 0; transform: translateY(6px); transition: opacity .4s .25s, transform .4s .25s;
}
.app-splash.ready .splash-loader { opacity: 1; transform: none; }
.splash-dots { display: flex; align-items: center; gap: 6px; height: 14px; }
.splash-dots i { width: 7px; height: 7px; border-radius: 50%; background: #2f6bff; opacity: .25; animation: splash-dot 1.1s infinite ease-in-out; }
.splash-dots i:nth-child(2) { animation-delay: .14s; }
.splash-dots i:nth-child(3) { animation-delay: .28s; }
@keyframes splash-dot { 0%, 80%, 100% { transform: translateY(0); opacity: .22; } 40% { transform: translateY(-5px); opacity: 1; } }
.splash-loader em { font-style: normal; }
.app-splash img { border-radius: 34px; }
@media (max-width: 640px) { .app-splash img { border-radius: 28px; } .splash-loader { bottom: 6%; } }

@media (prefers-reduced-motion: reduce) {
  .splash-dots i, .card, .btn, .nav-item, .tab { animation: none !important; transition: none !important; }
}


/* OriginOS 账号列表：手机端彻底分行，操作按钮不再压住姓名 */
@media (max-width: 640px) {
  .account-admin-panel .user-row:not(.head) {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 14px !important;
  }
  .account-admin-panel .user-identity { width: 100%; }
  .account-admin-panel .user-identity > div { min-width: 0; }
  .account-admin-panel .u-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .account-admin-panel .user-meta { white-space: normal; }
  .account-admin-panel .user-actions {
    width: 100%;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    gap: 7px !important;
  }
  .account-admin-panel .user-actions .mini-btn {
    flex: 1 1 28%;
    min-width: 68px;
    height: 34px;
    justify-content: center;
  }
  .account-admin-panel .user-facts { display: flex; flex-wrap: wrap; gap: 6px 10px; }
}


/* 网页启动等待层：图片未加载时也有完整视觉 */
.app-splash {
  background:
    radial-gradient(540px 420px at 8% 6%, rgba(139, 187, 255, .55), transparent 64%),
    radial-gradient(600px 480px at 92% 94%, rgba(146, 229, 255, .48), transparent 66%),
    linear-gradient(145deg, #f7fbff, #edf5ff 52%, #f4f9ff) !important;
}
.splash-fallback {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
  color: #17345f; transition: opacity .35s ease; pointer-events: none;
}
.splash-fallback strong { font-size: 28px; letter-spacing: .16em; font-weight: 800; color: #1c3c72; }
.splash-fallback small { font-size: 11px; color: #7e94b6; letter-spacing: .2em; }
.app-splash.ready .splash-fallback { opacity: 0; }
.splash-loader { opacity: 1 !important; transform: none !important; }
.app-splash.hide .splash-loader { opacity: 0 !important; }


/* ==================================================================
   OriginOS 留白 / 层次 / 清晰字体微调
   ================================================================== */
body {
  -webkit-font-smoothing: auto !important;
  text-rendering: optimizeLegibility;
}
.content { padding: 28px 34px 104px !important; }
.topbar { padding: 24px 34px 20px !important; }
.topbar-title h1 { letter-spacing: -.02em; }
.topbar-title p { margin-top: 4px; letter-spacing: .01em; }
.card-grid { gap: 18px !important; }
.card {
  padding: 18px !important;
  border-radius: 24px !important;
  background: linear-gradient(165deg, #ffffff, #fbfdff 78%, #f7fbff) !important;
  border: 1px solid rgba(255,255,255,.98) !important;
  box-shadow: 0 1px 2px rgba(32,63,120,.04), 0 12px 30px rgba(43,84,155,.07), inset 0 1px 0 #fff !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.panel {
  padding: 24px !important;
  background: linear-gradient(165deg, rgba(255,255,255,.96), rgba(250,253,255,.9)) !important;
  border: 1px solid rgba(255,255,255,.98) !important;
  box-shadow: 0 1px 3px rgba(32,63,120,.035), 0 20px 48px rgba(39,79,150,.07), inset 0 1px 0 #fff !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.user-table, .empty, .banner, .modal, .sheet, .install-card, .dl-card, .audit-entry, .stat-card {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.profile-grid { gap: 20px !important; }
.profile-grid > div > .panel + .panel { margin-top: 20px !important; }
.section-head { margin-bottom: 16px !important; }
.result-head { margin-bottom: 18px !important; }
.profile-hero { padding: 24px !important; }
.profile-menu-row { padding: 15px 14px !important; }
.account-admin-panel .stats-row { gap: 14px !important; margin-bottom: 22px !important; }
.account-admin-panel .user-table { margin-top: 16px !important; }
.card h3 { margin-top: 12px !important; margin-bottom: 8px !important; }
.card .preview { line-height: 1.75 !important; }
.card-foot { margin-top: 14px !important; }
@media (max-width: 1100px) {
  .content { padding: 22px 24px 100px !important; }
  .topbar { padding: 20px 24px 16px !important; }
}
@media (max-width: 640px) {
  .content { padding: 16px 16px 106px !important; }
  .topbar { padding: 18px 16px 14px !important; }
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }
  .card { padding: 14px !important; border-radius: 22px !important; }
  .panel { padding: 18px !important; border-radius: 24px !important; }
  .section-head { margin-bottom: 14px !important; }
  .result-head { margin-bottom: 14px !important; }
  .profile-hero { padding: 20px 18px !important; }
}


/* ==================================================================
   纯 CSS 启动动画（无启动海报）
   ================================================================== */
.app-splash {
  background:
    radial-gradient(620px 480px at 8% 4%, rgba(140, 189, 255, .58), transparent 64%),
    radial-gradient(640px 520px at 94% 94%, rgba(155, 236, 255, .52), transparent 66%),
    linear-gradient(145deg, #f8fbff, #eef5ff 52%, #f5faff) !important;
}
.splash-stage {
  position: relative;
  width: 320px;
  height: 270px;
  margin-bottom: 8px;
}
.splash-halo {
  position: absolute; left: 50%; top: 48%; width: 250px; height: 250px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(120, 177, 255, .3), rgba(142, 229, 255, .08) 56%, transparent 70%);
  animation: splash-halo 2.4s ease-in-out infinite;
}
.splash-card {
  position: absolute; width: 104px; border-radius: 18px;
  background: rgba(255,255,255,.84);
  border: 1px solid rgba(255,255,255,.98);
  box-shadow: 0 14px 30px rgba(51, 98, 180, .12);
  padding: 12px 11px;
  display: flex; flex-direction: column; gap: 7px;
  animation: splash-card-float 4s ease-in-out infinite;
}
.splash-card i { height: 5px; border-radius: 4px; background: linear-gradient(90deg, #97baff, #b8e9ff); opacity: .8; }
.splash-card i:nth-child(2) { width: 74%; }
.splash-card i:nth-child(3) { width: 52%; }
.splash-card.c1 { left: 4px; top: 48px; transform: rotate(-8deg); animation-delay: -1.2s; }
.splash-card.c2 { right: 2px; top: 34px; width: 92px; transform: rotate(7deg); animation-delay: -.6s; }
.splash-card.c3 { right: 28px; bottom: 18px; width: 84px; transform: rotate(4deg); animation-delay: -2s; }
.splash-bubble {
  position: absolute; left: 50%; top: 45%; width: 142px; height: 142px;
  transform: translate(-50%, -50%);
  border-radius: 40px;
  background: linear-gradient(150deg, #ffffff, #f2faff);
  border: 1px solid #fff;
  box-shadow: 0 24px 54px rgba(44, 92, 175, .17), inset 0 1px 0 #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  z-index: 2;
  animation: splash-bubble 3.2s ease-in-out infinite;
}
.splash-bubble strong { font: 800 31px/1 "Segoe UI", sans-serif; letter-spacing: .1em; color: #1c55d8; }
.splash-bubble em { font: 700 12px/1 "Segoe UI", sans-serif; letter-spacing: .18em; font-style: normal; color: #80a6d6; margin-top: 7px; }
.splash-orbit {
  position: absolute; left: 50%; top: 45%; border-radius: 50%;
  transform: translate(-50%, -50%); border: 1px solid rgba(65, 124, 234, .16);
}
.splash-orbit.o1 { width: 218px; height: 218px; animation: splash-orbit 7s linear infinite; }
.splash-orbit.o2 { width: 286px; height: 286px; border-style: dashed; opacity: .55; animation: splash-orbit 11s linear infinite reverse; }
.splash-word {
  font: 800 24px/1 "Segoe UI", "Microsoft YaHei UI", sans-serif;
  letter-spacing: .18em; color: #173866;
  animation: splash-copy 0.6s .1s both;
}
.splash-sub { margin-top: 9px; font-size: 11px; letter-spacing: .2em; color: #8098ba; animation: splash-copy .6s .2s both; }
.splash-loader { bottom: 9%; }
.splash-dots i { background: #2f6bff; }
.app-splash.ready .splash-halo, .app-splash.ready .splash-card, .app-splash.ready .splash-bubble, .app-splash.ready .splash-orbit { animation-play-state: running; }
@keyframes splash-card-float { 0%,100% { translate: 0 0; } 50% { translate: 0 -9px; } }
@keyframes splash-bubble { 0%,100% { transform: translate(-50%, -50%) scale(1); } 50% { transform: translate(-50%, -52%) scale(1.025); } }
@keyframes splash-orbit { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes splash-halo { 0%,100% { opacity: .7; transform: translate(-50%, -50%) scale(.94); } 50% { opacity: 1; transform: translate(-50%, -50%) scale(1.06); } }
@keyframes splash-copy { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }


/* ==================================================================
   当前账号 / 切换账号 / 手机端流畅度
   ================================================================== */
.side-user { cursor: pointer; border-radius: 18px; transition: background .2s ease, transform .2s ease; }
.side-user:hover { background: rgba(47,107,255,.06); }
.side-user:active { transform: scale(.985); }
.side-user-meta { min-width: 0; }
.side-user-handle { font-size: 10.5px; color: #8294b2; line-height: 1.35; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-chip {
  display: flex; align-items: center; gap: 9px;
  padding: 5px 11px 5px 5px; border-radius: 999px;
  background: rgba(255,255,255,.72); border: 1px solid rgba(255,255,255,.95);
  box-shadow: 0 6px 20px rgba(33,78,160,.07), inset 0 1px 0 #fff;
  color: #263c61; transition: background .2s, transform .2s, box-shadow .2s;
  max-width: 230px;
}
.account-chip:hover { background: #fff; box-shadow: 0 10px 26px rgba(33,78,160,.11); }
.account-chip:active { transform: scale(.97); }
.account-chip .top-avatar { width: 34px; height: 34px; font-size: 12px; }
.account-chip-copy { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; line-height: 1.25; }
.account-chip-copy strong { font-size: 12px; font-weight: 700; max-width: 110px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-chip-copy small { font-size: 9.5px; font-weight: 500; color: #8496b2; max-width: 110px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-chip-chevron { color: #8da0bb; font-size: 12px; margin-left: 1px; }
.account-switch-card {
  display: flex; align-items: center; gap: 13px;
  padding: 16px; border-radius: 22px; margin-bottom: 16px;
  background: linear-gradient(145deg, #f0f6ff, #f2fcff);
  border: 1px solid rgba(255,255,255,.95);
  box-shadow: inset 0 1px 0 #fff;
}
.account-switch-card .avatar { width: 52px; height: 52px; font-size: 17px; }
.account-switch-card-info { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.account-switch-card-info strong { font-size: 15px; }
.account-switch-card-info span { font-size: 11px; color: #7e90ac; }
.account-switch-actions { display: flex; flex-direction: column; gap: 9px; }
.account-switch-actions .btn { width: 100%; height: 46px; justify-content: flex-start; padding: 0 16px; border-radius: 17px; }
.account-switch-actions .btn.danger { color: #c44d48; background: #fff5f4; border-color: #f3d7d4; }
@media (max-width: 760px) {
  .account-chip { padding: 4px; background: rgba(255,255,255,.66); border-radius: 50%; }
  .account-chip-copy, .account-chip-chevron { display: none; }
  .account-chip .top-avatar { width: 38px; height: 38px; }
}
@media (max-width: 640px) {
  /* 手机端减少大面积模糊/滤镜，避免切页、菜单最后一帧闪烁和卡顿 */
  .topbar { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; background: rgba(248,251,255,.94) !important; }
  .view-curtain {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(244,249,255,.95) !important;
    transition: opacity .14s ease, visibility .14s ease !important;
  }
  .view-curtain::after { display: none; }
  .backdrop { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; background: rgba(12,30,60,.32) !important; }
  .sheet, .modal { -webkit-backface-visibility: hidden; backface-visibility: hidden; }
  .sheet { height: 100dvh !important; max-height: 100dvh !important; }
  .sheet-body { overscroll-behavior: contain; }
  .modal { max-height: calc(100dvh - 24px) !important; }
  .tabbar { backdrop-filter: blur(18px) saturate(1.15) !important; -webkit-backdrop-filter: blur(18px) saturate(1.15) !important; }
  .modal, .sheet { background: rgba(255,255,255,.99) !important; }
  .panel, .card { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
}
.page-cache-hint { display: none; }


.account-switch-card .avatar { position: relative; overflow: hidden; flex: none; }
.account-switch-card .avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.account-inline-switch {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 14px; padding: 12px 14px; border-radius: 17px;
  background: #f3f8ff; border: 1px solid rgba(47,107,255,.08);
  color: #6f819d; font-size: 11.5px;
}
.account-inline-switch strong { color: #2b5ecc; font-weight: 700; }
.account-inline-switch .btn { height: 34px; padding: 0 14px; flex: none; }
@media (max-width: 640px) {
  .account-inline-switch { flex-wrap: wrap; }
  .account-inline-switch .btn { width: 100%; }
}


/* 启动动画纵向居中 */
.app-splash { flex-direction: column !important; gap: 2px; }


.splash-word { animation: none !important; opacity: 1 !important; transform: none !important; color: #163a6b !important; }
.splash-sub { animation: none !important; opacity: 1 !important; transform: none !important; color: #6f86a8 !important; }


/* ==================================================================
   柔和多色：降低饱和度、增加暖色与自然色层次
   ================================================================== */
:root {
  --ink: #262b35;
  --ink-2: #454c57;
  --muted: #7b808b;
  --faint: #a4a7ad;
  --line: #e7e4de;
  --line-soft: #f0ede7;
  --bg: #f6f5f1;
  --card: #fffefa;
  --green: #6477d2;
  --green-dark: #5366c4;
  --green-deep: #303a5e;
  --green-soft: #eef0fa;
}
body {
  background:
    radial-gradient(900px 650px at 3% -8%, rgba(201, 226, 211, .7), transparent 64%),
    radial-gradient(860px 640px at 100% 0%, rgba(217, 208, 238, .62), transparent 64%),
    radial-gradient(760px 600px at 88% 100%, rgba(247, 222, 206, .55), transparent 66%),
    #f7f6f2 !important;
  color: var(--ink);
}
body::before {
  background:
    radial-gradient(760px 560px at 12% 14%, rgba(179, 206, 199, .22), transparent 65%),
    radial-gradient(840px 640px at 90% 82%, rgba(206, 195, 230, .18), transparent 65%),
    radial-gradient(680px 520px at 64% 18%, rgba(240, 211, 189, .16), transparent 62%) !important;
}
.topbar {
  background: linear-gradient(180deg, rgba(255, 254, 250, .84), rgba(252, 251, 247, .7)) !important;
  border-bottom: 1px solid rgba(125, 119, 104, .09) !important;
  box-shadow: 0 6px 28px rgba(78, 76, 65, .045) !important;
}
.sidebar {
  background: rgba(255, 254, 250, .76) !important;
  border-color: rgba(255,255,255,.96) !important;
  box-shadow: 0 22px 58px rgba(88, 82, 68, .07), inset 0 1px 0 #fff !important;
}
.panel, .card, .stat-card, .user-table, .empty, .banner, .modal, .sheet, .install-card, .dl-card, .audit-entry {
  background: linear-gradient(165deg, rgba(255,254,250,.96), rgba(251,250,246,.92)) !important;
  border-color: rgba(255,255,255,.98) !important;
  box-shadow: 0 2px 5px rgba(91, 85, 70, .035), 0 18px 44px rgba(91, 85, 70, .06), inset 0 1px 0 #fff !important;
}
.btn.primary, .dl-actions .btn.primary, .login-card .btn.primary {
  background: linear-gradient(135deg, #6679d4, #8d9ee3) !important;
  box-shadow: 0 12px 26px rgba(103, 121, 207, .22), inset 0 1px 0 rgba(255,255,255,.3) !important;
}
.btn.primary:hover, .dl-actions .btn.primary:hover {
  background: linear-gradient(135deg, #576ac7, #7f91db) !important;
}
.chip.active { background: #333a54 !important; border-color: #333a54 !important; }
.tag { background: #eef4ee !important; color: #607b68 !important; border-color: rgba(111,139,120,.13) !important; }
.tag:nth-child(3n+2) { background: #f2eef8 !important; color: #74658f !important; border-color: rgba(120,103,150,.12) !important; }
.tag:nth-child(3n+3) { background: #f8efe8 !important; color: #8e715d !important; border-color: rgba(156,121,95,.12) !important; }
.nav-pill { background: linear-gradient(135deg, #e9edf9, #eff4ef) !important; box-shadow: inset 0 1px 0 #fff, 0 10px 24px rgba(105,116,163,.12) !important; }
.nav-item.active, .tab.active { color: #5b69b7 !important; }
.tabbar { background: rgba(255,254,250,.82) !important; box-shadow: 0 16px 44px rgba(88,82,68,.12), inset 0 1px 0 #fff !important; }
.view-curtain {
  background:
    radial-gradient(600px 460px at 28% 18%, rgba(197, 221, 207, .32), transparent 68%),
    radial-gradient(640px 500px at 80% 84%, rgba(218, 208, 235, .3), transparent 68%),
    rgba(248, 247, 243, .72) !important;
}
.view-curtain::after { background: linear-gradient(90deg, transparent, rgba(104,120,189,.35), transparent) !important; }
.profile-hero { background: linear-gradient(135deg, rgba(238,245,239,.92), rgba(246,243,250,.82)) !important; }
.profile-menu-icon { background: #f0f1f8 !important; color: #6574bd !important; }
.banner { background: linear-gradient(135deg, rgba(255,249,236,.96), rgba(253,245,241,.9)) !important; border-color: rgba(214,185,144,.25) !important; }
.login {
  background:
    radial-gradient(760px 600px at 6% 4%, rgba(182, 218, 201, .55), transparent 64%),
    radial-gradient(760px 620px at 96% 92%, rgba(217, 200, 235, .5), transparent 66%),
    radial-gradient(680px 560px at 80% 2%, rgba(247, 217, 198, .38), transparent 65%),
    linear-gradient(145deg, #fbfaf6, #f4f6f2 52%, #faf8f5) !important;
}
.login-brand {
  background:
    radial-gradient(720px 540px at 12% 4%, rgba(190, 220, 204, .3), transparent 62%),
    radial-gradient(700px 540px at 92% 98%, rgba(224, 212, 238, .28), transparent 64%),
    linear-gradient(145deg, rgba(255,255,252,.55), rgba(249,247,243,.5)) !important;
}
.login-brand-visual { filter: hue-rotate(64deg) saturate(.72); opacity: .62 !important; }
.login-card { background: linear-gradient(145deg, #fffefa, #fdfbf7) !important; }
.login-top-meta { background: rgba(255,254,250,.76) !important; color: #6d746b !important; }
.login-meta-dot { background: #7c9b86 !important; box-shadow: 0 0 0 4px rgba(124,155,134,.12) !important; }
.login-card .field input { background: #faf8f3 !important; border-color: #e8e2d8 !important; }
.login-meta-sep { background: rgba(110,125,102,.16) !important; }
.account-chip { background: rgba(255,254,250,.76); color: #3e4759; }
.account-chip-copy small { color: #8b9089; }
.account-switch-card { background: linear-gradient(145deg, #f2f6ef, #f6f1f7) !important; }
.account-inline-switch { background: #f4f4f7 !important; border-color: rgba(110,120,155,.08) !important; }
.account-inline-switch strong { color: #5969b5 !important; }
.login-copy { color: #8c918a !important; }
.splash-bubble strong { color: #5867b5 !important; }
.splash-bubble em { color: #9a9fae !important; }
.splash-word { color: #343a4a !important; }
.splash-sub { color: #7f857d !important; }
.splash-dots i { background: #7b88c8 !important; }
.splash-card i { background: linear-gradient(90deg, #b4c6b8, #d7cbe7) !important; }
.app-splash {
  background:
    radial-gradient(620px 480px at 8% 4%, rgba(198, 222, 207, .55), transparent 64%),
    radial-gradient(640px 520px at 94% 94%, rgba(225, 211, 237, .52), transparent 66%),
    linear-gradient(145deg, #fbfaf6, #f3f6f1 52%, #faf6f3) !important;
}
.login-meta-sep { background: rgba(110,125,102,.16) !important; }
.page-title, h1, h2, h3 { color: #2b303a; }
@media (max-width: 640px) {
  .topbar { background: rgba(255,254,250,.95) !important; }
  .view-curtain { background: rgba(247,246,242,.97) !important; }
}


/* 搜索：猜你想问 */
.searchbox { position: relative; }
.search-suggest {
  position: absolute;
  left: 0; right: 0; top: calc(100% + 8px);
  z-index: 90;
  padding: 10px;
  border-radius: 22px;
  background: rgba(255,254,250,.98);
  border: 1px solid rgba(255,255,255,.98);
  box-shadow: 0 22px 54px rgba(84,82,69,.14), inset 0 1px 0 #fff;
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  animation: suggest-in .18s cubic-bezier(.22,.8,.2,1);
}
@keyframes suggest-in { from { opacity: 0; transform: translateY(-5px) scale(.99); } to { opacity: 1; transform: none; } }
.suggest-head { display: flex; align-items: baseline; gap: 8px; padding: 3px 7px 8px; color: #6f756d; }
.suggest-head strong { font-size: 11px; color: #4f5770; letter-spacing: .04em; }
.suggest-head span { font-size: 10px; color: #a0a39c; }
.suggest-list { display: flex; flex-direction: column; gap: 2px; }
.suggest-item {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 9px 10px; border-radius: 13px;
  color: #3e4653; text-align: left; transition: background .18s, transform .18s;
}
.suggest-item:hover { background: #f4f5f1; transform: translateX(2px); }
.suggest-dot { width: 6px; height: 6px; border-radius: 50%; background: #9caf9d; flex: none; }
.suggest-title { flex: 1; min-width: 0; font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest-item em { flex: none; font-style: normal; font-size: 10px; color: #9b9e97; }
.empty .suggest-wrap { width: 100%; max-width: 520px; margin-top: 16px; text-align: left; }
.empty .suggest-head { padding-left: 0; }
.empty .suggest-item { background: #faf9f5; margin-bottom: 5px; }
@media (max-width: 640px) {
  .search-suggest { left: -2px; right: -2px; padding: 8px; border-radius: 18px; max-height: 42vh; overflow-y: auto; }
  .suggest-item { padding: 8px 8px; }
  .suggest-item em { display: none; }
}


.switch-current {
  padding: 12px 14px; margin-bottom: 16px; border-radius: 16px;
  background: #f7f5f0; border: 1px solid rgba(140,130,110,.1);
  color: #7e8178; font-size: 12px;
}
.switch-current strong { color: #3c4350; margin-left: 3px; }
.switch-current span { color: #8a8f98; margin-left: 2px; }


/* 自带备份面板：长路径与文字不挤压 */
.info-row { align-items: flex-start !important; padding: 12px 0 !important; }
.info-row > span:first-child { flex: none; }
.info-row > span:last-child {
  min-width: 0;
  text-align: right;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.65;
}
#backupInfo .info-row > span:last-child { max-width: 68%; }
.backup-actions { padding-top: 4px; }

/* 液态玻璃：只在容器表面加一点柔光，不影响文字 */
.topbar, .sidebar, .tabbar, .account-chip, .login-card, .panel, .card, .sheet, .modal {
  background-image: linear-gradient(135deg, rgba(255,255,255,.46), rgba(255,255,255,0) 34%, rgba(255,255,255,.12) 72%, rgba(255,255,255,0));
  background-blend-mode: soft-light;
}
.topbar, .tabbar, .account-chip, .login-card {
  -webkit-backdrop-filter: blur(14px) saturate(1.08);
  backdrop-filter: blur(14px) saturate(1.08);
}
.card, .panel { box-shadow: inset 0 1px 0 rgba(255,255,255,.92), 0 14px 36px rgba(91,85,70,.065) !important; }
.btn { box-shadow: inset 0 1px 0 rgba(255,255,255,.22); }

/* 悬浮提示不再遮住底部 */
.search-suggest { background: rgba(255,254,250,.94) !important; }
@media (max-width: 640px) {
  .splash-loader { bottom: 7%; }
}


/* 搜索推荐层保持完全不透，避免与下方横幅叠在一起 */
.search-suggest {
  background: #fffefa !important;
  box-shadow: 0 22px 54px rgba(78,75,62,.16), inset 0 1px 0 #fff !important;
}
@media (max-width: 640px) {
  .search-suggest { background: #fffefa !important; }
}


/* 桌面壳：内容四周与窗口拉开距离 */
body.desktop-shell { height: 100dvh; overflow: hidden; }
body.desktop-shell .app {
  height: 100dvh !important;
  min-height: 0 !important;
  padding: 18px 18px 18px !important;
  box-sizing: border-box !important;
}
body.desktop-shell .sidebar {
  height: calc(100dvh - 36px) !important;
  margin: 0 !important;
  top: 0 !important;
  border-radius: 28px !important;
}
body.desktop-shell .workspace {
  height: calc(100dvh - 36px) !important;
  border-radius: 28px !important;
  overflow: hidden;
}
body.desktop-shell .topbar { padding-top: 22px !important; }
body.desktop-shell .login {
  min-height: calc(100dvh - 36px) !important;
  margin: 18px !important;
  border-radius: 30px !important;
  overflow: hidden;
}
body.desktop-shell .login-brand > .brand-lockup { left: 34px; top: 26px; }


/* 桌面壳显式留白（不受 flex/sticky 影响） */
body.desktop-shell .app {
  padding: 0 !important;
  height: 100dvh !important;
  min-height: 0 !important;
  box-sizing: border-box !important;
}
body.desktop-shell .sidebar {
  position: relative !important;
  top: 0 !important;
  margin: 18px 0 18px 18px !important;
  height: calc(100dvh - 36px) !important;
  align-self: flex-start;
}
body.desktop-shell .workspace {
  margin: 18px 18px 18px 0 !important;
  height: calc(100dvh - 36px) !important;
  border-radius: 28px !important;
  overflow: hidden;
}
body.desktop-shell .topbar { padding-top: 20px !important; }
body.desktop-shell .login {
  min-height: calc(100dvh - 36px) !important;
  margin: 18px !important;
  border-radius: 30px !important;
}


/* 搜索框只保留一圈柔和高亮，去掉内部紫色框 */
.searchbox:focus-within {
  border-color: rgba(104, 120, 190, .28) !important;
  box-shadow: 0 0 0 3px rgba(104, 120, 190, .07) !important;
}
.searchbox input:focus,
#searchInput:focus {
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

/* 手机端添加话术等大弹窗：稳定合成层，减少闪帧 */
@media (max-width: 640px) {
  .modal, .sheet {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    background: #fffefa !important;
    transform: translateZ(0);
    will-change: transform, opacity;
    backface-visibility: hidden;
    contain: paint;
  }
  .modal { max-height: calc(100dvh - 20px) !important; }
  .modal-body { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  .layer .backdrop { transition: opacity .16s ease !important; }
}

/* 桌面壳：上下左右严格等距，内容整体对称 */
html.desktop-shell body {
  padding: 18px !important;
  height: 100dvh !important;
  min-height: 0 !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}
html.desktop-shell .app {
  padding: 0 !important;
  height: calc(100dvh - 36px) !important;
  min-height: 0 !important;
}
html.desktop-shell .sidebar {
  position: relative !important;
  top: 0 !important;
  margin: 0 !important;
  height: 100% !important;
  align-self: stretch !important;
}
html.desktop-shell .workspace {
  margin: 0 !important;
  height: 100% !important;
  border-radius: 28px !important;
  overflow: hidden;
}
html.desktop-shell .login {
  margin: 0 !important;
  height: calc(100dvh - 36px) !important;
  min-height: 0 !important;
  border-radius: 30px !important;
  overflow: hidden;
}


/* 桌面窗口：用一圈浅色画框表现对称留白 */
html.desktop-shell body {
  background: linear-gradient(145deg, #eef2e9, #f1eef5 52%, #f5eee9) !important;
}
html.desktop-shell .sidebar,
html.desktop-shell .workspace {
  box-shadow: 0 18px 44px rgba(94, 90, 76, .08), inset 0 1px 0 #fff !important;
}


/* 桌面留白由原生窗口内边距负责，网页内部铺满 */
html.desktop-shell body {
  padding: 0 !important;
  height: 100dvh !important;
  overflow: hidden !important;
}
html.desktop-shell .app {
  height: 100dvh !important;
  min-height: 0 !important;
  padding: 0 !important;
}
html.desktop-shell .sidebar {
  height: 100% !important;
  margin: 0 !important;
  position: relative !important;
  top: 0 !important;
}
html.desktop-shell .workspace {
  height: 100% !important;
  margin: 0 !important;
  border-radius: 24px !important;
}
html.desktop-shell .login {
  height: 100dvh !important;
  min-height: 0 !important;
  margin: 0 !important;
  border-radius: 24px !important;
}


/* 弹窗四角统一圆角：裁掉头部/内容超出圆角的部分 */
.modal, .sheet {
  overflow: hidden !important;
}
.modal-head {
  border-radius: 28px 28px 0 0;
}
@media (max-width: 640px) {
  .modal { border-radius: 26px 26px 0 0 !important; }
  .modal-head { border-radius: 26px 26px 0 0; }
}


/* 新增话术弹窗：桌面/手机都四角圆润，手机改为居中浮层 */
.modal {
  border-radius: 28px !important;
  overflow: hidden !important;
}
.modal-head { border-radius: 28px 28px 0 0 !important; }
@media (max-width: 640px) {
  .modal {
    left: 12px !important;
    right: 12px !important;
    top: 50% !important;
    bottom: auto !important;
    width: auto !important;
    max-height: calc(100dvh - 24px) !important;
    border-radius: 28px !important;
    transform: translateY(calc(-50% + 14px)) scale(.985) !important;
  }
  .layer.open .modal { transform: translateY(-50%) scale(1) !important; }
  .modal-head { border-radius: 28px 28px 0 0 !important; }
}

/* 话术详情抽屉：四周留出空隙，四角都是圆角 */
.sheet {
  top: 14px !important;
  bottom: 14px !important;
  right: 14px !important;
  height: auto !important;
  border-radius: 30px !important;
  overflow: hidden !important;
}
@media (max-width: 640px) {
  .sheet {
    left: 10px !important;
    right: 10px !important;
    top: 10px !important;
    bottom: 10px !important;
    width: auto !important;
    height: auto !important;
    border-radius: 28px !important;
  }
}


/* 应用内所有可见卡片/面板统一圆角 */
.panel, .card, .stat-card, .user-table, .banner, .empty, .install-card,
.dl-card, .dl-public, .dl-share, .audit-entry, .profile-hero, .profile-menu-panel,
.account-admin-panel, .account-switch-card, .switch-current, .search-suggest,
.card-menu, .modal, .sheet {
  border-radius: 26px !important;
}
.modal, .sheet { border-radius: 28px !important; }
.toast { border-radius: 18px !important; }
.install-bar { border-radius: 22px !important; }
.tabbar { border-radius: 24px !important; }


/* 话术卡片一级操作：复制 / 编辑 / 删除直接显示 */
.card-foot { gap: 7px; }
.card-meta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
.card-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}
.card-action {
  width: 27px !important;
  height: 27px !important;
  min-height: 27px;
  padding: 0 !important;
  justify-content: center;
  border-radius: 9px !important;
}
.card-action svg { width: 14px; height: 14px; }
.card-action.card-delete { color: #b0625c; background: #fdf5f3; border-color: rgba(176,98,92,.12); }
.card-action.card-delete:hover { color: #a04d46; background: #fbecea; border-color: rgba(176,98,92,.22); }

@media (max-width: 640px) {
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .card { aspect-ratio: auto !important; min-height: 148px; }
  .card .preview, .card .tags { display: none !important; }
  .card .card-foot {
    display: flex !important;
    padding-top: 6px;
    margin-top: auto;
    border-top: 1px dashed rgba(35,58,47,.07);
    min-height: 29px;
  }
  .card .card-meta { display: none !important; }
  .card .card-actions { width: 100%; justify-content: space-between; gap: 3px; }
  .card .card-action { width: 25px !important; height: 25px !important; }
  .card .card-action svg { width: 13px; height: 13px; }
}


/* 右上角账号菜单：锚定账号胶囊的自然下拉 */
.account-chip {
  gap: 10px !important;
  padding: 5px 11px 5px 5px !important;
  max-width: 170px !important;
}
.account-chip-copy { gap: 1px; }
.account-chip-copy strong { font-size: 12.5px !important; max-width: 58px !important; }
.account-chip-copy small { display: none !important; }
.account-chip-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: 0 !important;
  transition: transform .18s ease;
}
.account-chip.open .account-chip-chevron { transform: rotate(180deg); }

.account-menu {
  position: fixed;
  z-index: 85;
  width: 288px;
  max-width: calc(100vw - 24px);
  padding: 9px;
  border-radius: 22px;
  background: #fffefa;
  border: 1px solid rgba(255,255,255,.98);
  box-shadow: 0 24px 64px rgba(66,64,52,.18), 0 4px 14px rgba(66,64,52,.07), inset 0 1px 0 #fff;
  opacity: 0;
  transform: translateY(-6px) scale(.985);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity .16s ease, transform .16s cubic-bezier(.2,.75,.3,1);
}
.account-menu.open { opacity: 1; transform: none; pointer-events: auto; }
.account-menu[hidden] { display: none !important; }
.account-menu-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 9px 11px;
  min-width: 0;
}
.account-menu-avatar {
  position: relative;
  overflow: hidden;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 14px;
  font-size: 14px;
  background: #e8f2eb;
  color: #34705a;
}
.account-menu-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.account-menu-user { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.account-menu-user strong {
  font-size: 14px;
  line-height: 1.25;
  color: #26352d;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-menu-user span {
  font-size: 11px;
  line-height: 1.4;
  color: #8b9189;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-menu-sep { height: 1px; margin: 2px 8px 7px; background: rgba(45,60,50,.075); }
.account-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #39473f;
  font-size: 12.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background .16s ease, color .16s ease;
}
.account-menu-item svg { width: 17px; height: 17px; flex: none; color: #84948a; }
.account-menu-item:hover { background: #f2f5ef; color: #1e392c; }
.account-menu-item:hover svg { color: #4e7862; }
.account-menu-item.danger { color: #a35a52; margin-top: 2px; }
.account-menu-item.danger svg { color: #bd837c; }
.account-menu-item.danger:hover { background: #fbefed; color: #9b4840; }
.account-menu-item.danger:hover svg { color: #aa5b52; }

@media (max-width: 760px) {
  .account-chip { max-width: none !important; padding: 4px !important; }
  .account-menu { width: min(300px, calc(100vw - 24px)); }
}


@media (max-width: 760px) {
  .account-chip {
    width: 46px !important;
    height: 46px;
    min-width: 46px;
    padding: 4px !important;
    gap: 0 !important;
    justify-content: center;
    border-radius: 50% !important;
  }
  .account-chip-copy,
  .account-chip-chevron { display: none !important; }
  .account-chip .top-avatar { width: 38px; height: 38px; }
}


/* 右上角账号入口改为正圆，不再使用椭圆胶囊 */
.account-chip {
  width: 44px !important;
  height: 44px;
  min-width: 44px;
  padding: 4px !important;
  gap: 0 !important;
  justify-content: center;
  border-radius: 50% !important;
  max-width: none !important;
}
.account-chip-copy,
.account-chip-chevron { display: none !important; }
.account-chip .top-avatar {
  display: grid !important;
  place-items: center;
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  font-size: 12.5px;
}
.account-chip:hover { background: #fff; }
.account-chip:active { transform: scale(.96); }
@media (max-width: 760px) {
  .account-chip { width: 46px !important; height: 46px; min-width: 46px; padding: 4px !important; }
  .account-chip .top-avatar { width: 38px !important; height: 38px !important; }
}


/* 手机输入框聚焦：稳定视口，避免键盘弹出时整页闪烁 */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { overscroll-behavior-y: none; }
@media (max-width: 640px) {
  .app, .workspace, .login {
    min-height: 100dvh !important; /* 旧浏览器回退 */
    min-height: 100svh !important;
  }
  .modal {
    max-height: calc(100dvh - 24px) !important;
    max-height: calc(100svh - 24px) !important;
    contain: none !important;
    will-change: auto !important;
  }
  .sheet {
    height: calc(100dvh - 20px) !important;
    height: calc(100svh - 20px) !important;
    max-height: calc(100dvh - 20px) !important;
    max-height: calc(100svh - 20px) !important;
    contain: none !important;
    will-change: auto !important;
  }
  .tabbar {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    background: rgba(255, 254, 250, .97) !important;
  }
  .search-suggest {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    background: #fffefa !important;
  }
  .field input, .field select, .field textarea,
  .searchbox input, .audit-toolbar input, .audit-toolbar select,
  .cat-add input, .variant-row-head input, .variant-row textarea,
  input[type="search"], input[type="text"], input[type="password"], textarea {
    font-size: 16px !important;
  }
  .field input, .field select, .field textarea, .searchbox input {
    transition: none !important;
  }
  .field input:focus, .field select:focus, .field textarea:focus,
  .searchbox input:focus {
    box-shadow: none !important;
    border-color: rgba(104, 120, 190, .30) !important;
  }
  .searchbox:focus-within {
    box-shadow: 0 0 0 3px rgba(104, 120, 190, .07) !important;
  }

}


/* ==================================================================
   话术分类：自定义分类 + 内联展开动画
   ================================================================== */
.category-field { margin-bottom: 16px; }
.category-picker { width: fit-content; max-width: 100%; }
.category-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 48px;
  max-width: 100%;
  padding: 0 15px 0 16px;
  border: 1px solid rgba(39, 70, 54, .09);
  border-radius: 15px;
  background: #fbfdfb;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.category-trigger:hover { background: #fff; border-color: rgba(100, 119, 210, .22); }
.category-trigger:focus-visible { outline: none; border-color: rgba(100, 119, 210, .42); box-shadow: 0 0 0 3px rgba(100, 119, 210, .09); }
.category-trigger-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.category-trigger-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  flex: none;
  color: #8a9488;
  transition: transform .24s cubic-bezier(.2, .75, .3, 1), color .18s ease;
}
.category-trigger-chevron svg { width: 14px; height: 14px; transform: rotate(90deg); transition: transform .24s cubic-bezier(.2, .75, .3, 1); }
.category-picker.open .category-trigger-chevron { color: #6574bd; }
.category-picker.open .category-trigger-chevron svg { transform: rotate(-90deg); }

.category-options {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  margin-top: 0;
  transition: grid-template-rows .28s cubic-bezier(.2, .75, .3, 1), opacity .18s ease, margin-top .28s ease;
}
.category-picker.open .category-options {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 9px;
}
.category-options-inner { min-height: 0; overflow: hidden; }
.category-option-list { display: flex; flex-wrap: wrap; gap: 7px; padding: 3px 0 11px; }
.category-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(39, 70, 54, .08);
  border-radius: 12px;
  background: #f7faf6;
  color: #5d6b62;
  font-size: 12px;
  font-weight: 600;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}
.category-option:hover { background: #fff; border-color: rgba(100, 119, 210, .2); transform: translateY(-1px); }
.category-option.active { background: #eef1fb; border-color: rgba(100, 119, 210, .25); color: #5366c4; }
.category-check { display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px; }
.category-check svg { width: 12px; height: 12px; }

.category-add-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px dashed rgba(39, 70, 54, .08);
}
.category-add-row input {
  flex: 1;
  min-width: 0;
  height: 38px !important;
  padding: 0 12px !important;
  border: 1px solid rgba(39, 70, 54, .09) !important;
  border-radius: 12px !important;
  background: #fff !important;
  font-size: 12.5px !important;
}
.category-add-row input:focus { border-color: rgba(100, 119, 210, .38) !important; box-shadow: 0 0 0 3px rgba(100, 119, 210, .08) !important; }
.category-add-row .mini-btn { height: 38px; padding: 0 14px; flex: none; border-radius: 12px; }

@media (max-width: 640px) {
  .category-trigger { min-height: 46px; font-size: 16px; }
  .category-option { min-height: 38px; font-size: 13px; }
  .category-add-row input { font-size: 16px !important; height: 42px !important; }
  .category-add-row .mini-btn { height: 42px; }
}


/* 分类重命名 */
.category-manage-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 9px;
  margin-top: 2px;
  border-top: 1px dashed rgba(39, 70, 54, .08);
}
.category-manage-row .mini-btn { flex: none; height: 34px; padding: 0 12px; border-radius: 11px; }
.category-manage-hint { font-size: 10.5px; color: #9a9d96; }
.category-rename-panel {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  padding-top: 9px;
  border-top: 1px dashed rgba(39, 70, 54, .08);
}
.category-rename-panel[hidden] { display: none !important; }
.category-rename-panel input {
  flex: 1;
  min-width: 0;
  height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(39, 70, 54, .09);
  border-radius: 12px;
  background: #fff;
  font-size: 12.5px;
}
.category-rename-panel input:focus { outline: none; border-color: rgba(100, 119, 210, .38); box-shadow: 0 0 0 3px rgba(100, 119, 210, .08); }
.category-rename-panel .mini-btn { flex: none; height: 38px; padding: 0 12px; border-radius: 11px; }
@media (max-width: 640px) {
  .category-manage-row { flex-wrap: wrap; }
  .category-manage-hint { font-size: 10px; }
  .category-rename-panel input { font-size: 16px; height: 42px; }
  .category-rename-panel .mini-btn { height: 42px; }
}


/* 我的页面：顶部只保留标题，隐藏右侧账号菜单等选项 */
body.view-profile .topbar { grid-template-columns: 1fr !important; }
body.view-profile .topbar-actions { display: none !important; }


/* 话术卡片只展示内容，不再显示标题 */
.card-content {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #33443a;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
@media (max-width: 640px) {
  .card-content {
    font-size: 12px;
    line-height: 1.55;
    -webkit-line-clamp: 5;
  }
}


/* 我的页面：账号名称编辑 */
.profile-hero-main .p-name {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.profile-name-edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  border: 1px solid rgba(39, 70, 54, .08);
  background: #f7faf6;
  color: #65776c;
  flex: none;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.profile-name-edit svg { width: 14px; height: 14px; }
.profile-name-edit:hover { background: #eef6f1; color: #3f7a5f; border-color: rgba(100,119,210,.18); }
@media (max-width: 640px) {
  .profile-name-edit { width: 30px; height: 30px; }
}


/* 详情页：其他方案展示在主话术下方 */
.detail-other-variants {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px dashed rgba(39, 70, 54, .10);
}
.detail-other-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.detail-other-head strong {
  font-size: 13px;
  color: #52675a;
  letter-spacing: .02em;
}
.detail-other-head span {
  font-size: 10px;
  color: #9aa29a;
}
.detail-variant-card {
  margin-top: 10px;
  padding: 14px 16px;
  border-radius: 18px;
  background: #fbfcf8;
  border: 1px solid rgba(39, 70, 54, .07);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}
.detail-variant-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.detail-variant-head strong {
  font-size: 12.5px;
  color: #334f3e;
}
.detail-variant-head .mini-btn {
  height: 30px;
  padding: 0 9px;
  border-radius: 9px;
  font-size: 10.5px;
  flex: none;
}
.detail-variant-head .mini-btn svg { width: 13px; height: 13px; }
.detail-variant-content {
  color: #42564a;
  font-size: 13px;
  line-height: 1.9;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
@media (max-width: 640px) {
  .detail-other-variants { margin-top: 20px; padding-top: 15px; }
  .detail-variant-card { padding: 12px 13px; border-radius: 16px; }
  .detail-variant-content { font-size: 13px; line-height: 1.85; }
}


/* ==================================================================
   账号管理 / 我的页面调整
   ================================================================== */
.profile-grid-single { grid-template-columns: 1fr !important; }
.profile-grid-single > div { width: 100%; }
.password-panel { margin-bottom: 18px; }
.password-panel .pw-form { max-width: 520px; }
.account-admin-panel { margin-top: 0; }
.account-self-panel { margin-top: 0; }
.account-self-panel .account-inline-switch { margin-top: 18px; }
.admin-only { display: block; }
body:not(.is-admin) .admin-only { display: none !important; }

/* 账号操作按钮：轻量展开 + 悬停展示 */
@keyframes action-in {
  from { opacity: 0; transform: translateY(5px) scale(.97); }
  to { opacity: 1; transform: none; }
}
.user-actions .mini-btn {
  animation: action-in .28s cubic-bezier(.2,.75,.3,1) both;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}
.user-actions .mini-btn:nth-child(2) { animation-delay: .035s; }
.user-actions .mini-btn:nth-child(3) { animation-delay: .07s; }
.user-actions .mini-btn:nth-child(4) { animation-delay: .105s; }
.user-actions .mini-btn:hover {
  transform: translateY(-1px) scale(1.025);
  box-shadow: 0 7px 16px rgba(55, 91, 72, .10);
}
.profile-menu-row {
  animation: action-in .3s cubic-bezier(.2,.75,.3,1) both;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.profile-menu-row:nth-child(2) { animation-delay: .04s; }
.profile-menu-row:nth-child(3) { animation-delay: .08s; }
.profile-menu-row:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(55, 91, 72, .07); }
.profile-menu-row:hover .profile-menu-icon { transform: scale(1.04); }
.profile-menu-icon { transition: transform .2s ease; }
.audit-toolbar .btn, .dl-actions .btn, .sheet-actions .icon-action {
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}
.audit-toolbar .btn:hover, .dl-actions .btn:hover, .sheet-actions .icon-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 16px rgba(55, 91, 72, .10);
}

/* ==================================================================
   修改记录：更清晰、更留白、可展开详情
   ================================================================== */
.audit-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 12px;
}
.audit-search-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}
.audit-search-wrap > svg {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  color: #9aa49d;
  pointer-events: none;
}
.audit-search-wrap input {
  width: 100%;
  height: 46px;
  padding: 0 15px 0 40px !important;
  border: 1px solid rgba(35,58,47,.08) !important;
  border-radius: 15px !important;
  background: rgba(255,255,255,.88) !important;
  color: #2e4036;
  font-size: 12.5px;
}
.audit-search-wrap input::placeholder { color: #a1aaa3; }
.audit-search-wrap input:focus {
  border-color: rgba(100,119,210,.35) !important;
  box-shadow: 0 0 0 3px rgba(100,119,210,.07) !important;
}
.audit-toolbar .btn { height: 44px; flex: none; }
.audit-summary { margin: 4px 2px 14px; font-size: 11px; color: #8f9991; }
.audit-list { display: flex; flex-direction: column; gap: 12px; }
.audit-entry {
  padding: 16px 18px !important;
  border-radius: 20px !important;
  background: rgba(255,255,255,.82) !important;
  border: 1px solid rgba(255,255,255,.95) !important;
  box-shadow: 0 8px 26px rgba(48, 72, 59, .055) !important;
  animation: audit-entry-in .34s cubic-bezier(.2,.75,.3,1) both;
  animation-delay: calc(var(--i, 0) * 28ms);
}
@keyframes audit-entry-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: none; }
}
.audit-entry-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.audit-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 23px;
  padding: 0 9px;
  border-radius: 8px;
  font-size: 10.5px;
  font-weight: 700;
  flex: none;
}
.audit-entry-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.audit-entry-copy strong {
  color: #25382d;
  font-size: 13px;
  line-height: 1.55;
  font-weight: 650;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.audit-entry-copy span { color: #939d96; font-size: 10.5px; }
.audit-time { flex: none; margin-left: 8px; color: #9ba39d; font-size: 10px; white-space: nowrap; }
.audit-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.audit-chip {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 0 9px;
  border-radius: 8px;
  background: #f4f7f2;
  border: 1px solid rgba(58, 86, 66, .06);
  color: #748078;
  font-size: 10.5px;
}
.audit-details {
  margin-top: 11px;
  border-top: 1px dashed rgba(35,58,47,.08);
  padding-top: 9px;
}
.audit-details summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #6b7d71;
  font-size: 11px;
  font-weight: 600;
  user-select: none;
}
.audit-details summary::-webkit-details-marker { display: none; }
.audit-details summary::before {
  content: "›";
  display: inline-block;
  font-size: 15px;
  line-height: 1;
  color: #96a39a;
  transition: transform .2s ease;
}
.audit-details[open] summary::before { transform: rotate(90deg); }
.audit-details-body { margin-top: 8px; animation: audit-details-in .22s ease both; }
@keyframes audit-details-in {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: none; }
}
.audit-change {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 16px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px dashed rgba(35,58,47,.06);
  font-size: 11.5px;
  line-height: 1.55;
}
.audit-change:last-child { border-bottom: 0; }
.audit-change.content { display: block; }
.audit-field { color: #89958c; }
.audit-old, .audit-new { overflow-wrap: anywhere; }
.audit-old { color: #b56862; }
.audit-new { color: #3f8262; }
.audit-arrow { color: #a9b1ab; text-align: center; }
.audit-diff {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 6px;
  padding: 8px;
  max-height: 220px;
  overflow: auto;
  border-radius: 11px;
  background: #f7faf7;
  border: 1px solid rgba(35,58,47,.06);
}
.audit-diff span {
  padding: 1px 5px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.audit-snapshot {
  display: grid;
  gap: 7px;
  margin-top: 7px;
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px dashed rgba(35,58,47,.12);
  color: #6d7d73;
  font-size: 11.5px;
  line-height: 1.65;
}
.audit-snapshot div { display: flex; align-items: flex-start; gap: 8px; }
.audit-snapshot span { flex: 0 0 36px; color: #9aa49d; }
.audit-snapshot em { font-style: normal; overflow-wrap: anywhere; }
.audit-more-wrap { display: flex; justify-content: center; padding: 18px 0 8px; }
@media (max-width: 640px) {
  .audit-toolbar { gap: 7px; }
  .audit-search-wrap input { height: 44px; font-size: 16px; }
  .audit-toolbar .btn { height: 44px; padding: 0 13px; }
  .audit-entry { padding: 14px 14px !important; border-radius: 17px !important; }
  .audit-entry-head { flex-wrap: wrap; gap: 7px; }
  .audit-entry-copy { flex: 1 1 calc(100% - 56px); }
  .audit-time { width: 100%; margin-left: 0; order: 3; }
  .audit-entry-copy strong { font-size: 12.5px; -webkit-line-clamp: 3; }
  .audit-change { grid-template-columns: 50px minmax(0, 1fr); gap: 3px 7px; }
  .audit-arrow { display: none; }
  .audit-new { grid-column: 2; }
  .audit-diff { max-height: 180px; }
}


/* 修改记录筛选：时间范围 + 操作类型 */
.audit-filters {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(250, 251, 247, .82);
  border: 1px solid rgba(35, 58, 47, .055);
  animation: action-in .28s cubic-bezier(.2,.75,.3,1) both;
}
.audit-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  color: #89958c;
  font-size: 11px;
  white-space: nowrap;
}
.audit-filter > span { flex: none; }
.audit-filter input[type="date"],
.audit-filter select {
  height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(35, 58, 47, .08);
  border-radius: 10px;
  background: #fff;
  color: #3b4c42;
  font-size: 11.5px;
  outline: none;
}
.audit-filter input[type="date"]:focus,
.audit-filter select:focus {
  border-color: rgba(100, 119, 210, .35);
  box-shadow: 0 0 0 3px rgba(100, 119, 210, .07);
}
.audit-date-range { gap: 6px; }
.audit-date-range em { font-style: normal; color: #a4ada6; }
.audit-filter-clear { height: 36px; padding: 0 12px; margin-left: auto; border-radius: 11px; }
@media (max-width: 640px) {
  .audit-filters { align-items: stretch; gap: 9px; padding: 10px; }
  .audit-filter { width: 100%; flex-wrap: wrap; white-space: normal; }
  .audit-filter > span { width: 100%; }
  .audit-date-range input { flex: 1; min-width: 0; }
  .audit-filter select { width: 100%; }
  .audit-filter input[type="date"], .audit-filter select { height: 42px; font-size: 16px; }
  .audit-filter-clear { width: 100%; margin-left: 0; height: 42px; }
}


/* 切换账号：保留已登录账号 */
.switch-saved {
  margin-bottom: 16px;
  padding: 10px;
  border-radius: 18px;
  background: #f7faf6;
  border: 1px solid rgba(39,70,54,.06);
}
.switch-saved-title {
  padding: 2px 6px 8px;
  color: #7b8a80;
  font-size: 10.5px;
  letter-spacing: .02em;
}
.switch-saved-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 8px;
  border-radius: 13px;
  background: #fff;
  border: 1px solid rgba(39,70,54,.055);
  color: #334a3b;
  text-align: left;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.switch-saved-row + .switch-saved-row { margin-top: 5px; }
.switch-saved-row:hover { transform: translateY(-1px); box-shadow: 0 7px 18px rgba(55,91,72,.08); background: #fffefa; }
.switch-saved-avatar { width: 34px; height: 34px; flex: none; border-radius: 11px; font-size: 12px; background: #e8f2eb; color: #34705a; }
.switch-saved-copy { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.switch-saved-copy strong { font-size: 12.5px; color: #26382d; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.switch-saved-copy small { font-size: 10.5px; color: #8b9891; }
.switch-saved-arrow { color: #9aa89f; font-size: 18px; }
.switch-saved-hint { padding: 8px 6px 2px; color: #9ba49e; font-size: 10px; }
.switch-other-title { margin: 3px 0 9px; color: #7c8b81; font-size: 11px; font-weight: 600; }


/* ==================================================================
   手机输入法：稳定布局，减少键盘弹出时的重绘
   ================================================================== */
@media (max-width: 640px) {
  html, body { background-attachment: scroll !important; }
  .app, .workspace, .login { min-height: 100vh !important; }
  .modal { max-height: calc(100vh - 24px) !important; }
  .sheet {
    height: calc(100vh - 20px) !important;
    max-height: calc(100vh - 20px) !important;
  }
  .account-chip, .login-card, .topbar, .tabbar, .panel, .card, .modal, .sheet, .audit-entry,
  .search-suggest, .profile-hero {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
  /* 键盘打开时停止入场/悬停动画，避免重绘闪烁 */
  body.keyboard-open *,
  body.keyboard-open *::before,
  body.keyboard-open *::after {
    animation-duration: .001ms !important;
    animation-delay: 0ms !important;
    transition-duration: .001ms !important;
    transition-delay: 0ms !important;
  }

}

/* ==================================================================
   一级/二级/三级界面统一入场与展开效果
   ================================================================== */
@keyframes ui-reveal {
  from { opacity: 0; transform: translateY(8px) scale(.992); }
  to { opacity: 1; transform: none; }
}
@keyframes ui-reveal-soft {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}
.view-enter > .panel,
.view-enter > .profile-hero-panel,
.view-enter > .profile-grid,
.view-enter > .dl-head,
.view-enter > .dl-grid > *,
.view-enter > .audit-toolbar,
.view-enter > .audit-filters,
.view-enter > .empty {
  animation: ui-reveal .34s cubic-bezier(.2,.75,.3,1) both;
}
.view-enter > .card-grid > .card {
  animation: ui-reveal .34s cubic-bezier(.2,.75,.3,1) both;
  animation-delay: calc(var(--i, 0) * 22ms);
}
.view-enter > .account-admin-panel .user-row {
  animation: ui-reveal-soft .3s cubic-bezier(.2,.75,.3,1) both;
}
.view-enter > .account-admin-panel .user-row:nth-child(2) { animation-delay: .025s; }
.view-enter > .account-admin-panel .user-row:nth-child(3) { animation-delay: .05s; }
.view-enter > .account-admin-panel .user-row:nth-child(4) { animation-delay: .075s; }
.view-enter > .account-admin-panel .user-row:nth-child(5) { animation-delay: .1s; }

.layer.open .modal-body > .field,
.layer.open .modal-body > .form-row,
.layer.open .modal-body > .variant-editor,
.layer.open .modal-body > .form-actions,
.layer.open .modal-body > .category-field {
  animation: ui-reveal-soft .28s cubic-bezier(.2,.75,.3,1) both;
}
.layer.open .modal-body > .field:nth-child(2),
.layer.open .modal-body > .form-row:nth-child(3) { animation-delay: .035s; }
.layer.open .sheet-body > .detail-content,
.layer.open .sheet-body > .detail-meta,
.layer.open .sheet-body > .detail-tags,
.layer.open .sheet-body > .detail-other-variants {
  animation: ui-reveal-soft .3s cubic-bezier(.2,.75,.3,1) both;
}
.layer.open .sheet-actions { animation: ui-reveal-soft .28s .04s cubic-bezier(.2,.75,.3,1) both; }


/* 话术详情打开/关闭动画 */
.sheet {
  transform: translateX(calc(100% + 22px)) scale(.985) !important;
  opacity: .35;
  filter: blur(2px);
  transition:
    transform .36s cubic-bezier(.16, 1, .3, 1),
    opacity .24s ease,
    filter .24s ease !important;
}
.layer.open .sheet {
  transform: none !important;
  opacity: 1;
  filter: none;
}

/* 我的页面：直接显示打开方式 */
.profile-open-methods { margin-top: 0; }
.profile-open-body { display: grid; gap: 10px; margin-top: 10px; }
.profile-open-loading { color: #9aa39d; font-size: 11.5px; padding: 4px 0; }
.profile-open-card {
  padding: 14px;
  border-radius: 18px;
  background: #fafcf8;
  border: 1px solid rgba(39,70,54,.065);
  animation: ui-reveal-soft .3s cubic-bezier(.2,.75,.3,1) both;
}
.profile-open-head { display: flex; align-items: center; gap: 10px; }
.profile-open-icon {
  width: 36px; height: 36px; flex: none;
  display: grid; place-items: center;
  border-radius: 12px;
  background: #eaf4ee; color: #3d7b60;
}
.profile-open-icon.desktop { background: #eef0fa; color: #596bc4; }
.profile-open-icon svg { width: 17px; height: 17px; }
.profile-open-head strong { display: block; font-size: 12.5px; color: #2d4135; }
.profile-open-head small { display: block; margin-top: 2px; font-size: 10.5px; color: #8e9b92; }
.profile-open-url {
  margin: 10px 0 9px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid rgba(39,70,54,.055);
  color: #5d7265;
  font-size: 10.5px;
  overflow-wrap: anywhere;
}
.profile-open-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.profile-open-actions .btn { height: 38px; padding: 0 13px; border-radius: 11px; font-size: 11px; }
.profile-open-hint { margin-top: 8px; color: #9aa49d; font-size: 10px; line-height: 1.55; }
@media (max-width: 640px) {
  html, body { min-height: 100vh; }
  .sheet { transform: translateY(calc(100% + 24px)) !important; filter: none; }
  .layer.open .sheet { transform: none !important; }
  .profile-open-actions .btn { flex: 1 1 auto; }
}


/* ==================================================================
   手机输入法：固定应用外壳，只让内容区域滚动
   键盘弹出时页面主体不再整体位移
   ================================================================== */
@media (max-width: 640px) {
  html, body {
    height: 100%;
    min-height: 0;
    overflow: hidden !important;
    overscroll-behavior: none;
  }
  #appView.app {
    position: fixed !important;
    inset: 0 !important;
    height: 100vh !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }
  #appView .workspace {
    height: 100vh !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }
  #appView .topbar {
    position: relative !important;
    top: auto !important;
    flex: 0 0 auto;
  }
  #appView .content {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  #loginView.login {
    position: fixed !important;
    inset: 0 !important;
    height: 100vh !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  body.keyboard-open #appView .topbar,
  body.keyboard-open #loginView .login-card {
    transform: none !important;
  }
}


/* 我的身份卡右侧账号管理 */
.profile-hero-manage {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 11px;
  border: 1px solid rgba(39,70,54,.08);
  background: rgba(255,255,255,.72);
  color: #547361;
  font-size: 11px;
  font-weight: 600;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.profile-hero-manage span { font-size: 16px; line-height: 1; color: #84978a; }
.profile-hero-manage:hover { transform: translateY(-1px); background: #fff; box-shadow: 0 7px 18px rgba(55,91,72,.08); }
@media (max-width: 640px) {
  .profile-hero-manage { margin-left: auto; }
}

/* 打开方式卡片间隔 */
.profile-open-methods + .profile-menu-panel { margin-top: 16px; }
.profile-open-body { gap: 14px; }
.profile-open-card + .profile-open-card { margin-top: 4px; }
.profile-open-card .profile-open-actions { margin-top: 13px; }
.profile-open-card .profile-open-head + .profile-open-url { margin-top: 12px; }
.dl-card .dl-meta { margin-top: 12px; margin-bottom: 12px; }
.dl-card .dl-actions { margin-top: 14px; }
.dl-card .dl-url { margin-top: 12px; }


/* 手机搜索框：像素级稳定，避免焦点切换触发大范围重绘 */
@media (max-width: 640px) {
  .searchbox,
  .searchbox:focus-within {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    background: #fffefa !important;
    box-shadow: none !important;
    transition: none !important;
  }
  .searchbox:focus-within {
    border-color: rgba(104, 120, 190, .28) !important;
  }
  .searchbox input,
  .searchbox input:focus {
    transition: none !important;
    box-shadow: none !important;
  }
}


/* ==================================================================
   MOTION SYSTEM v2
   统一、柔和、克制的交互节奏：页面只淡入，列表轻微上浮，
   弹层只做一次过渡，按钮只保留悬停/按下反馈。
   ================================================================== */
:root {
  --m-ease-soft: cubic-bezier(.22,.61,.36,1);
  --m-ease-out: cubic-bezier(.16,1,.3,1);
  --m-fast: 160ms;
  --m-base: 240ms;
  --m-slow: 320ms;
}

/* 1. 清掉旧的重复入场动画，避免多层动画同时抢注意力 */
.user-actions .mini-btn,
.profile-menu-row,
.audit-toolbar .btn,
.dl-actions .btn,
.sheet-actions .icon-action,
.audit-filters,
.profile-open-card,
.card,
.audit-entry,
.layer.open .modal-body > *,
.layer.open .sheet-body > *,
.layer.open .sheet-actions {
  animation: none !important;
}

/* 2. 一级页面：只做一次很轻的淡入 */
.content.view-enter {
  animation: m-page-fade 220ms var(--m-ease-soft) both !important;
}
@keyframes m-page-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.topbar-title.title-enter h1 {
  animation: m-title-in 240ms var(--m-ease-out) both !important;
}
.topbar-title.title-enter p {
  animation: m-title-in 260ms 16ms var(--m-ease-out) both !important;
}
@keyframes m-title-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

/* 3. 卡片/列表：一次性轻微上浮，18ms 一组错开 */
.view-enter .card-grid > .card,
.view-enter .audit-list > .audit-entry,
.view-enter .account-admin-panel .user-row,
.view-enter .dl-grid > .dl-card,
.view-enter .profile-open-card {
  animation: m-item-in 260ms var(--m-ease-soft) both !important;
}
.view-enter .card-grid > .card:nth-child(2),
.view-enter .audit-list > .audit-entry:nth-child(2),
.view-enter .account-admin-panel .user-row:nth-child(2),
.view-enter .dl-grid > .dl-card:nth-child(2),
.view-enter .profile-open-card:nth-child(2) { animation-delay: 18ms !important; }
.view-enter .card-grid > .card:nth-child(3),
.view-enter .audit-list > .audit-entry:nth-child(3),
.view-enter .account-admin-panel .user-row:nth-child(3),
.view-enter .profile-open-card:nth-child(3) { animation-delay: 36ms !important; }
.view-enter .card-grid > .card:nth-child(4),
.view-enter .audit-list > .audit-entry:nth-child(4),
.view-enter .account-admin-panel .user-row:nth-child(4) { animation-delay: 54ms !important; }
.view-enter .card-grid > .card:nth-child(5),
.view-enter .audit-list > .audit-entry:nth-child(5),
.view-enter .account-admin-panel .user-row:nth-child(5) { animation-delay: 72ms !important; }
.view-enter .card-grid > .card:nth-child(6),
.view-enter .audit-list > .audit-entry:nth-child(6) { animation-delay: 90ms !important; }
@keyframes m-item-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* 4. 按钮/卡片：只保留自然的悬停和按下 */
.btn, .mini-btn, .icon-btn, .copy-mini, .copy,
.tab, .nav-item, .profile-menu-row, .account-menu-item,
.switch-saved-row, .profile-hero-manage, .audit-filter-clear,
.audit-toolbar .btn, .dl-actions .btn, .sheet-actions .icon-action {
  transition:
    transform var(--m-fast) var(--m-ease-soft),
    box-shadow var(--m-fast) var(--m-ease-soft),
    background-color var(--m-fast) var(--m-ease-soft),
    border-color var(--m-fast) var(--m-ease-soft),
    color var(--m-fast) var(--m-ease-soft) !important;
}
.card {
  transition:
    transform var(--m-fast) var(--m-ease-soft),
    box-shadow var(--m-fast) var(--m-ease-soft),
    border-color var(--m-fast) var(--m-ease-soft) !important;
}
@media (hover: hover) {
  .btn:hover, .mini-btn:hover, .icon-btn:hover, .copy-mini:hover,
  .account-menu-item:hover, .switch-saved-row:hover,
  .profile-hero-manage:hover, .audit-filter-clear:hover {
    transform: translateY(-1px);
  }
  .profile-menu-row:hover { transform: translateY(-1px); }
  .card:hover { transform: translateY(-2px); }
}
.btn:active, .mini-btn:active, .icon-btn:active, .copy-mini:active,
.tab:active, .nav-item:active, .profile-menu-row:active,
.account-menu-item:active, .switch-saved-row:active,
.profile-hero-manage:active, .audit-filter-clear:active {
  transform: translateY(0) scale(.975) !important;
  transition-duration: 90ms !important;
}
.card:active { transform: scale(.997) !important; }

/* 5. 弹窗和抽屉：一次干净的开合动画 */
.layer .backdrop { transition: opacity 220ms var(--m-ease-soft) !important; }
.modal {
  transition: opacity 200ms var(--m-ease-soft), transform 260ms var(--m-ease-out) !important;
}
.layer.open .modal-body {
  animation: m-pop-content 220ms 30ms var(--m-ease-soft) both !important;
}
@keyframes m-pop-content {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}
.layer .sheet {
  transform: translateX(calc(100% + 18px)) !important;
  opacity: 0;
  filter: none !important;
  transition: transform var(--m-slow) var(--m-ease-out), opacity 220ms var(--m-ease-soft) !important;
}
.layer.open .sheet { transform: translateX(0) !important; opacity: 1; }
.layer.open .sheet-body {
  animation: m-sheet-content 240ms 35ms var(--m-ease-soft) both !important;
}
@keyframes m-sheet-content {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}
@media (max-width: 640px) {
  .layer .sheet {
    transform: translateY(calc(100% + 18px)) !important;
    transition: transform 300ms var(--m-ease-out), opacity 200ms var(--m-ease-soft) !important;
  }
  .layer.open .sheet { transform: translateY(0) !important; }
  .layer.open .sheet-body {
    animation-duration: 210ms !important;
    animation-delay: 20ms !important;
  }
  .layer.open .modal-body { animation-duration: 200ms !important; }
}

/* 6. 下拉、搜索建议、分类展开 */
.account-menu {
  transition: opacity 180ms var(--m-ease-soft), transform 200ms var(--m-ease-out) !important;
}
.search-suggest {
  animation: m-pop-in 180ms var(--m-ease-out) both !important;
  transform-origin: top center;
}
@keyframes m-pop-in {
  from { opacity: 0; transform: translateY(-4px) scale(.995); }
  to { opacity: 1; transform: none; }
}
.category-options {
  transition:
    grid-template-rows 260ms var(--m-ease-soft),
    opacity 200ms var(--m-ease-soft),
    margin-top 260ms var(--m-ease-soft) !important;
}

/* 7. 展开详情 */
.audit-details summary::before {
  transition: transform 180ms var(--m-ease-out) !important;
}
.audit-details-body {
  animation: m-detail-in 170ms var(--m-ease-soft) both !important;
}
@keyframes m-detail-in {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: none; }
}

/* 8. 手机键盘打开时，停止所有入场动画，保住固定视口与搜索框稳定 */
@media (max-width: 640px) {
  body.keyboard-open .content,
  body.keyboard-open .content *,
  body.keyboard-open .layer * {
    animation: none !important;
    transition: none !important;
  }
  body.keyboard-open .content.view-enter,
  body.keyboard-open .content.view-enter .card,
  body.keyboard-open .content.view-enter .audit-entry,
  body.keyboard-open .content.view-enter .user-row,
  body.keyboard-open .content.view-enter .dl-card,
  body.keyboard-open .content.view-enter .profile-open-card,
  body.keyboard-open .topbar-title.title-enter h1,
  body.keyboard-open .topbar-title.title-enter p,
  body.keyboard-open .layer.open .modal-body,
  body.keyboard-open .layer.open .sheet-body {
    animation: none !important;
  }
  /* 即使 JS 焦点类尚未加上，也通过 :has 立即冻结动画，避免键盘弹出时闪动 */
  body:has(input:focus, textarea:focus, select:focus) .content,
  body:has(input:focus, textarea:focus, select:focus) .content *,
  body:has(input:focus, textarea:focus, select:focus) .layer * {
    animation: none !important;
    transition-duration: 0s !important;
  }
}

/* 9. 减少动态偏好 */
@media (prefers-reduced-motion: reduce) {
  .content.view-enter,
  .view-enter .card-grid > .card,
  .view-enter .audit-list > .audit-entry,
  .view-enter .account-admin-panel .user-row,
  .view-enter .dl-grid > .dl-card,
  .view-enter .profile-open-card,
  .topbar-title.title-enter h1,
  .topbar-title.title-enter p,
  .layer.open .modal-body,
  .layer.open .sheet-body,
  .search-suggest,
  .audit-details-body {
    animation: none !important;
  }
}


/* ==================================================================
   MOTION v3 · 更明显的层次感，仍然只使用 opacity / transform
   ================================================================== */
:root {
  --m-fast: 180ms;
  --m-base: 280ms;
  --m-slow: 380ms;
}

.content.view-enter { animation: m-page-fade-v3 330ms var(--m-ease-out) both !important; }
@keyframes m-page-fade-v3 { from { opacity: 0; } to { opacity: 1; } }

.topbar-title.title-enter h1 { animation: m-title-v3 320ms var(--m-ease-out) both !important; }
.topbar-title.title-enter p { animation: m-title-v3 340ms 24ms var(--m-ease-out) both !important; }
@keyframes m-title-v3 {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.view-enter > .profile-hero-panel,
.view-enter .card-grid > .card,
.view-enter .audit-list > .audit-entry,
.view-enter .account-admin-panel .user-row,
.view-enter .dl-grid > .dl-card,
.view-enter .profile-open-card {
  animation: m-item-v3 360ms var(--m-ease-out) both !important;
}
.view-enter .card-grid > .card:nth-child(2),
.view-enter .audit-list > .audit-entry:nth-child(2),
.view-enter .account-admin-panel .user-row:nth-child(2),
.view-enter .dl-grid > .dl-card:nth-child(2),
.view-enter .profile-open-card:nth-child(2) { animation-delay: 32ms !important; }
.view-enter .card-grid > .card:nth-child(3),
.view-enter .audit-list > .audit-entry:nth-child(3),
.view-enter .account-admin-panel .user-row:nth-child(3),
.view-enter .profile-open-card:nth-child(3) { animation-delay: 64ms !important; }
.view-enter .card-grid > .card:nth-child(4),
.view-enter .audit-list > .audit-entry:nth-child(4),
.view-enter .account-admin-panel .user-row:nth-child(4) { animation-delay: 96ms !important; }
.view-enter .card-grid > .card:nth-child(5),
.view-enter .audit-list > .audit-entry:nth-child(5),
.view-enter .account-admin-panel .user-row:nth-child(5) { animation-delay: 128ms !important; }
.view-enter .card-grid > .card:nth-child(6),
.view-enter .audit-list > .audit-entry:nth-child(6) { animation-delay: 160ms !important; }
@keyframes m-item-v3 {
  from { opacity: 0; transform: translateY(16px) scale(.992); }
  to { opacity: 1; transform: none; }
}

@media (hover: hover) {
  .btn:hover, .mini-btn:hover, .icon-btn:hover, .copy-mini:hover,
  .profile-hero-manage:hover, .account-menu-item:hover, .switch-saved-row:hover,
  .audit-filter-clear:hover {
    transform: translateY(-2px) scale(1.012);
  }
  .card:hover { transform: translateY(-3px); }
  .profile-menu-row:hover { transform: translateY(-2px); }
}
.btn:active, .mini-btn:active, .icon-btn:active, .copy-mini:active,
.profile-hero-manage:active, .account-menu-item:active, .switch-saved-row:active,
.audit-filter-clear:active {
  transform: translateY(0) scale(.965) !important;
  transition-duration: 70ms !important;
}
.card:active { transform: scale(.995) !important; }

.layer .backdrop { transition: opacity 260ms var(--m-ease-soft) !important; }
.modal {
  transition: opacity 240ms var(--m-ease-soft), transform 320ms var(--m-ease-out) !important;
}
.layer.open .modal-body {
  animation: m-pop-v3 280ms 40ms var(--m-ease-out) both !important;
}
@keyframes m-pop-v3 {
  from { opacity: 0; transform: translateY(10px) scale(.995); }
  to { opacity: 1; transform: none; }
}

.layer .sheet {
  transform: translateX(calc(100% + 24px)) scale(.985) !important;
  opacity: 0;
  filter: none !important;
  transition: transform var(--m-slow) var(--m-ease-out), opacity 260ms var(--m-ease-soft) !important;
}
.layer.open .sheet { transform: none !important; opacity: 1; }
.layer.open .sheet-body {
  animation: m-sheet-v3 300ms 55ms var(--m-ease-out) both !important;
}
@keyframes m-sheet-v3 {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@media (max-width: 640px) {
  .layer .sheet {
    transform: translateY(calc(100% + 24px)) scale(.99) !important;
    transition: transform 340ms var(--m-ease-out), opacity 240ms var(--m-ease-soft) !important;
  }
  .layer.open .sheet { transform: translateY(0) scale(1) !important; }
  .layer.open .sheet-body {
    animation-duration: 250ms !important;
    animation-delay: 35ms !important;
  }
  .layer.open .modal-body { animation-duration: 240ms !important; }
  body.keyboard-open .content.view-enter > .profile-hero-panel { animation: none !important; }
}

.account-menu {
  transition: opacity 220ms var(--m-ease-soft), transform 240ms var(--m-ease-out) !important;
}
.search-suggest {
  animation: m-pop-v3 220ms var(--m-ease-out) both !important;
  transform-origin: top center;
}
.category-options {
  transition:
    grid-template-rows 300ms var(--m-ease-soft),
    opacity 220ms var(--m-ease-soft),
    margin-top 300ms var(--m-ease-soft) !important;
}
.audit-details-body { animation: m-detail-v3 200ms var(--m-ease-soft) both !important; }
@keyframes m-detail-v3 {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

/* 我的身份卡：修改记录入口 */
.profile-hero-audit {
  background: rgba(255,255,255,.56) !important;
  color: #687d70 !important;
  border-color: rgba(39,70,54,.07) !important;
}
@media (max-width: 640px) {
  .profile-hero-meta { gap: 7px; }
  .profile-hero-manage { height: 32px; padding: 0 10px; font-size: 10.5px; }
}


/* ==================================================================
   话术图片：原图上传、预览、详情画廊
   ================================================================== */
.image-editor {
  margin-top: 14px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(39,70,54,.07);
  background: #fafcf8;
}
.image-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.image-editor-head > div { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.image-editor-head strong { color: #2f4337; font-size: 12.5px; }
.image-editor-head > div span { color: #91a096; font-size: 10.5px; line-height: 1.35; }
.image-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: none;
  margin-left: auto;
  height: 32px;
  padding: 0 12px;
  line-height: 1;
  color: #63766a;
  font-size: 11.5px;
  vertical-align: middle;
  cursor: pointer;
}
.image-add-btn > span { color: inherit; font-size: inherit; line-height: 1; }
.image-add-btn svg { display: block; flex: none; width: 15px; height: 15px; }
.image-add-btn.uploading { opacity: .55; pointer-events: none; }
.image-readonly { color: #a1aba4; font-size: 10.5px; }
.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 9px;
  margin-top: 11px;
}
.image-thumb {
  position: relative;
  min-width: 0;
  margin: 0;
  border-radius: 13px;
  overflow: hidden;
  border: 1px solid rgba(39,70,54,.07);
  background: #fff;
  animation: m-item-v3 260ms var(--m-ease-out) both;
}
.image-thumb a { display: block; aspect-ratio: 1 / 1; background: #edf3ee; }
.image-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.image-thumb figcaption {
  padding: 6px 7px;
  color: #84928a;
  font-size: 9.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.image-remove {
  position: absolute;
  top: 5px; right: 5px;
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.9);
  background: rgba(30,45,36,.62);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  display: grid;
  place-items: center;
  backdrop-filter: blur(6px);
}
.image-remove:hover { background: rgba(160,65,55,.85); }
.image-empty {
  grid-column: 1 / -1;
  padding: 14px;
  border-radius: 12px;
  border: 1px dashed rgba(39,70,54,.13);
  color: #9ba69f;
  font-size: 10.5px;
  text-align: center;
}
.image-count { color: #6d7f72; }

.detail-images { margin-top: 16px; }
.detail-images-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.detail-images-head strong { color: #2d4135; font-size: 12px; }
.detail-images-head span { color: #97a29b; font-size: 10px; }
.detail-image-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.detail-image {
  display: block;
  border-radius: 15px;
  overflow: hidden;
  border: 1px solid rgba(39,70,54,.07);
  background: #eef4ef;
  aspect-ratio: 1 / 1;
}
.detail-image img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 260ms var(--m-ease-out); }
.detail-image:hover img { transform: scale(1.03); }

/* ==================================================================
   手机身份卡：上下分层，角色与操作对齐
   ================================================================== */
@media (max-width: 640px) {
  .profile-hero-panel { padding: 13px; }
  .profile-hero-panel .profile-hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 11px;
    align-items: center;
    padding: 14px;
    border-radius: 20px;
  }
  .profile-hero-panel .avatar-edit { grid-column: 1; grid-row: 1; }
  .profile-hero-main { grid-column: 2; grid-row: 1; min-width: 0; }
  .profile-hero-meta {
    grid-column: 1 / -1;
    grid-row: 2;
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    width: 100% !important;
    margin: 2px 0 0 !important;
    padding-top: 12px;
    border-top: 1px solid rgba(39,70,54,.075);
    justify-content: stretch !important;
  }
  .profile-hero-meta .role-chip { justify-self: start; }
  .profile-hero-manage {
    width: 100%;
    height: 35px;
    justify-content: center;
    padding: 0 8px;
    font-size: 10.5px;
  }
  .detail-image-grid { gap: 7px; }
  .image-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .image-thumb figcaption { font-size: 9px; }
}


/* 搜索模糊推荐 */
.related-suggest {
  margin-top: 24px;
  padding: 16px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(250,253,249,.96), rgba(244,250,245,.92));
  border: 1px solid rgba(39,70,54,.07);
  box-shadow: 0 12px 34px rgba(55,91,72,.06);
  animation: m-item-v3 320ms var(--m-ease-out) both;
}
.related-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.related-head > div { display: flex; flex-direction: column; gap: 3px; }
.related-head strong { color: #2b4034; font-size: 13px; }
.related-head span { color: #8e9c92; font-size: 10.5px; }
.related-head em {
  flex: none;
  font-style: normal;
  padding: 4px 9px;
  border-radius: 8px;
  background: #e9f4ed;
  color: #5a806d;
  font-size: 10px;
}
.related-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.related-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid rgba(39,70,54,.06);
  background: rgba(255,255,255,.82);
  text-align: left;
  transition: transform 180ms var(--m-ease-soft), background 180ms, box-shadow 180ms;
}
.related-item:hover {
  transform: translateY(-2px);
  background: #fff;
  box-shadow: 0 9px 22px rgba(55,91,72,.08);
}
.related-title { color: #344b3d; font-size: 11.5px; line-height: 1.6; }
.related-title mark { background: #fff0bd; color: #6a5222; border-radius: 3px; padding: 0 1px; }
.related-meta { color: #92a097; font-size: 10px; }
@media (max-width: 640px) {
  .related-suggest { margin-top: 18px; padding: 13px; border-radius: 18px; }
  .related-list { grid-template-columns: 1fr; gap: 7px; }
  .related-item { padding: 10px 11px; }
}


/* 话术图片下载按钮 */
.detail-image-wrap { position: relative; min-width: 0; }
.detail-image-wrap .detail-image { width: 100%; }
.detail-image-download {
  position: absolute;
  right: 7px;
  bottom: 7px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 9px;
  border-radius: 9px;
  border: 1px solid rgba(255,255,255,.82);
  background: rgba(30,48,38,.66);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 160ms var(--m-ease-soft), background 160ms;
}
.detail-image-download svg { width: 13px; height: 13px; }
.detail-image-download:hover { background: rgba(45,105,80,.9); transform: translateY(-1px); }
.image-thumb-download {
  position: absolute;
  left: 5px;
  bottom: 28px;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.82);
  background: rgba(30,48,38,.62);
  color: #fff;
  backdrop-filter: blur(6px);
}
.image-thumb-download svg { width: 13px; height: 13px; }
.image-thumb-download:hover { background: rgba(45,105,80,.9); }


@media (max-width: 640px) {
  .image-editor-head { align-items: center; gap: 8px; }
  .image-add-btn { height: 34px; padding: 0 11px; }
  .image-editor-head > div { padding-right: 4px; }
}


/* 手机身份卡：管理员标签移到右侧中部 */
@media (max-width: 640px) {
  .profile-hero-panel .profile-hero { position: relative; }
  .profile-hero-main { padding-right: 86px; }
  .profile-hero-meta {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    position: static;
  }
  .profile-hero-meta .role-chip {
    position: absolute;
    right: 16px;
    top: 18px;
    transform: none;
    margin: 0;
    z-index: 2;
  }
  .profile-hero-manage { width: 100%; }
}


/* 修改记录：直接展示变更内容 */
.audit-details {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(39,70,54,.08);
  border-top: 1px solid rgba(39,70,54,.08);
  border-radius: 13px;
  background: #f8faf7;
}
.audit-details-title {
  margin-bottom: 5px;
  color: #8b998f;
  font-size: 9.5px;
  letter-spacing: .03em;
}
.audit-details-body { margin-top: 0 !important; animation: none !important; }

/* 操作类型：自定义下拉 UI */
.audit-action-filter { min-width: 150px; }
.audit-select { position: relative; min-width: 132px; }
.audit-select-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(35,58,47,.08);
  border-radius: 10px;
  background: #fff;
  color: #3b4c42;
  font-size: 11.5px;
  line-height: 1;
  transition: border-color 160ms var(--m-ease-soft), box-shadow 160ms var(--m-ease-soft);
}
.audit-select-trigger:hover { border-color: rgba(85,120,100,.22); }
.audit-select-trigger[aria-expanded="true"] {
  border-color: rgba(100,119,210,.35);
  box-shadow: 0 0 0 3px rgba(100,119,210,.07);
}
.audit-select-trigger svg {
  width: 14px;
  height: 14px;
  flex: none;
  color: #8d9a91;
  transform: rotate(90deg);
  transition: transform 180ms var(--m-ease-out);
}
.audit-select-trigger[aria-expanded="true"] svg { transform: rotate(-90deg); }
.audit-select-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 90;
  width: max(100%, 150px);
  padding: 6px;
  border-radius: 15px;
  border: 1px solid rgba(39,70,54,.08);
  background: #fffefa;
  box-shadow: 0 18px 42px rgba(50,73,59,.15), 0 3px 10px rgba(50,73,59,.05);
  animation: audit-menu-in 180ms var(--m-ease-out) both;
}
.audit-select-menu[hidden] { display: none !important; }
@keyframes audit-menu-in {
  from { opacity: 0; transform: translateY(-4px) scale(.985); }
  to { opacity: 1; transform: none; }
}
.audit-select-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 36px;
  padding: 0 9px;
  border-radius: 9px;
  color: #53675a;
  font-size: 11.5px;
  text-align: left;
  transition: background 150ms, color 150ms;
}
.audit-select-option:hover { background: #f1f7f2; color: #263b2f; }
.audit-select-option.active { background: #eaf5ee; color: #246b4d; font-weight: 600; }
.audit-select-option em {
  margin-left: auto;
  font-style: normal;
  color: #3f8b65;
  opacity: 0;
  font-size: 11px;
}
.audit-select-option.active em { opacity: 1; }
.audit-option-dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: #9eaaa1;
}
.audit-option-dot.create { background: #3d9a6e; }
.audit-option-dot.update { background: #667ac8; }
.audit-option-dot.delete { background: #c2746b; }
@media (max-width: 640px) {
  .audit-action-filter { width: 100%; flex-wrap: wrap; }
  .audit-action-filter > span { width: 100%; }
  .audit-select { width: 100%; }
  .audit-select-trigger { height: 42px; font-size: 16px; }
  .audit-select-menu { width: 100%; }
  .audit-details { padding: 9px 10px; }
}


/* ==================================================================
   PERFORMANCE v1
   目标：去掉高成本实时模糊、缩小重绘范围、避免搜索时重复入场动画
   ================================================================== */
.backdrop,
.topbar,
.tabbar,
.sidebar,
.account-chip,
.account-menu,
.card-menu,
.panel,
.card,
.sheet,
.modal,
.search-suggest,
.toast,
.login-card,
.searchbox,
.install-bar,
.image-download,
.image-thumb-download,
.detail-image-download,
.image-remove,
.app-splash {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

/* 搜索/筛选时不再让整组卡片重新上浮，输入更跟手 */
.content.no-list-enter .card,
.content.no-list-enter .related-suggest,
.content.no-list-enter .audit-entry,
.content.no-list-enter .account-admin-panel .user-row,
.content.no-list-enter .dl-card,
.content.no-list-enter .profile-open-card {
  animation: none !important;
}

/* 只动画合成友好的属性，避免 box-shadow / filter 参与过渡 */
.btn, .mini-btn, .icon-btn, .copy-mini, .copy,
.tab, .nav-item, .profile-menu-row, .account-menu-item,
.switch-saved-row, .profile-hero-manage, .audit-filter-clear,
.audit-toolbar .btn, .dl-actions .btn, .sheet-actions .icon-action,
.related-item, .audit-select-trigger, .audit-select-option {
  transition:
    transform 150ms var(--m-ease-soft),
    background-color 180ms var(--m-ease-soft),
    border-color 180ms var(--m-ease-soft),
    color 180ms var(--m-ease-soft),
    opacity 180ms var(--m-ease-soft) !important;
}
.card, .dl-card, .audit-entry, .profile-open-card, .related-suggest {
  transition:
    transform 160ms var(--m-ease-soft),
    background-color 180ms var(--m-ease-soft),
    border-color 180ms var(--m-ease-soft),
    opacity 180ms var(--m-ease-soft) !important;
}

/* 打开弹层期间才提示合成器，关闭后立即释放 */
.layer.open .sheet,
.layer.open .modal {
  will-change: transform, opacity;
}

/* 手机内部滚动使用独立合成层 */
#appView .content {
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* 减少静态阴影造成的重复绘制 */
@media (max-width: 640px) {
  .card, .panel, .audit-entry, .dl-card, .profile-open-card {
    box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 8px 22px rgba(55,91,72,.045) !important;
  }
  .image-download, .image-thumb-download, .detail-image-download {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
}


/* ==================================================================
   批量添加话术
   ================================================================== */
.batch-add-btn { height: 46px; }
.batch-intro {
  margin: 0 0 12px;
  color: #7f8f85;
  font-size: 11.5px;
  line-height: 1.75;
}
.batch-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.batch-file-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 12px;
  cursor: pointer;
  font-size: 11px;
}
.batch-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #718177;
  font-size: 11px;
  cursor: pointer;
  user-select: none;
}
.batch-check input { width: 14px; height: 14px; accent-color: #4b8d6a; }
.batch-input {
  width: 100%;
  min-height: 135px;
  padding: 12px 13px;
  border-radius: 15px;
  border: 1px solid rgba(35,58,47,.09);
  background: #fbfdfb;
  color: #33493b;
  font-size: 12px;
  line-height: 1.75;
  resize: vertical;
  outline: none;
  transition: border-color 160ms var(--m-ease-soft), box-shadow 160ms var(--m-ease-soft);
}
.batch-input:focus {
  border-color: rgba(77,130,97,.4);
  box-shadow: 0 0 0 3px rgba(77,130,97,.07);
}
.batch-input.is-dragging { border-color: #4b8d6a; background: #f0f8f2; }
.batch-options {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 11px;
}
.batch-options .field { margin: 0; min-width: 190px; flex: 1 1 190px; }
.batch-options select { height: 38px; width: 100%; }
.batch-preview {
  margin-top: 13px;
  border-radius: 16px;
  border: 1px solid rgba(35,58,47,.07);
  background: #f8faf7;
  overflow: hidden;
}
.batch-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(35,58,47,.06);
}
.batch-preview-head strong { color: #3a4f41; font-size: 11.5px; }
.batch-preview-head span { color: #8d998f; font-size: 10.5px; }
.batch-preview-list { max-height: 230px; overflow-y: auto; padding: 5px 8px 8px; }
.batch-preview-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 6px;
  border-bottom: 1px dashed rgba(35,58,47,.06);
}
.batch-preview-item:last-child { border-bottom: 0; }
.batch-preview-index {
  width: 22px; height: 22px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #e9f4ed;
  color: #5b806c;
  font-size: 9.5px;
}
.batch-preview-copy { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.batch-preview-copy strong {
  color: #3c5044;
  font-size: 10.5px;
  line-height: 1.55;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.batch-preview-copy span { color: #94a097; font-size: 9.5px; }
.batch-preview-remove {
  width: 24px; height: 24px;
  flex: none;
  border-radius: 50%;
  color: #a58c87;
  font-size: 16px;
  line-height: 1;
  transition: background 150ms, color 150ms;
}
.batch-preview-remove:hover { background: #f9eeec; color: #b45d52; }
.batch-preview-empty {
  padding: 22px 12px;
  text-align: center;
  color: #a0aaa2;
  font-size: 10.5px;
}
@media (max-width: 640px) {
  .batch-add-btn { width: 34px; height: 34px; padding: 0; border-radius: 50%; }
  .batch-add-btn span { display: none; }
  .batch-tools .btn, .batch-file-btn { flex: 1 1 auto; height: 40px; }
  .batch-input { min-height: 150px; font-size: 16px !important; }
  .batch-options { align-items: stretch; }
  .batch-options .field { flex-basis: 100%; }
  .batch-options select { height: 42px; font-size: 16px !important; }
  .batch-preview-list { max-height: 190px; }
}

/* ==================================================================
   版本更新日志
   ================================================================== */
.version-log-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}
.version-log-head h3 { margin-bottom: 5px; }
.version-log-head .panel-sub { margin: 0; }
.version-log-version {
  flex: none;
  padding: 5px 9px;
  border-radius: 8px;
  background: #eaf5ee;
  color: #4b7b61;
  font-size: 10px;
  font-weight: 600;
}
.version-log-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 430px;
  overflow-y: auto;
  padding-right: 3px;
}
.version-log-entry {
  padding: 12px 13px;
  border-radius: 14px;
  background: #f8faf7;
  border: 1px solid rgba(35,58,47,.065);
}
.version-log-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.version-log-meta strong { color: #56806a; font-size: 10px; font-weight: 600; }
.version-log-meta time { color: #9aa49d; font-size: 9.5px; }
.version-log-entry h4 { margin: 6px 0 9px; color: #2f4336; font-size: 12.5px; font-weight: 600; }
.version-log-group { margin-top: 8px; }
.version-log-label {
  display: inline-block;
  margin-bottom: 4px;
  color: #8b998f;
  font-size: 9.5px;
}
.version-log-group ul { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.version-log-group li {
  position: relative;
  padding-left: 11px;
  color: #5d7064;
  font-size: 10.5px;
  line-height: 1.65;
}
.version-log-group li::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 7px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #8dbb9e;
}
.version-log-loading { padding: 16px 4px; color: #99a49d; font-size: 10.5px; }
@media (max-width: 640px) {
  .version-log-list { max-height: 360px; }
  .version-log-entry { padding: 11px 12px; }
}


/* 批量文件解析状态 */
.batch-file-btn.uploading { opacity: .55; pointer-events: none; }
.batch-file-btn.uploading::after { content: " 解析中…"; }

/* 云端同步 */
.cloud-sync-box {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px dashed rgba(35,58,47,.09);
}
.cloud-sync-status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 9px;
  color: #7d8c82;
  font-size: 10.5px;
  overflow-wrap: anywhere;
}
.cloud-dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: #b3bdb6;
}
.cloud-dot.on { background: #3e9a6f; box-shadow: 0 0 0 3px rgba(62,154,111,.11); }
.cloud-sync-box .backup-actions { margin-top: 0; }
.cloud-help {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f5f9f5;
  color: #728278;
  font-size: 10.5px;
  line-height: 1.75;
}
.cloud-help code {
  padding: 1px 4px;
  border-radius: 4px;
  background: #e8f1ea;
  color: #4e7660;
  font-size: 10px;
}


/* 分类移除后，详情顶部关闭按钮保持右侧 */
.sheet-top { justify-content: flex-end; }


/* 批量链接识别 */
.batch-link-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.batch-link-row input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(35,58,47,.09);
  background: rgba(255,255,255,.72);
  color: #34493c;
  font-size: 11.5px;
  outline: none;
}
.batch-link-row input:focus {
  border-color: rgba(77,130,97,.4);
  box-shadow: 0 0 0 3px rgba(77,130,97,.07);
}
.batch-link-row .btn { flex: none; height: 40px; border-radius: 12px; font-size: 11px; }
@media (max-width: 640px) {
  .batch-link-row { flex-wrap: wrap; }
  .batch-link-row input { flex-basis: 100%; height: 42px; font-size: 16px; }
  .batch-link-row .btn { width: 100%; height: 40px; }
}

/* ==================================================================
   LIQUID GLASS
   用多层柔光渐变、透明釉面和内高光做液态玻璃质感；
   不依赖全屏实时模糊，避免滚动和低配设备重新卡顿。
   ================================================================== */
#appView.app,
#loginView.login {
  background:
    radial-gradient(circle at 8% 8%, rgba(186,225,205,.62), transparent 33%),
    radial-gradient(circle at 92% 10%, rgba(196,218,246,.58), transparent 38%),
    radial-gradient(circle at 52% 100%, rgba(237,218,242,.42), transparent 42%),
    linear-gradient(150deg, #eef5ef 0%, #f4f8f3 48%, #eef4f8 100%) !important;
}

.panel,
.card,
.audit-entry,
.dl-card,
.profile-open-card,
.profile-hero-panel,
.version-log-entry,
.batch-preview,
.related-suggest {
  background:
    radial-gradient(130% 120% at 6% 0%, rgba(255,255,255,.92) 0%, rgba(255,255,255,.35) 38%, rgba(255,255,255,0) 67%),
    radial-gradient(100% 140% at 100% 0%, rgba(201,230,244,.36) 0%, rgba(255,255,255,0) 56%),
    linear-gradient(145deg, rgba(255,255,255,.66), rgba(241,249,244,.46)) !important;
  border-color: rgba(255,255,255,.82) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.98),
    inset 0 -1px 0 rgba(62,94,77,.055),
    inset 0 0 0 1px rgba(255,255,255,.16),
    0 18px 42px rgba(47,78,61,.075) !important;
}

.profile-hero {
  background:
    radial-gradient(120% 120% at 4% 0%, rgba(255,255,255,.86), rgba(255,255,255,.2) 44%, transparent 70%),
    radial-gradient(100% 120% at 100% 0%, rgba(191,229,213,.42), transparent 60%),
    linear-gradient(135deg, rgba(239,253,246,.78), rgba(238,246,255,.62)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.98),
    inset 0 -1px 0 rgba(68,101,83,.055),
    0 16px 40px rgba(55,90,71,.07) !important;
}

.topbar,
.tabbar,
.account-menu,
.card-menu,
.modal,
.sheet {
  background:
    radial-gradient(110% 100% at 0% 0%, rgba(255,255,255,.82), rgba(255,255,255,.18) 42%, transparent 70%),
    linear-gradient(145deg, rgba(255,255,255,.78), rgba(241,248,244,.58)) !important;
  border: 1px solid rgba(255,255,255,.78) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.98),
    0 20px 52px rgba(45,74,58,.13) !important;
}
.topbar { box-shadow: inset 0 1px 0 rgba(255,255,255,.98), 0 8px 24px rgba(45,74,58,.055) !important; }
.tabbar { box-shadow: inset 0 1px 0 rgba(255,255,255,.98), 0 18px 46px rgba(45,74,58,.14) !important; }
.modal, .sheet {
  background:
    radial-gradient(110% 100% at 0% 0%, rgba(255,255,255,.94), rgba(255,255,255,.35) 44%, transparent 72%),
    linear-gradient(145deg, rgba(255,255,255,.93), rgba(243,250,246,.86)) !important;
}

.searchbox,
.batch-input,
.batch-link-row input,
.field input,
.field select,
.field textarea,
.category-trigger,
.audit-select-trigger {
  background:
    linear-gradient(145deg, rgba(255,255,255,.76), rgba(247,252,249,.53)) !important;
  border-color: rgba(255,255,255,.8) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.98),
    inset 0 -1px 0 rgba(67,101,82,.035),
    0 6px 18px rgba(50,83,64,.045) !important;
}

.btn.primary {
  background:
    radial-gradient(110% 100% at 0% 0%, rgba(255,255,255,.35), transparent 50%),
    linear-gradient(135deg, #828de4, #6573d1) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.42),
    inset 0 -1px 0 rgba(49,62,122,.16),
    0 12px 26px rgba(78,94,190,.22) !important;
}
.btn.ghost,
.mini-btn,
.copy-mini,
.profile-hero-manage {
  background: linear-gradient(145deg, rgba(255,255,255,.72), rgba(242,250,246,.48)) !important;
  border-color: rgba(255,255,255,.78) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    0 5px 14px rgba(52,84,65,.045) !important;
}

.tab.active,
.nav-item.active {
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(255,255,255,.75), rgba(255,255,255,.16) 50%, transparent 75%),
    linear-gradient(145deg, rgba(226,242,235,.75), rgba(240,248,244,.55)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 7px 18px rgba(48,82,63,.07) !important;
}

.audit-details,
.batch-preview,
.version-log-entry,
.related-suggest {
  border-color: rgba(255,255,255,.76) !important;
}

@media (max-width: 640px) {
  .panel,
  .card,
  .audit-entry,
  .dl-card,
  .profile-open-card,
  .version-log-entry,
  .batch-preview,
  .related-suggest {
    background:
      radial-gradient(120% 110% at 5% 0%, rgba(255,255,255,.88), rgba(255,255,255,.22) 46%, transparent 72%),
      linear-gradient(145deg, rgba(255,255,255,.64), rgba(242,250,245,.46)) !important;
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.96),
      inset 0 -1px 0 rgba(67,101,82,.045),
      0 10px 26px rgba(54,87,68,.06) !important;
  }
}


/* 液态玻璃可读性：弹层和输入区域保留釉面但使用实色底 */
.modal,
.sheet {
  background:
    radial-gradient(115% 100% at 0% 0%, rgba(255,255,255,.98), rgba(255,255,255,.5) 44%, rgba(255,255,255,0) 72%),
    linear-gradient(145deg, rgba(255,255,255,.96), rgba(244,250,246,.93)),
    #f8fbf8 !important;
}
.batch-input,
.batch-link-row input,
.field input,
.field select,
.field textarea,
.searchbox {
  background: rgba(255,255,255,.92) !important;
}
.batch-preview,
.audit-details,
.version-log-entry {
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(255,255,255,.94), rgba(255,255,255,.35) 48%, rgba(255,255,255,0) 74%),
    #f7faf7 !important;
}
.tabbar {
  background:
    radial-gradient(100% 100% at 0% 0%, rgba(255,255,255,.9), rgba(255,255,255,.28) 45%, rgba(255,255,255,.1)),
    rgba(248,252,248,.93) !important;
}
.account-menu,
.card-menu {
  background:
    radial-gradient(100% 100% at 0% 0%, rgba(255,255,255,.96), rgba(255,255,255,.42) 50%, transparent 74%),
    #fbfdfb !important;
}


/* ==================================================================
   LIQUID GLASS v2 · 全界面釉面 + 柔和交互动效
   ================================================================== */
:root {
  --glass-border: rgba(255,255,255,.86);
  --glass-highlight: rgba(255,255,255,.98);
  --glass-shadow: 0 18px 48px rgba(40,72,55,.10);
  --m-spring: cubic-bezier(.22,1,.36,1);
}

#appView.app,
#loginView.login {
  background:
    radial-gradient(circle at 5% 3%, rgba(167,236,206,.78), transparent 29%),
    radial-gradient(circle at 97% 2%, rgba(167,211,255,.72), transparent 34%),
    radial-gradient(circle at 56% 102%, rgba(245,196,232,.52), transparent 38%),
    radial-gradient(circle at 20% 80%, rgba(223,241,188,.44), transparent 32%),
    linear-gradient(145deg, #eef8f1 0%, #eef4ff 50%, #f8f1fb 100%) !important;
}

.panel,
.card,
.audit-entry,
.dl-card,
.profile-open-card,
.profile-hero-panel,
.version-log-entry,
.batch-preview,
.related-suggest,
.user-table,
.stat-card,
.empty {
  background:
    linear-gradient(122deg, rgba(255,255,255,.84), rgba(255,255,255,.24) 28%, rgba(255,255,255,.08) 50%, rgba(255,255,255,.34) 78%, rgba(255,255,255,.68)),
    radial-gradient(82% 90% at 8% 0%, rgba(191,240,216,.4), transparent 64%),
    radial-gradient(76% 84% at 98% 8%, rgba(178,216,255,.4), transparent 62%),
    rgba(250,253,250,.34) !important;
  border: 1px solid var(--glass-border) !important;
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    inset 0 0 0 1px rgba(255,255,255,.13),
    inset 0 -14px 30px rgba(95,142,116,.045),
    var(--glass-shadow) !important;
}

.topbar,
.sidebar,
.tabbar,
.account-menu,
.card-menu,
.search-suggest,
.modal,
.sheet {
  background:
    linear-gradient(125deg, rgba(255,255,255,.8), rgba(255,255,255,.26) 30%, rgba(255,255,255,.12) 52%, rgba(255,255,255,.38) 78%, rgba(255,255,255,.7)),
    radial-gradient(82% 100% at 0% 0%, rgba(185,236,210,.4), transparent 62%),
    radial-gradient(78% 90% at 100% 0%, rgba(176,215,255,.38), transparent 60%),
    rgba(249,252,249,.42) !important;
  border: 1px solid var(--glass-border) !important;
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    inset 0 0 0 1px rgba(255,255,255,.14),
    0 20px 52px rgba(40,70,54,.12) !important;
}
.topbar {
  box-shadow: inset 0 1px 0 var(--glass-highlight), inset 0 0 0 1px rgba(255,255,255,.12), 0 10px 28px rgba(40,70,54,.07) !important;
}
.tabbar {
  box-shadow: inset 0 1px 0 var(--glass-highlight), inset 0 0 0 1px rgba(255,255,255,.15), 0 18px 46px rgba(40,70,54,.16) !important;
}
.modal,
.sheet {
  background:
    linear-gradient(125deg, rgba(255,255,255,.96), rgba(255,255,255,.64) 34%, rgba(255,255,255,.48) 54%, rgba(255,255,255,.78) 80%, rgba(255,255,255,.94)),
    radial-gradient(80% 90% at 0% 0%, rgba(192,240,216,.3), transparent 62%),
    radial-gradient(74% 90% at 100% 4%, rgba(183,216,255,.28), transparent 60%),
    #f8fbf8 !important;
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 0 0 1px rgba(255,255,255,.2),
    0 32px 90px rgba(33,65,49,.2) !important;
}

.searchbox,
.batch-input,
.batch-link-row input,
.field input,
.field select,
.field textarea,
.category-trigger,
.audit-select-trigger,
.batch-options select {
  background:
    linear-gradient(145deg, rgba(255,255,255,.9), rgba(248,252,249,.7)) !important;
  border-color: rgba(255,255,255,.9) !important;
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 0 0 1px rgba(255,255,255,.16),
    0 6px 18px rgba(45,77,59,.045) !important;
}
.field input:focus,
.field select:focus,
.field textarea:focus,
.batch-input:focus,
.batch-link-row input:focus {
  border-color: rgba(96,145,116,.46) !important;
  box-shadow:
    inset 0 1px 0 #fff,
    0 0 0 3px rgba(111,164,132,.1),
    0 8px 22px rgba(45,77,59,.05) !important;
}

.btn.primary,
.add-btn.btn.primary {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(110% 100% at 0% 0%, rgba(255,255,255,.42), transparent 50%),
    linear-gradient(135deg, #8b95ea, #6874d4) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.55),
    inset 0 -1px 0 rgba(45,57,115,.18),
    0 13px 28px rgba(76,91,185,.24) !important;
}
.btn.primary::after {
  content: "";
  position: absolute;
  top: -80%;
  left: -32%;
  width: 38%;
  height: 260%;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.48), transparent);
  transform: translateX(-220%) rotate(20deg);
  transition: transform 520ms var(--m-spring);
}
.btn.primary:hover::after { transform: translateX(320%) rotate(20deg); }

.btn.ghost,
.mini-btn,
.copy-mini,
.profile-hero-manage,
.audit-filter-clear,
.batch-file-btn {
  background:
    linear-gradient(145deg, rgba(255,255,255,.88), rgba(244,251,247,.63)) !important;
  border-color: rgba(255,255,255,.9) !important;
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 0 0 1px rgba(255,255,255,.12),
    0 5px 16px rgba(45,77,59,.05) !important;
}

.chip,
.tag,
.role-chip,
.audit-chip,
.variant-count,
.cat-chip,
.install-bar,
.toast {
  background:
    linear-gradient(145deg, rgba(255,255,255,.86), rgba(238,248,242,.58)) !important;
  border: 1px solid rgba(255,255,255,.85) !important;
  box-shadow:
    inset 0 1px 0 #fff,
    0 5px 14px rgba(45,77,59,.045) !important;
}
.chip.active,
.tab.active,
.nav-item.active {
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(255,255,255,.88), rgba(255,255,255,.24) 50%, transparent 76%),
    linear-gradient(145deg, rgba(218,241,229,.88), rgba(238,249,244,.7)) !important;
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 0 0 1px rgba(255,255,255,.16),
    0 8px 20px rgba(45,81,60,.09) !important;
}
.toast {
  background: linear-gradient(145deg, rgba(38,62,48,.94), rgba(26,48,36,.88)) !important;
  border-color: rgba(255,255,255,.16) !important;
  color: #fff !important;
}

.login-card,
.login-brand {
  background:
    linear-gradient(125deg, rgba(255,255,255,.9), rgba(255,255,255,.36) 34%, rgba(255,255,255,.18) 55%, rgba(255,255,255,.52) 82%),
    radial-gradient(80% 90% at 0% 0%, rgba(180,236,208,.4), transparent 62%),
    radial-gradient(72% 90% at 100% 0%, rgba(173,211,255,.36), transparent 60%),
    rgba(250,253,250,.36) !important;
  border-color: var(--glass-border) !important;
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    0 28px 80px rgba(37,70,52,.14) !important;
}
.login-card input {
  background: rgba(255,255,255,.9) !important;
}

.card::after {
  background:
    linear-gradient(122deg, rgba(255,255,255,.78), transparent 30%, transparent 58%, rgba(255,255,255,.3) 78%, rgba(255,255,255,.5)) !important;
  opacity: .55;
  transition: opacity 240ms var(--m-ease-soft);
}
.card:hover::after { opacity: .9; }

/* 交互动效：更柔和的上浮、按压和焦点反馈 */
.btn,
.mini-btn,
.icon-btn,
.copy-mini,
.tab,
.nav-item,
.profile-menu-row,
.profile-hero-manage,
.chip,
.card {
  transition:
    transform 220ms var(--m-spring),
    background-color 180ms var(--m-ease-soft),
    border-color 180ms var(--m-ease-soft),
    color 180ms var(--m-ease-soft),
    opacity 180ms var(--m-ease-soft) !important;
}
@media (hover: hover) {
  .btn:hover, .mini-btn:hover, .icon-btn:hover, .copy-mini:hover,
  .profile-hero-manage:hover, .profile-menu-row:hover, .chip:hover {
    transform: translateY(-2px);
  }
  .card:hover { transform: translateY(-3px) scale(1.004); }
  .tab:hover, .nav-item:hover { transform: translateY(-1px); }
}
.btn:active, .mini-btn:active, .icon-btn:active, .copy-mini:active,
.profile-hero-manage:active, .profile-menu-row:active, .chip:active,
.tab:active, .nav-item:active {
  transform: translateY(0) scale(.965) !important;
}
.card:active { transform: scale(.996) !important; }

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid rgba(103,139,189,.42);
  outline-offset: 2px;
}

.layer .backdrop {
  background:
    radial-gradient(circle at 20% 10%, rgba(147,220,188,.24), transparent 42%),
    radial-gradient(circle at 80% 90%, rgba(137,183,240,.22), transparent 44%),
    rgba(18,43,29,.34) !important;
}

@media (max-width: 640px) {
  .panel,
  .card,
  .audit-entry,
  .dl-card,
  .profile-open-card,
  .version-log-entry,
  .batch-preview,
  .related-suggest {
    background:
      linear-gradient(122deg, rgba(255,255,255,.82), rgba(255,255,255,.24) 32%, rgba(255,255,255,.12) 54%, rgba(255,255,255,.42) 82%),
      radial-gradient(80% 90% at 0% 0%, rgba(188,238,213,.34), transparent 62%),
      radial-gradient(70% 84% at 100% 0%, rgba(176,214,255,.32), transparent 60%),
      rgba(251,253,251,.36) !important;
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.96),
      inset 0 0 0 1px rgba(255,255,255,.12),
      0 10px 28px rgba(40,72,55,.07) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn.primary::after { display: none; }
  .btn:hover, .mini-btn:hover, .icon-btn:hover, .copy-mini:hover,
  .profile-hero-manage:hover, .profile-menu-row:hover, .chip:hover,
  .card:hover, .tab:hover, .nav-item:hover {
    transform: none !important;
  }
}


/* 玻璃筛选按钮选中态对比度 */
.chip.active {
  color: #1f513b !important;
  font-weight: 600;
  border-color: rgba(255,255,255,.92) !important;
  box-shadow:
    inset 0 1px 0 #fff,
    0 0 0 1px rgba(88,143,111,.18),
    0 8px 20px rgba(45,81,60,.09) !important;
}


/* ==================================================================
   LIQUID GLASS 3D · 立体釉面、厚度、折射边缘与悬停透视
   ================================================================== */
:root {
  --glass-top-edge: rgba(255,255,255,1);
  --glass-left-edge: rgba(255,255,255,.96);
  --glass-right-edge: rgba(172,205,186,.62);
  --glass-bottom-edge: rgba(122,158,137,.55);
  --glass-contact: 0 3px 0 -2px rgba(255,255,255,.74), 0 8px 0 -6px rgba(69,106,84,.14);
  --glass-depth: 0 20px 32px -16px rgba(33,66,47,.22), 0 38px 70px -34px rgba(33,66,47,.30);
  --glass-hover-depth: 0 6px 0 -4px rgba(255,255,255,.8), 0 13px 0 -9px rgba(69,106,84,.16), 0 30px 46px -18px rgba(33,66,47,.27), 0 52px 90px -40px rgba(33,66,47,.33);
}

.panel,
.card,
.audit-entry,
.dl-card,
.profile-open-card,
.profile-hero-panel,
.version-log-entry,
.batch-preview,
.related-suggest,
.user-table,
.stat-card,
.empty {
  border-top-color: var(--glass-top-edge) !important;
  border-left-color: var(--glass-left-edge) !important;
  border-right-color: var(--glass-right-edge) !important;
  border-bottom-color: var(--glass-bottom-edge) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,1),
    inset 1px 0 0 rgba(255,255,255,.78),
    inset -1px 0 0 rgba(207,230,215,.34),
    inset 0 -2px 3px rgba(74,112,88,.08),
    var(--glass-contact),
    var(--glass-depth) !important;
}

.card { overflow: visible; }
.card::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(148deg, rgba(255,255,255,.72) 0%, rgba(255,255,255,.18) 22%, rgba(255,255,255,0) 48%, rgba(96,139,113,.045) 78%, rgba(255,255,255,.28) 100%);
  box-shadow:
    inset 1px 1px 0 rgba(255,255,255,.82),
    inset -1px -2px 2px rgba(92,133,107,.07);
}
.card > * { position: relative; z-index: 1; }
.card::after { z-index: 2; }

.topbar,
.sidebar,
.tabbar,
.account-menu,
.card-menu,
.search-suggest,
.modal,
.sheet,
.login-card,
.login-brand {
  border-top-color: rgba(255,255,255,1) !important;
  border-left-color: rgba(255,255,255,.98) !important;
  border-right-color: rgba(170,203,184,.6) !important;
  border-bottom-color: rgba(117,153,132,.58) !important;
  box-shadow:
    inset 0 1px 0 #fff,
    inset 1px 0 0 rgba(255,255,255,.72),
    inset -1px 0 0 rgba(205,229,214,.32),
    inset 0 -2px 3px rgba(65,102,80,.075),
    0 3px 0 -2px rgba(255,255,255,.8),
    0 10px 0 -8px rgba(65,102,80,.18),
    0 26px 44px -20px rgba(32,65,47,.26),
    0 48px 90px -46px rgba(32,65,47,.32) !important;
}
.topbar {
  box-shadow:
    inset 0 1px 0 #fff,
    inset 1px 0 0 rgba(255,255,255,.7),
    inset 0 -2px 3px rgba(65,102,80,.06),
    0 4px 0 -3px rgba(255,255,255,.75),
    0 12px 26px -16px rgba(32,65,47,.18) !important;
}
.tabbar {
  box-shadow:
    inset 0 1px 0 #fff,
    inset 1px 0 0 rgba(255,255,255,.72),
    inset -1px 0 0 rgba(205,229,214,.32),
    inset 0 -2px 3px rgba(65,102,80,.08),
    0 3px 0 -2px rgba(255,255,255,.8),
    0 11px 0 -8px rgba(65,102,80,.2),
    0 28px 48px -20px rgba(32,65,47,.3) !important;
}
.modal,
.sheet {
  box-shadow:
    inset 0 1px 0 #fff,
    inset 1px 0 0 rgba(255,255,255,.8),
    inset -1px 0 0 rgba(205,229,214,.3),
    inset 0 -2px 4px rgba(65,102,80,.08),
    0 5px 0 -4px rgba(255,255,255,.88),
    0 16px 0 -12px rgba(65,102,80,.2),
    0 44px 58px -24px rgba(28,59,42,.3),
    0 80px 130px -60px rgba(28,59,42,.38) !important;
}

.btn.primary,
.add-btn.btn.primary {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.7),
    inset 0 -3px 0 rgba(42,52,116,.26),
    inset 0 2px 5px rgba(255,255,255,.2),
    0 3px 0 #4d59b7,
    0 8px 16px -5px rgba(55,68,154,.35) !important;
  transform: translateY(-1px);
}
.btn.primary:hover { transform: translateY(-2px); }
.btn.primary:active,
.add-btn.btn.primary:active {
  transform: translateY(2px) scale(.985) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.36),
    inset 0 2px 8px rgba(33,42,92,.2),
    0 1px 0 #4d59b7,
    0 4px 9px -5px rgba(55,68,154,.28) !important;
}

.btn.ghost,
.mini-btn,
.copy-mini,
.profile-hero-manage,
.audit-filter-clear,
.batch-file-btn {
  box-shadow:
    inset 0 1px 0 #fff,
    inset 1px 0 0 rgba(255,255,255,.62),
    inset 0 -2px 2px rgba(74,112,88,.055),
    0 2px 0 -1px rgba(255,255,255,.84),
    0 4px 0 -3px rgba(74,112,88,.16),
    0 9px 16px -8px rgba(42,75,56,.16) !important;
}
.btn.ghost:active,
.mini-btn:active,
.copy-mini:active,
.profile-hero-manage:active,
.audit-filter-clear:active,
.batch-file-btn:active {
  transform: translateY(2px) scale(.97) !important;
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 2px 5px rgba(74,112,88,.07),
    0 1px 0 rgba(74,112,88,.12),
    0 3px 8px -5px rgba(42,75,56,.14) !important;
}

.searchbox,
.batch-input,
.batch-link-row input,
.field input,
.field select,
.field textarea,
.category-trigger,
.audit-select-trigger,
.batch-options select {
  box-shadow:
    inset 0 2px 4px rgba(42,73,55,.085),
    inset 0 -1px 0 rgba(255,255,255,.95),
    inset 1px 0 0 rgba(255,255,255,.5),
    0 1px 0 rgba(255,255,255,.7),
    0 5px 12px -7px rgba(42,73,55,.16) !important;
}

.chip,
.tag,
.role-chip,
.audit-chip,
.variant-count,
.install-bar,
.toast {
  border-top-color: rgba(255,255,255,1) !important;
  border-right-color: rgba(173,205,186,.58) !important;
  border-bottom-color: rgba(122,159,137,.55) !important;
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 -2px 2px rgba(76,113,89,.05),
    0 2px 0 -1px rgba(255,255,255,.75),
    0 5px 0 -4px rgba(76,113,89,.13),
    0 8px 14px -8px rgba(45,78,58,.15) !important;
}
.chip.active,
.tab.active,
.nav-item.active {
  box-shadow:
    inset 0 1px 0 #fff,
    inset 1px 0 0 rgba(255,255,255,.72),
    inset 0 -2px 3px rgba(74,112,88,.06),
    0 2px 0 -1px rgba(255,255,255,.85),
    0 5px 0 -4px rgba(65,105,82,.16),
    0 12px 20px -12px rgba(35,69,49,.22) !important;
}

#appView.app {
  box-shadow:
    inset 0 0 120px rgba(255,255,255,.34),
    inset 0 -40px 90px rgba(117,157,135,.055);
}

/* 卡片透视悬停：只在有指针设备上启用 */
.view-enter .card-grid > .card,
.view-enter .audit-list > .audit-entry,
.view-enter .account-admin-panel .user-row,
.view-enter .dl-grid > .dl-card,
.view-enter .profile-open-card,
.view-enter > .profile-hero-panel {
  animation-fill-mode: backwards !important;
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .card {
    transform-origin: center bottom;
    transition: transform 300ms var(--m-spring), box-shadow 300ms var(--m-ease-soft), opacity 180ms !important;
  }
  .card:hover {
    transform: perspective(1050px) translateY(-5px) rotateX(1deg) rotateY(-.9deg) !important;
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,1),
      inset 1px 0 0 rgba(255,255,255,.8),
      inset -1px 0 0 rgba(207,230,215,.34),
      inset 0 -2px 3px rgba(74,112,88,.08),
      var(--glass-hover-depth) !important;
  }
  .audit-entry:hover,
  .profile-open-card:hover,
  .dl-card:hover {
    transform: perspective(1200px) translateY(-2px) rotateX(.35deg) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn.primary { transform: none; }
  .card:hover,
  .audit-entry:hover,
  .profile-open-card:hover,
  .dl-card:hover { transform: none !important; }
}


/* ==================================================================
   ROUNDED UI v1 · 统一四角圆润与自然拼接
   ================================================================== */
:root {
  --ui-radius-xs: 10px;
  --ui-radius-sm: 14px;
  --ui-radius-md: 18px;
  --ui-radius-lg: 24px;
  --ui-radius-xl: 28px;
  --ui-seam: linear-gradient(90deg, transparent, rgba(81,119,96,.14), transparent);
}

/* 外层大容器 */
.panel,
.profile-hero-panel,
.version-log-panel,
.password-panel,
.account-admin-panel,
.account-self-panel {
  border-radius: var(--ui-radius-xl) !important;
}
.card,
.dl-card,
.related-suggest,
.empty {
  border-radius: var(--ui-radius-lg) !important;
}
.audit-entry,
.batch-preview {
  border-radius: 22px !important;
}
.profile-open-card,
.version-log-entry,
.related-item,
.image-thumb,
.detail-image,
.batch-preview-item,
.user-row {
  border-radius: var(--ui-radius-md) !important;
}
.audit-details,
.cloud-help,
.form-error,
.banner,
.danger-zone {
  border-radius: var(--ui-radius-sm) !important;
}
.modal,
.sheet,
.login-card {
  border-radius: 30px !important;
}
.modal-head { border-radius: 30px 30px 0 0; }
.sheet-content { border-radius: 30px; }
.account-menu,
.card-menu,
.search-suggest {
  border-radius: var(--ui-radius-lg) !important;
}
.sidebar {
  border-radius: var(--ui-radius-xl) !important;
}
.tabbar {
  border-radius: 30px !important;
}
.topbar {
  border-radius: 0 0 var(--ui-radius-xl) var(--ui-radius-xl) !important;
}
.toast,
.install-bar {
  border-radius: var(--ui-radius-sm) !important;
}

/* 所有交互控件四角统一 */
.btn { border-radius: 15px !important; }
.mini-btn,
.copy-mini,
.icon-btn,
.profile-hero-manage,
.audit-filter-clear,
.batch-file-btn,
.search-clear,
.install-close {
  border-radius: 12px !important;
}
.chip,
.tag,
.role-chip,
.audit-chip,
.variant-count,
.cat-chip {
  border-radius: 999px !important;
}
.searchbox,
.batch-input,
.batch-link-row input,
.field input,
.field select,
.field textarea,
.category-trigger,
.audit-select-trigger,
.batch-options select,
.dl-url,
.profile-open-url,
.cloud-sync-box .backup-actions .btn {
  border-radius: var(--ui-radius-sm) !important;
}
.audit-select-menu,
.account-menu,
.card-menu {
  border-radius: var(--ui-radius-md) !important;
}
.audit-select-option,
.batch-preview-head,
.audit-details-title,
.version-log-head,
.image-editor,
.batch-tools,
.batch-link-row {
  border-radius: var(--ui-radius-sm) !important;
}
.image-editor,
.batch-preview,
.audit-details,
.version-log-entry,
.related-suggest,
.user-row,
.profile-open-card {
  border-radius: var(--ui-radius-md) !important;
}
.dl-actions .btn,
.profile-open-actions .btn,
.backup-actions .btn {
  border-radius: var(--ui-radius-sm) !important;
}

/* 顶部栏、内容区、弹层之间的拼接改成柔和渐变缝 */
.topbar {
  position: relative;
  border-bottom: 0 !important;
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 -1px 0 rgba(255,255,255,.34),
    0 4px 0 -3px rgba(255,255,255,.7),
    0 12px 30px -18px rgba(32,65,47,.18) !important;
}
.topbar::after {
  content: "";
  display: block !important;
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 0;
  height: 1px;
  background: var(--ui-seam);
  pointer-events: none;
}
#appView .content {
  padding-top: 18px !important;
}
.modal-head {
  border-bottom: 0 !important;
  position: relative;
}
.modal-head::after {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 0;
  height: 1px;
  background: var(--ui-seam);
  pointer-events: none;
}
.card-foot {
  border-top: 0 !important;
  position: relative;
}
.card-foot::before {
  content: "";
  position: absolute;
  left: 1px;
  right: 1px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(79,116,94,.11), transparent);
  pointer-events: none;
}
.danger-zone {
  border-top: 1px solid rgba(80,116,94,.075) !important;
}
.cloud-sync-box {
  border-top: 1px solid rgba(80,116,94,.075) !important;
}
.audit-change {
  border-bottom-color: rgba(80,116,94,.055) !important;
}
.version-log-head,
.related-head,
.batch-preview-head {
  border-bottom-color: rgba(80,116,94,.055) !important;
}

/* 让弹层和卡片内部控件与父级留下自然呼吸空间 */
.sheet-body { padding-left: 24px; padding-right: 24px; }
.modal-body { padding-left: 22px; padding-right: 22px; }
.batch-intro { margin-top: 1px; }
.audit-filters { border-radius: var(--ui-radius-md) !important; }
.profile-hero { border-radius: 22px !important; }
.dl-grid .dl-card { border-radius: 24px !important; }

@media (max-width: 640px) {
  .panel,
  .profile-hero-panel,
  .version-log-panel,
  .password-panel,
  .account-admin-panel,
  .account-self-panel,
  .card,
  .dl-card,
  .related-suggest,
  .empty {
    border-radius: 24px !important;
  }
  .modal,
  .sheet,
  .login-card {
    border-radius: 28px !important;
  }
  .topbar {
    border-radius: 0 0 24px 24px !important;
  }
  .tabbar { border-radius: 28px !important; }
  .sheet-body { padding-left: 20px; padding-right: 20px; }
  .modal-body { padding-left: 18px; padding-right: 18px; }
  #appView .content { padding-top: 15px !important; }
  .btn { border-radius: 14px !important; }
  .searchbox,
  .field input,
  .field select,
  .field textarea,
  .batch-input,
  .batch-link-row input {
    border-radius: 14px !important;
  }
}

/* 更大圆角不要把内部控件裁断 */
.card, .panel, .modal, .sheet, .dl-card, .profile-open-card, .audit-entry {
  background-clip: padding-box;
}


/* 圆角统一补充：顶部栏四角与更多内部控件 */
.topbar {
  border-radius: 26px !important;
}
.stat-card,
.user-table,
.nav-item,
.profile-menu-row,
.audit-select-option,
.dl-url,
.profile-open-url,
.audit-select-menu {
  border-radius: 16px !important;
}
.tab {
  border-radius: 999px !important;
}
.batch-check,
.copy-mini,
.card-action,
.install-close,
.search-clear {
  border-radius: 11px !important;
}
@media (max-width: 640px) {
  .topbar { border-radius: 24px !important; }
}


/* ==================================================================
   EDGE CLARITY v1 · 提升玻璃界面边缘清晰度
   保留圆角和 3D 玻璃，但增加暗色外圈、接触阴影和面层不透明度。
   ================================================================== */
:root {
  --edge-rim: rgba(67,104,82,.22);
  --edge-rim-strong: rgba(57,94,72,.30);
  --edge-rim-soft: rgba(83,120,98,.14);
  --edge-contact: 0 1px 2px rgba(30,60,43,.10), 0 4px 10px -6px rgba(30,60,43,.22);
  --edge-seam: linear-gradient(90deg, transparent, rgba(68,106,83,.24), transparent);
}

#appView.app,
#loginView.login {
  background:
    radial-gradient(circle at 5% 3%, rgba(158,232,199,.8), transparent 29%),
    radial-gradient(circle at 97% 2%, rgba(154,204,255,.76), transparent 34%),
    radial-gradient(circle at 56% 102%, rgba(241,186,226,.52), transparent 38%),
    radial-gradient(circle at 20% 80%, rgba(217,238,174,.44), transparent 32%),
    linear-gradient(145deg, #e8f3ec 0%, #e8eef9 50%, #f2eaf7 100%) !important;
}

.panel,
.card,
.audit-entry,
.dl-card,
.profile-open-card,
.profile-hero-panel,
.version-log-entry,
.batch-preview,
.related-suggest,
.user-table,
.stat-card,
.empty,
.login-card,
.login-brand {
  background:
    linear-gradient(122deg, rgba(255,255,255,.94), rgba(255,255,255,.42) 30%, rgba(255,255,255,.2) 52%, rgba(255,255,255,.52) 80%, rgba(255,255,255,.84)),
    radial-gradient(82% 90% at 8% 0%, rgba(181,235,209,.32), transparent 64%),
    radial-gradient(76% 84% at 98% 8%, rgba(172,211,255,.32), transparent 62%),
    rgba(249,252,249,.58) !important;
  box-shadow:
    0 0 0 1px var(--edge-rim),
    inset 0 1px 0 #fff,
    inset 1px 0 0 rgba(255,255,255,.9),
    inset -1px 0 0 rgba(188,214,197,.48),
    inset 0 -2px 3px rgba(70,108,85,.10),
    var(--edge-contact),
    0 14px 0 -11px rgba(67,104,82,.22),
    0 28px 48px -22px rgba(32,65,47,.30),
    0 52px 88px -46px rgba(32,65,47,.34) !important;
}

.topbar,
.sidebar,
.tabbar,
.account-menu,
.card-menu,
.search-suggest,
.modal,
.sheet,
.toast,
.install-bar {
  box-shadow:
    0 0 0 1px var(--edge-rim),
    inset 0 1px 0 #fff,
    inset 1px 0 0 rgba(255,255,255,.86),
    inset -1px 0 0 rgba(186,212,195,.42),
    inset 0 -2px 3px rgba(63,101,78,.10),
    var(--edge-contact),
    0 14px 0 -11px rgba(62,101,78,.24),
    0 34px 58px -26px rgba(28,61,43,.34),
    0 64px 110px -56px rgba(28,61,43,.38) !important;
}

.topbar {
  border-bottom: 0 !important;
  box-shadow:
    0 0 0 1px var(--edge-rim),
    inset 0 1px 0 #fff,
    inset 1px 0 0 rgba(255,255,255,.86),
    inset 0 -2px 3px rgba(63,101,78,.085),
    var(--edge-contact),
    0 12px 28px -18px rgba(32,65,47,.25) !important;
}
.topbar::after {
  left: 18px;
  right: 18px;
  height: 1px;
  background: var(--edge-seam);
}
.tabbar {
  border-bottom: 1px solid rgba(70,108,85,.10) !important;
}

.modal,
.sheet {
  background:
    linear-gradient(125deg, rgba(255,255,255,.99), rgba(255,255,255,.78) 34%, rgba(255,255,255,.64) 54%, rgba(255,255,255,.9) 80%, rgba(255,255,255,.98)),
    radial-gradient(80% 90% at 0% 0%, rgba(185,238,211,.22), transparent 62%),
    radial-gradient(74% 90% at 100% 4%, rgba(174,210,255,.2), transparent 60%),
    #f9fcf9 !important;
  box-shadow:
    0 0 0 1px var(--edge-rim-strong),
    inset 0 1px 0 #fff,
    inset 1px 0 0 rgba(255,255,255,.9),
    inset -1px 0 0 rgba(186,212,195,.38),
    inset 0 -2px 4px rgba(63,101,78,.10),
    0 2px 4px rgba(30,60,43,.1),
    0 18px 0 -14px rgba(62,101,78,.22),
    0 44px 64px -26px rgba(28,59,42,.34),
    0 82px 132px -62px rgba(28,59,42,.42) !important;
}

/* 控件边缘也要利落 */
.searchbox,
.batch-input,
.batch-link-row input,
.field input,
.field select,
.field textarea,
.category-trigger,
.audit-select-trigger,
.batch-options select,
.dl-url,
.profile-open-url {
  border-color: rgba(70,109,85,.26) !important;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.65),
    inset 0 2px 4px rgba(42,73,55,.11),
    inset 0 -1px 0 rgba(255,255,255,.98),
    inset 1px 0 0 rgba(255,255,255,.6),
    0 2px 5px -3px rgba(35,65,48,.22) !important;
}
.field input:focus,
.field select:focus,
.field textarea:focus,
.batch-input:focus,
.batch-link-row input:focus,
.searchbox:focus-within {
  border-color: rgba(73,126,95,.56) !important;
  box-shadow:
    0 0 0 1px rgba(73,126,95,.14),
    0 0 0 3px rgba(91,146,112,.12),
    inset 0 2px 4px rgba(42,73,55,.08),
    inset 0 -1px 0 #fff !important;
}

.btn.primary,
.add-btn.btn.primary {
  box-shadow:
    0 0 0 1px rgba(70,84,174,.28),
    inset 0 1px 0 rgba(255,255,255,.72),
    inset 0 -3px 0 rgba(42,52,116,.28),
    inset 0 2px 5px rgba(255,255,255,.22),
    0 4px 0 #4d59b7,
    0 2px 4px rgba(39,51,125,.24),
    0 10px 20px -6px rgba(55,68,154,.4) !important;
}
.btn.ghost,
.mini-btn,
.copy-mini,
.profile-hero-manage,
.audit-filter-clear,
.batch-file-btn,
.icon-btn {
  border-color: rgba(70,109,85,.20) !important;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.68),
    inset 0 1px 0 #fff,
    inset 1px 0 0 rgba(255,255,255,.7),
    inset 0 -2px 2px rgba(74,112,88,.07),
    0 2px 0 -1px rgba(255,255,255,.9),
    0 4px 0 -3px rgba(70,108,85,.2),
    0 8px 15px -8px rgba(37,69,50,.22) !important;
}

.chip,
.tag,
.role-chip,
.audit-chip,
.variant-count {
  border-color: rgba(66,105,82,.18) !important;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.55),
    inset 0 1px 0 #fff,
    inset 0 -2px 2px rgba(76,113,89,.06),
    0 2px 0 -1px rgba(255,255,255,.7),
    0 4px 10px -6px rgba(45,78,58,.18) !important;
}
.chip.active {
  border-color: rgba(55,109,78,.28) !important;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.68),
    inset 0 1px 0 #fff,
    inset 0 -2px 3px rgba(74,112,88,.08),
    0 3px 0 -2px rgba(64,104,81,.18),
    0 7px 16px -8px rgba(35,69,49,.24) !important;
}

.card-foot::before,
.modal-head::after {
  background: linear-gradient(90deg, transparent, rgba(68,106,83,.18), transparent);
}
.audit-change {
  border-bottom-color: rgba(68,106,83,.10) !important;
}
.danger-zone,
.cloud-sync-box {
  border-top-color: rgba(68,106,83,.12) !important;
}

@media (max-width: 640px) {
  .panel,
  .card,
  .audit-entry,
  .dl-card,
  .profile-open-card,
  .version-log-entry,
  .batch-preview,
  .related-suggest,
  .empty,
  .login-card,
  .login-brand {
    background:
      linear-gradient(122deg, rgba(255,255,255,.95), rgba(255,255,255,.46) 32%, rgba(255,255,255,.3) 54%, rgba(255,255,255,.66) 82%),
      radial-gradient(80% 90% at 0% 0%, rgba(184,236,211,.28), transparent 62%),
      radial-gradient(70% 84% at 100% 0%, rgba(173,211,255,.27), transparent 60%),
      rgba(249,252,249,.6) !important;
    box-shadow:
      0 0 0 1px var(--edge-rim),
      inset 0 1px 0 #fff,
      inset 0 -2px 3px rgba(70,108,85,.09),
      0 1px 2px rgba(30,60,43,.09),
      0 12px 0 -10px rgba(67,104,82,.19),
      0 24px 40px -24px rgba(32,65,47,.25) !important;
  }
  .topbar,
  .tabbar {
    box-shadow:
      0 0 0 1px var(--edge-rim),
      inset 0 1px 0 #fff,
      inset 0 -2px 3px rgba(63,101,78,.09),
      0 1px 2px rgba(30,60,43,.08),
      0 12px 28px -18px rgba(32,65,47,.24) !important;
  }
}


/* ==================================================================
   CORNER POLISH · 去掉滚动条/外壳的直角，并提升液态玻璃观感
   ================================================================== */

/* 滚动条改成悬浮圆角，不再形成右侧直角条 */
html,
body,
.content,
.sheet-body,
.modal-body,
.search-suggest,
.account-menu,
.audit-list,
.tags-row {
  scrollbar-width: thin;
  scrollbar-color: rgba(70,108,84,.28) transparent;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar,
.content::-webkit-scrollbar,
.sheet-body::-webkit-scrollbar,
.modal-body::-webkit-scrollbar,
.search-suggest::-webkit-scrollbar,
.account-menu::-webkit-scrollbar,
.audit-list::-webkit-scrollbar,
.tags-row::-webkit-scrollbar {
  width: 8px;
  height: 8px;
  background: transparent !important;
}
html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
.content::-webkit-scrollbar-track,
.sheet-body::-webkit-scrollbar-track,
.modal-body::-webkit-scrollbar-track,
.search-suggest::-webkit-scrollbar-track,
.account-menu::-webkit-scrollbar-track,
.audit-list::-webkit-scrollbar-track,
.tags-row::-webkit-scrollbar-track {
  background: transparent !important;
  border-radius: 999px !important;
  margin: 12px 0 !important;
}
html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
.content::-webkit-scrollbar-thumb,
.sheet-body::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb,
.search-suggest::-webkit-scrollbar-thumb,
.account-menu::-webkit-scrollbar-thumb,
.audit-list::-webkit-scrollbar-thumb,
.tags-row::-webkit-scrollbar-thumb {
  background: rgba(70,108,84,.24) !important;
  border: 2px solid transparent !important;
  border-radius: 999px !important;
  background-clip: content-box !important;
}
html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover,
.content::-webkit-scrollbar-thumb:hover,
.sheet-body::-webkit-scrollbar-thumb:hover,
.modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(70,108,84,.38) !important;
  background-clip: content-box !important;
}
html::-webkit-scrollbar-corner,
body::-webkit-scrollbar-corner,
.content::-webkit-scrollbar-corner,
.sheet-body::-webkit-scrollbar-corner,
.modal-body::-webkit-scrollbar-corner {
  background: transparent !important;
}

/* 桌面壳整体做一个圆角玻璃画框，消掉最外层的直角背景 */
body.desktop-shell .app,
html.desktop-shell .app {
  position: relative;
  border-radius: 34px !important;
  overflow: hidden !important;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(255,255,255,.55), rgba(255,255,255,0) 56%),
    radial-gradient(100% 90% at 100% 100%, rgba(196,210,255,.22), transparent 58%),
    linear-gradient(145deg, rgba(250,253,250,.6), rgba(240,247,252,.45)) !important;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.55),
    inset 0 1px 0 rgba(255,255,255,.85),
    0 24px 64px rgba(44,73,56,.10) !important;
}
body.desktop-shell::before,
html.desktop-shell body::before {
  border-radius: 28px;
  overflow: hidden;
}

/* 玻璃表面增加折射色彩和更自然的高光 */
.panel,
.card,
.audit-entry,
.dl-card,
.profile-open-card,
.profile-hero-panel,
.version-log-entry,
.batch-preview,
.related-suggest,
.user-table,
.stat-card,
.empty,
.login-card,
.login-brand {
  background:
    radial-gradient(72% 58% at 6% 0%, rgba(255,255,255,.96), rgba(255,255,255,.28) 34%, rgba(255,255,255,0) 64%),
    radial-gradient(60% 52% at 98% 2%, rgba(167,222,255,.34), rgba(167,222,255,0) 60%),
    radial-gradient(55% 46% at 18% 100%, rgba(176,247,212,.26), rgba(176,247,212,0) 62%),
    radial-gradient(46% 42% at 82% 100%, rgba(255,203,235,.18), rgba(255,203,235,0) 62%),
    linear-gradient(122deg, rgba(255,255,255,.72), rgba(255,255,255,.28) 34%, rgba(255,255,255,.17) 55%, rgba(255,255,255,.48) 82%, rgba(255,255,255,.76)),
    rgba(248,252,249,.56) !important;
  box-shadow:
    0 0 0 1px rgba(67,104,82,.16),
    inset 0 1px 0 #fff,
    inset 1px 0 0 rgba(255,255,255,.92),
    inset -1px 0 0 rgba(173,207,187,.58),
    inset 0 -2px 4px rgba(67,104,82,.1),
    0 1px 2px rgba(30,60,43,.1),
    0 12px 0 -10px rgba(67,104,82,.18),
    0 22px 36px -18px rgba(32,65,47,.25),
    0 48px 82px -42px rgba(32,65,47,.32) !important;
}

.topbar,
.sidebar,
.tabbar,
.account-menu,
.card-menu,
.search-suggest,
.modal,
.sheet,
.toast,
.install-bar {
  background:
    radial-gradient(80% 80% at 0% 0%, rgba(255,255,255,.7), rgba(255,255,255,0) 60%),
    radial-gradient(70% 80% at 100% 0%, rgba(167,219,255,.28), rgba(167,219,255,0) 60%),
    linear-gradient(125deg, rgba(255,255,255,.68), rgba(255,255,255,.28) 36%, rgba(255,255,255,.18) 58%, rgba(255,255,255,.5) 82%, rgba(255,255,255,.74)),
    rgba(248,252,249,.58) !important;
  box-shadow:
    0 0 0 1px rgba(67,104,82,.14),
    inset 0 1px 0 #fff,
    inset 1px 0 0 rgba(255,255,255,.8),
    inset -1px 0 0 rgba(173,207,187,.52),
    inset 0 -2px 4px rgba(63,101,78,.1),
    0 1px 2px rgba(30,60,43,.1),
    0 14px 0 -12px rgba(62,101,78,.2),
    0 26px 46px -22px rgba(28,61,43,.28),
    0 54px 92px -48px rgba(28,61,43,.32) !important;
}
.modal,
.sheet {
  background:
    radial-gradient(70% 60% at 0% 0%, rgba(255,255,255,.86), rgba(255,255,255,0) 64%),
    radial-gradient(60% 50% at 100% 0%, rgba(174,220,255,.26), rgba(174,220,255,0) 60%),
    linear-gradient(125deg, rgba(255,255,255,.97), rgba(255,255,255,.86) 42%, rgba(255,255,255,.8) 62%, rgba(255,255,255,.95)),
    #f9fcf9 !important;
}
.modal-head::after,
.topbar::after {
  background: linear-gradient(90deg, transparent, rgba(67,104,82,.2), transparent) !important;
}
.card-foot::before {
  background: linear-gradient(90deg, transparent, rgba(67,104,82,.15), transparent) !important;
}

/* 页面切换更柔和，弹窗/抽屉使用同一条弹簧曲线 */
.content.view-enter {
  animation: page-glass-in 300ms var(--m-spring) both !important;
}
@keyframes page-glass-in {
  from { opacity: 0; transform: translateY(7px) scale(.997); }
  to { opacity: 1; transform: none; }
}
.modal,
.sheet {
  transition:
    transform 340ms var(--m-spring),
    opacity 240ms var(--m-ease-soft),
    filter 240ms var(--m-ease-soft) !important;
}
.layer.open .modal { animation: glass-modal-in 340ms var(--m-spring) both; }
@keyframes glass-modal-in {
  from { opacity: 0; transform: translate(-50%, calc(-50% + 12px)) scale(.97); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@media (max-width: 640px) {
  .layer.open .modal {
    animation: glass-modal-mobile-in 320ms var(--m-spring) both;
  }
  @keyframes glass-modal-mobile-in {
    from { opacity: 0; transform: translateY(calc(-50% + 16px)) scale(.97); }
    to { opacity: 1; transform: translateY(-50%) scale(1); }
  }
}
.layer.open .sheet { animation: glass-sheet-in 360ms var(--m-spring) both; }
@keyframes glass-sheet-in {
  from { opacity: .2; transform: translateX(calc(100% + 22px)) scale(.985); }
  to { opacity: 1; transform: none; }
}
.layer.open .backdrop {
  animation: glass-backdrop-in 240ms var(--m-ease-soft) both;
}
@keyframes glass-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 手机弹窗和抽屉的圆角不会被父级裁成直角 */
@media (max-width: 640px) {
  .modal,
  .sheet {
    overflow: hidden !important;
    -webkit-mask-image: -webkit-radial-gradient(white, black);
  }
}


/* 手机抽屉从下方进入，不使用桌面的横向位移 */
@media (max-width: 640px) {
  .layer.open .sheet {
    animation: glass-sheet-mobile-in 360ms var(--m-spring) both;
  }
  @keyframes glass-sheet-mobile-in {
    from { opacity: .2; transform: translateY(calc(100% + 24px)) scale(.99); }
    to { opacity: 1; transform: none; }
  }
}

/* 减少动态效果时不改变布局和方向 */
@media (prefers-reduced-motion: reduce) {
  .content.view-enter,
  .layer.open .modal,
  .layer.open .sheet,
  .layer.open .backdrop {
    animation: none !important;
  }
}


/* ==================================================================
   MOBILE CORNER POLISH · 顶部栏改为完整悬浮玻璃卡，四角不再贴屏幕边缘
   ================================================================== */
@media (max-width: 640px) {
  .topbar {
    width: auto !important;
    margin: 10px 10px 0 !important;
    padding-left: 22px !important;
    padding-right: 22px !important;
    border-radius: 24px !important;
    box-sizing: border-box !important;
    box-shadow:
      0 0 0 1px rgba(67,104,82,.2),
      inset 0 1px 0 #fff,
      inset 1px 0 0 rgba(255,255,255,.82),
      inset -1px 0 0 rgba(181,211,192,.56),
      inset 0 -2px 3px rgba(63,101,78,.09),
      0 1px 2px rgba(30,60,43,.11),
      0 3px 0 -2px rgba(255,255,255,.8),
      0 8px 0 -6px rgba(62,101,78,.17),
      0 22px 38px -22px rgba(32,65,47,.28) !important;
  }
  .topbar::before {
    content: "";
    position: absolute;
    top: 1px;
    left: 22px;
    right: 22px;
    height: 1px;
    border-radius: 999px;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.96), transparent);
  }
  .topbar::after {
    left: 20px;
    right: 20px;
  }
  #appView .content {
    padding-top: 14px !important;
  }

  /* 手机端不显示滚动条轨道，避免右侧出现长条直角 */
  .content,
  .sheet-body,
  .modal-body,
  .search-suggest,
  .account-menu,
  .audit-list,
  .tags-row {
    scrollbar-width: none !important;
  }
  .content::-webkit-scrollbar,
  .sheet-body::-webkit-scrollbar,
  .modal-body::-webkit-scrollbar,
  .search-suggest::-webkit-scrollbar,
  .account-menu::-webkit-scrollbar,
  .audit-list::-webkit-scrollbar,
  .tags-row::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
  }
}

/* 悬浮玻璃顶栏和底栏保持一致的边缘光 */
@media (max-width: 640px) {
  .topbar,
  .tabbar {
    background-clip: padding-box;
  }
  .tabbar {
    margin-left: 10px !important;
    margin-right: 10px !important;
  }
}


/* 手机顶栏与内容边缘对齐，并保持副标题单行，避免圆角修好后高度变高 */
@media (max-width: 640px) {
  .topbar {
    margin: 12px 14px 0 !important;
    padding-left: 18px !important;
    padding-right: 18px !important;
  }
  .topbar-title {
    min-width: 0;
  }
  .topbar-title p {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 9.8px !important;
    line-height: 1.4;
    letter-spacing: 0;
  }
  .topbar::before {
    left: 18px;
    right: 18px;
  }
  .topbar::after {
    left: 16px;
    right: 16px;
  }
  .tabbar {
    margin-left: 14px !important;
    margin-right: 14px !important;
  }
}


/* 手机底部导航与顶部栏、内容左右边缘对齐 */
@media (max-width: 640px) {
  .tabbar {
    left: 14px !important;
    right: 14px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}


/* 同步云端等操作提示：深色玻璃底必须保持白色文字，避免被后加的浅色玻璃背景覆盖 */
.toast {
  background:
    radial-gradient(90% 120% at 0% 0%, rgba(255,255,255,.12), transparent 54%),
    linear-gradient(145deg, rgba(30,54,40,.97), rgba(18,38,27,.95)) !important;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,.2) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.16),
    0 2px 4px rgba(12,30,20,.2),
    0 14px 34px rgba(12,30,20,.34) !important;
  text-shadow: 0 1px 1px rgba(0,0,0,.22);
  max-width: min(92vw, 520px);
  padding: 12px 18px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: normal;
}
.toast * {
  color: inherit !important;
}


/* 同步完成等长提示：按内容扩展宽度，避免被挤成过窄竖排 */
.toast {
  width: max-content;
  max-width: min(calc(100vw - 48px), 420px) !important;
  box-sizing: border-box;
}
@media (max-width: 640px) {
  .toast {
    width: max-content;
    max-width: calc(100vw - 40px);
    padding: 11px 16px;
    font-size: 12px;
    line-height: 1.6;
  }
}


/* ==================================================================
   MAIN UI AIR · 主界面留白、菜单编排与液态玻璃重绘
   ================================================================== */

/* 主内容留白 */
#appView .content {
  padding-top: 24px !important;
  padding-bottom: 96px !important;
}
#appView .result-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px !important;
  padding: 9px 11px;
  border-radius: 20px;
  background:
    radial-gradient(100% 120% at 0% 0%, rgba(255,255,255,.74), rgba(255,255,255,.16) 56%, transparent 82%),
    rgba(255,255,255,.26);
  border: 1px solid rgba(255,255,255,.64);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.96),
    inset 0 -1px 0 rgba(69,105,83,.06),
    0 10px 28px -18px rgba(35,68,49,.24);
}
#appView .tags-row {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  overflow: visible !important;
  padding: 0 !important;
  -webkit-mask-image: none !important;
  mask-image: none !important;
  scrollbar-width: none;
}
#appView .result-head .chip {
  height: 34px;
  padding: 0 13px;
  font-size: 12px;
  border: 1px solid rgba(72,109,87,.11);
  background: linear-gradient(145deg, rgba(255,255,255,.76), rgba(244,251,247,.54)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.98),
    0 3px 9px -6px rgba(45,78,58,.18) !important;
}
#appView .result-head .chip.active {
  color: #173f2e !important;
  border-color: rgba(80,132,102,.26) !important;
  background:
    radial-gradient(110% 110% at 0% 0%, rgba(255,255,255,.9), rgba(255,255,255,.2) 64%),
    linear-gradient(145deg, rgba(213,241,227,.9), rgba(238,249,243,.78)) !important;
  box-shadow:
    inset 0 1px 0 #fff,
    0 4px 12px -7px rgba(35,69,49,.28) !important;
}
#appView .result-count {
  flex: none;
  margin-left: auto;
  color: #7b8c81;
}

/* 主界面卡片：更大留白、更柔和的玻璃反光 */
#appView .card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 20px !important;
}
#appView .card {
  min-height: 0 !important;
  padding: 20px !important;
  border-radius: 24px !important;
  background:
    radial-gradient(110% 90% at 4% 0%, rgba(255,255,255,.95), rgba(255,255,255,.3) 42%, rgba(255,255,255,0) 72%),
    radial-gradient(80% 90% at 100% 4%, rgba(174,220,255,.24), rgba(174,220,255,0) 60%),
    linear-gradient(150deg, rgba(255,255,255,.78), rgba(246,252,248,.48) 60%, rgba(255,255,255,.64)) !important;
  border: 1px solid rgba(255,255,255,.84) !important;
  box-shadow:
    0 0 0 1px rgba(67,104,82,.1),
    inset 0 1px 0 rgba(255,255,255,1),
    inset 1px 0 0 rgba(255,255,255,.8),
    inset 0 -1px 0 rgba(80,116,94,.05),
    0 2px 4px -3px rgba(32,65,47,.14),
    0 18px 36px -26px rgba(32,65,47,.3) !important;
}
#appView .card:hover {
  box-shadow:
    0 0 0 1px rgba(67,104,82,.13),
    inset 0 1px 0 #fff,
    inset 1px 0 0 rgba(255,255,255,.85),
    0 4px 10px -6px rgba(32,65,47,.18),
    0 24px 44px -28px rgba(32,65,47,.34) !important;
}
#appView .card-content {
  font-size: 13.5px !important;
  line-height: 1.85 !important;
  color: #30463a !important;
}
#appView .card .tags { gap: 6px; }
#appView .card-foot { padding-top: 12px !important; margin-top: auto; }
#appView .card-actions { gap: 6px; }
#appView .card-actions .copy-mini { width: 32px; height: 32px; }

/* 顶栏菜单分组：批量、添加、账号归入一个轻量玻璃工具条 */
#appView .topbar {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 440px) auto !important;
  gap: 20px !important;
  padding: 22px 34px 18px !important;
  border: 1px solid rgba(255,255,255,.82) !important;
  background:
    radial-gradient(90% 120% at 0% 0%, rgba(255,255,255,.8), rgba(255,255,255,.22) 48%, rgba(255,255,255,0) 80%),
    radial-gradient(80% 100% at 100% 0%, rgba(176,218,255,.22), transparent 60%),
    linear-gradient(135deg, rgba(255,255,255,.68), rgba(245,251,247,.5)) !important;
  box-shadow:
    0 0 0 1px rgba(67,104,82,.1),
    inset 0 1px 0 #fff,
    inset 0 -1px 0 rgba(72,108,86,.04),
    0 16px 36px -28px rgba(32,65,47,.3) !important;
}
#appView .topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.48), rgba(243,250,246,.24)) !important;
  border: 1px solid rgba(255,255,255,.62);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.9),
    0 6px 18px -14px rgba(32,65,47,.22);
}
#appView .topbar-actions .add-btn,
#appView .topbar-actions .account-chip {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.85),
    0 5px 12px -9px rgba(32,65,47,.24) !important;
}
#appView .topbar-title h1 { font-size: 25px !important; }
#appView .topbar-title p { margin-top: 4px !important; color: #829289 !important; }
#appView .searchbox {
  height: 46px !important;
  border-radius: 16px !important;
  background: rgba(255,255,255,.7) !important;
}
#appView .banner {
  margin-bottom: 18px !important;
  padding: 11px 15px !important;
  border-radius: 17px !important;
  background:
    radial-gradient(90% 120% at 0% 0%, rgba(255,255,255,.8), rgba(255,255,255,.2) 56%, transparent 80%),
    linear-gradient(135deg, rgba(255,247,230,.78), rgba(255,251,242,.54)) !important;
  border: 1px solid rgba(255,255,255,.7) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.96),
    0 10px 25px -22px rgba(90,70,30,.3) !important;
}

/* 桌面菜单间距 */
#appView .side-nav { display: grid; gap: 6px; }
#appView .sidebar .nav-item {
  padding: 11px 13px !important;
  border-radius: 16px !important;
}
#appView .sidebar .nav-item + .nav-item { margin-top: 0; }
#appView .tabbar { gap: 8px !important; padding: 7px !important; }
#appView .tab { border-radius: 20px !important; }

/* 手机主界面：单列卡片、筛选两行自然换行、减少拥挤 */
@media (max-width: 640px) {
  #appView .topbar {
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 10px !important;
    padding: 15px 17px 14px !important;
  }
  #appView .topbar-title h1 { font-size: 23px !important; }
  #appView .topbar-title p { font-size: 9.8px !important; }
  #appView .topbar-actions {
    gap: 5px;
    padding: 4px;
    border-radius: 16px;
  }
  #appView .topbar-actions .add-btn {
    width: 34px !important;
    height: 34px !important;
    border-radius: 50% !important;
  }
  #appView .topbar-actions .account-chip {
    width: 38px !important;
    height: 38px !important;
    border-radius: 13px !important;
  }
  #appView .searchbox {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    height: 42px !important;
    margin-top: 2px;
    border-radius: 14px !important;
  }
  #appView .content {
    padding: 12px 16px calc(112px + env(safe-area-inset-bottom)) !important;
  }
  #appView .banner {
    margin: 0 0 14px !important;
    padding: 10px 13px !important;
    font-size: 11.5px;
  }
  #appView .result-head {
    display: block !important;
    margin-bottom: 16px !important;
    padding: 8px;
    border-radius: 18px;
  }
  #appView .tags-row {
    gap: 7px;
  }
  #appView .result-head .chip {
    height: 32px;
    padding: 0 11px;
    font-size: 11.5px;
  }
  #appView .result-count { display: none !important; }
  #appView .card-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
  #appView .card {
    padding: 18px !important;
    border-radius: 22px !important;
    aspect-ratio: auto !important;
  }
  #appView .card-content {
    -webkit-line-clamp: 5 !important;
    font-size: 13.5px !important;
    line-height: 1.85 !important;
  }
  #appView .card-foot {
    padding-top: 11px !important;
  }
  #appView .card .tags { display: flex !important; }
  #appView .card-foot .card-meta { font-size: 10px; }
  #appView .tabbar {
    gap: 8px !important;
    padding: 6px !important;
  }
  #appView .tabbar .tab {
    padding: 9px 0 8px !important;
    border-radius: 19px !important;
  }
}

/* 中等宽度：两列，给卡片更多呼吸 */
@media (min-width: 641px) and (max-width: 1180px) {
  #appView .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 18px !important; }
  #appView .topbar { grid-template-columns: minmax(0, 1fr) minmax(220px, 340px) auto !important; gap: 14px !important; }
}

/* 更贴合观感的玻璃：顶栏和筛选栏减少硬外圈，保留柔和反光 */
#appView .topbar,
#appView .result-head {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
#appView .topbar::after {
  left: 24px;
  right: 24px;
  background: linear-gradient(90deg, transparent, rgba(70,108,84,.12), transparent) !important;
}
#appView .card::after {
  opacity: .42;
  background:
    linear-gradient(125deg, rgba(255,255,255,.66), transparent 30%, transparent 62%, rgba(255,255,255,.22) 82%, rgba(255,255,255,.42)) !important;
}
#appView .card:hover::after { opacity: .72; }


/* MAIN UI AIR v2 · 卡片玻璃更通透，手机筛选只占一行 */
#appView .card {
  background:
    radial-gradient(120% 105% at 0% 0%, rgba(255,255,255,.96), rgba(255,255,255,.34) 34%, rgba(255,255,255,0) 66%),
    radial-gradient(85% 100% at 100% 2%, rgba(169,215,255,.3), rgba(169,215,255,0) 58%),
    radial-gradient(85% 100% at 12% 100%, rgba(177,241,213,.24), rgba(177,241,213,0) 60%),
    linear-gradient(140deg, rgba(255,255,255,.68), rgba(248,253,250,.48) 62%, rgba(255,255,255,.62)) !important;
  box-shadow:
    0 0 0 1px rgba(67,104,82,.12),
    inset 0 1px 0 #fff,
    inset 1px 0 0 rgba(255,255,255,.86),
    inset 0 -1px 0 rgba(77,115,92,.06),
    0 2px 4px -3px rgba(32,65,47,.15),
    0 18px 38px -26px rgba(32,65,47,.32) !important;
}
#appView .card::after {
  opacity: .5 !important;
  background:
    linear-gradient(125deg, rgba(255,255,255,.72), transparent 26%, transparent 62%, rgba(255,255,255,.26) 82%, rgba(255,255,255,.5)) !important;
}
#appView .card:hover::after { opacity: .82 !important; }
#appView .searchbox {
  background:
    linear-gradient(145deg, rgba(255,255,255,.84), rgba(248,253,250,.66)) !important;
}

@media (max-width: 640px) {
  #appView .topbar-title p {
    font-size: 9.3px !important;
    letter-spacing: -.1px;
  }
  #appView .topbar-actions {
    gap: 4px;
    padding: 4px;
  }
  #appView .result-head {
    display: flex !important;
    align-items: center;
    padding: 8px 10px !important;
    overflow: hidden;
  }
  #appView .tags-row {
    flex: 1;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 0 22px 0 0 !important;
    gap: 8px !important;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 20px), transparent 100%) !important;
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 20px), transparent 100%) !important;
  }
  #appView .tags-row::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; }
  #appView .result-head .chip {
    flex: 0 0 auto;
    scroll-snap-align: start;
    height: 33px;
    padding: 0 12px;
  }
  #appView .card {
    padding: 18px 18px 15px !important;
    border-radius: 23px !important;
  }
  #appView .card-content {
    -webkit-line-clamp: 6 !important;
  }
  #appView .card-grid { gap: 15px !important; }
}


/* MAIN UI AIR v3 · 筛选条滚动宽度、卡片空白与底栏通透度修正 */
#appView .result-head {
  justify-content: flex-start !important;
}
#appView .tags-row {
  width: 0 !important;
  max-width: 100% !important;
  flex: 1 1 0% !important;
}
#appView .card-foot {
  margin-top: 12px !important;
}
#appView .tabbar {
  background:
    radial-gradient(100% 100% at 0% 0%, rgba(255,255,255,.92), rgba(255,255,255,.34) 48%, rgba(255,255,255,.16)),
    linear-gradient(145deg, rgba(249,252,249,.96), rgba(244,250,246,.94)) !important;
}
@media (max-width: 640px) {
  #appView .card-foot { margin-top: 10px !important; }
  #appView .card { height: auto !important; }
}


/* MAIN UI AIR v4 · 手机筛选条改为块级滚动，底栏增加实色玻璃底 */
@media (max-width: 640px) {
  #appView .result-head {
    display: block !important;
  }
  #appView .tags-row {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
    box-sizing: border-box;
  }
  #appView .tabbar {
    background:
      radial-gradient(100% 100% at 0% 0%, rgba(255,255,255,.92), rgba(255,255,255,.3) 48%, rgba(255,255,255,.14)),
      linear-gradient(145deg, rgba(249,252,249,.98), rgba(244,250,246,.97)),
      #f7fbf8 !important;
  }
}


/* MAIN UI AIR v5 · 底部导航独立玻璃底座（tabbar 在 #appView 外层） */
.tabbar {
  gap: 9px !important;
  padding: 7px !important;
  background:
    radial-gradient(95% 120% at 0% 0%, rgba(255,255,255,.94), rgba(255,255,255,.36) 48%, rgba(255,255,255,.16)),
    radial-gradient(80% 100% at 100% 100%, rgba(178,220,255,.2), rgba(178,220,255,0) 62%),
    linear-gradient(145deg, rgba(250,253,250,.98), rgba(244,250,246,.97)),
    #f7fbf8 !important;
  border: 1px solid rgba(255,255,255,.8) !important;
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 -1px 0 rgba(78,116,92,.07),
    0 0 0 1px rgba(67,104,82,.1),
    0 18px 40px -24px rgba(35,68,49,.28) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.tabbar .tab {
  border-radius: 19px !important;
  padding: 9px 0 8px !important;
}
.tabbar .tab.active {
  background:
    radial-gradient(120% 110% at 0% 0%, rgba(255,255,255,.95), rgba(255,255,255,.24) 58%),
    linear-gradient(145deg, rgba(212,241,226,.92), rgba(238,249,243,.8)) !important;
}
@media (max-width: 640px) {
  .tabbar {
    left: 14px !important;
    right: 14px !important;
    bottom: calc(10px + env(safe-area-inset-bottom)) !important;
    padding: 6px !important;
    gap: 8px !important;
  }
}


/* MAIN UI AIR v6 · 中等宽度桌面顶部栏改为两行，避免标题、搜索、按钮互相挤压 */
#appView .topbar-title {
  min-width: 0;
}
#appView .topbar-title p {
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (min-width: 641px) {
  #appView .tags-row {
    width: auto !important;
    flex: 1 1 auto !important;
  }
}
@media (min-width: 641px) and (max-width: 1240px) {
  #appView .topbar {
    grid-template-columns: minmax(0, 1fr) auto !important;
    row-gap: 14px !important;
    padding: 20px 26px 16px !important;
  }
  #appView .searchbox {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    max-width: none !important;
    height: 44px !important;
  }
  #appView .topbar-actions {
    align-self: center;
  }
  #appView .content {
    padding-left: 26px !important;
    padding-right: 26px !important;
  }
  #appView .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 20px !important;
  }
  #appView .card {
    padding: 21px !important;
  }
}
@media (max-width: 980px) and (min-width: 641px) {
  #appView .topbar-title h1 { font-size: 23px !important; }
  #appView .topbar-title p { font-size: 10px !important; }
  #appView .topbar {
    padding-left: 22px !important;
    padding-right: 22px !important;
  }
  #appView .content {
    padding-left: 22px !important;
    padding-right: 22px !important;
  }
}


/* MAIN UI AIR v7 · 统一两行顶栏：标题/菜单一行，搜索独占一行 */
#appView .topbar {
  grid-template-columns: minmax(0, 1fr) auto !important;
  row-gap: 14px !important;
}
#appView .searchbox {
  grid-column: 1 / -1 !important;
  grid-row: 2 !important;
  width: 100% !important;
  max-width: 860px !important;
  height: 46px !important;
  margin-top: 0 !important;
}
#appView .topbar-actions {
  justify-self: end;
  align-self: center;
}
#appView .topbar-title {
  padding-right: 16px;
}
#appView .topbar-title p {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 筛选菜单统一单行，可横向滑动，不再换行堆高 */
#appView .tags-row {
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 26px), transparent 100%) !important;
  mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 26px), transparent 100%) !important;
}
#appView .tags-row::-webkit-scrollbar { display: none !important; }
#appView .result-head .chip {
  flex: 0 0 auto !important;
}

@media (max-width: 640px) {
  #appView .searchbox {
    max-width: none !important;
    height: 42px !important;
  }
}


/* ==================================================================
   ACCOUNT TABLE ALIGN · 账号管理行文字严格对齐
   ================================================================== */
#appView .user-table {
  overflow: hidden;
}
#appView .user-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.15fr) 118px minmax(130px, 1fr) 88px minmax(238px, auto);
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
}
#appView .user-row.head {
  grid-template-columns: minmax(150px, 1.15fr) 118px minmax(130px, 1fr) 88px minmax(238px, auto);
  align-items: center;
  padding: 12px 20px;
  font-size: 10.5px;
  letter-spacing: .2px;
  color: #8b9991;
  background: rgba(247, 251, 248, .78) !important;
}
#appView .user-row.head span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#appView .user-row.head span:last-child {
  text-align: right;
}
#appView .user-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
#appView .user-identity > div {
  min-width: 0;
}
#appView .user-identity .u-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#appView .user-identity .u-account {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#appView .user-role-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  min-width: 0;
}
#appView .user-role-line {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
#appView .user-script-count {
  font-size: 10.5px;
  color: #8b9991;
  white-space: nowrap;
}
#appView .user-perm-cell {
  min-width: 0;
}
#appView .perm-summary {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #8b9991;
  font-size: 10.5px;
  line-height: 1.55;
  white-space: normal;
  overflow-wrap: anywhere;
}
#appView .user-created-cell {
  color: #8b9991;
  font-size: 10.5px;
  white-space: nowrap;
}
#appView .user-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}
#appView .user-actions .mini-btn {
  flex: none;
}
#appView .user-row:not(.head):hover {
  background: rgba(244, 250, 246, .7) !important;
}
#appView .user-row.head + .user-row {
  border-top: 0;
}

@media (max-width: 980px) {
  #appView .user-row,
  #appView .user-row.head {
    grid-template-columns: minmax(148px, 1.1fr) 112px minmax(120px, 1fr) 84px minmax(210px, auto);
    gap: 10px;
    padding-left: 14px;
    padding-right: 14px;
  }
  #appView .user-actions {
    gap: 4px;
  }
  #appView .user-actions .mini-btn {
    padding-left: 7px;
    padding-right: 7px;
    font-size: 10.5px;
  }
}
@media (max-width: 760px) {
  #appView .user-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px 12px;
    padding: 15px 16px;
  }
  #appView .user-row.head {
    display: none;
  }
  #appView .user-identity {
    grid-column: 1;
    grid-row: 1;
  }
  #appView .user-role-cell {
    grid-column: 1 / -1;
    grid-row: 2;
    flex-direction: row;
    align-items: center;
    gap: 9px;
  }
  #appView .user-perm-cell {
    grid-column: 1 / -1;
    grid-row: 3;
  }
  #appView .user-created-cell {
    grid-column: 1;
    grid-row: 4;
  }
  #appView .user-actions {
    grid-column: 1 / -1;
    grid-row: 5;
    justify-content: flex-start;
    padding-top: 2px;
  }
  #appView .perm-summary {
    -webkit-line-clamp: 2;
  }
}


/* 账号表单列宽压缩到面板内，操作区不溢出 */
#appView .user-row {
  gap: 12px;
  grid-template-columns: minmax(150px, 1.15fr) 118px minmax(130px, 1fr) 88px minmax(238px, auto);
}
#appView .user-row.head {
  grid-template-columns: minmax(150px, 1.15fr) 118px minmax(130px, 1fr) 88px minmax(238px, auto);
}


/* ACCOUNT TABLE ALIGN v2 · 所有行使用完全相同的列宽，操作列固定宽 */
#appView .user-row,
#appView .user-row.head {
  grid-template-columns: 185px 118px minmax(0, 1fr) 88px 250px !important;
  gap: 12px !important;
}
#appView .user-actions {
  justify-content: flex-end !important;
  flex-wrap: nowrap !important;
  gap: 4px !important;
  overflow: hidden;
}
#appView .user-actions .mini-btn {
  padding: 0 7px !important;
  font-size: 10.5px !important;
}
@media (max-width: 1040px) and (min-width: 761px) {
  #appView .user-row,
  #appView .user-row.head {
    grid-template-columns: 165px 112px minmax(0, 1fr) 86px 232px !important;
    gap: 8px !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
  #appView .user-actions .mini-btn {
    padding: 0 6px !important;
    font-size: 10px !important;
  }
}


/* 账号管理页：顶部只保留页面标题，隐藏右侧账号菜单 */
body.view-accounts #appView .topbar-actions {
  display: none !important;
}
body.view-accounts #appView .topbar {
  grid-template-columns: minmax(0, 1fr) !important;
  row-gap: 0 !important;
}


/* 版本日志完整展示：列表过长时在面板内滚动 */
.version-log-list {
  max-height: min(62vh, 680px);
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}
.version-log-list::-webkit-scrollbar { width: 7px; }
.version-log-list::-webkit-scrollbar-thumb {
  background: rgba(70,108,84,.22);
  border-radius: 999px;
}


/* MAIN UI AIR v8 · 桌面/平板恢复单行顶栏，菜单按钮图标化；侧边栏与内容留缝 */
@media (min-width: 641px) {
  #appView .topbar {
    grid-template-columns: minmax(150px, 1.2fr) minmax(230px, 360px) auto !important;
    gap: 16px !important;
    row-gap: 0 !important;
    padding: 21px 26px 17px !important;
    align-items: center !important;
  }
  #appView .searchbox {
    grid-column: auto !important;
    grid-row: auto !important;
    width: 100% !important;
    max-width: none !important;
    height: 44px !important;
    margin-top: 0 !important;
  }
  #appView .topbar-title {
    padding-right: 0 !important;
  }
  #appView .topbar-title h1 {
    font-size: 23px !important;
  }
  #appView .topbar-title p {
    font-size: 10px !important;
  }
}
@media (min-width: 641px) and (max-width: 1320px) {
  #appView .topbar-actions {
    gap: 6px !important;
    padding: 4px !important;
  }
  #appView .topbar-actions .add-btn {
    width: 42px !important;
    height: 42px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    justify-content: center;
  }
  #appView .topbar-actions .add-btn span {
    display: none !important;
  }
  #appView .topbar-actions .account-chip {
    width: 42px !important;
    height: 42px !important;
  }
}
@media (min-width: 1025px) {
  #appView .workspace {
    margin-left: 16px !important;
  }
}
body.view-profile #appView .topbar,
body.view-accounts #appView .topbar {
  grid-template-columns: minmax(0, 1fr) !important;
}
body.view-profile #appView .searchbox,
body.view-accounts #appView .searchbox {
  grid-column: auto !important;
}


/* 账号下拉、卡片菜单和搜索建议使用实色玻璃底，避免透出页面文字 */
.account-menu,
.card-menu,
.search-suggest,
.account-menu.open {
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(255,255,255,.99), rgba(255,255,255,.72) 34%, rgba(255,255,255,.58) 56%, rgba(255,255,255,.9) 82%),
    linear-gradient(145deg, rgba(251,253,251,.99), rgba(245,250,247,.985)),
    #f8fbf9 !important;
  border: 1px solid rgba(255,255,255,.92) !important;
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 -1px 0 rgba(71,108,86,.055),
    0 2px 5px rgba(25,56,39,.08),
    0 24px 60px rgba(25,56,39,.2) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.account-menu::before,
.card-menu::before,
.search-suggest::before {
  content: none !important;
}


/* 批量添加入口保持文字标签，避免只显示一个难以理解的图标 */
#appView .topbar-actions .batch-add-btn {
  width: auto !important;
  min-width: 0 !important;
  padding: 0 12px !important;
  border-radius: 14px !important;
  gap: 6px !important;
}
#appView .topbar-actions .batch-add-btn span {
  display: inline !important;
  font-size: 11.5px !important;
}
#appView .topbar-actions .batch-add-btn svg {
  width: 16px;
  height: 16px;
}
@media (min-width: 641px) and (max-width: 940px) {
  #appView .topbar {
    grid-template-columns: minmax(0, 1fr) auto !important;
    row-gap: 10px !important;
  }
  #appView .searchbox {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    max-width: none !important;
  }
}
@media (max-width: 640px) {
  #appView .topbar-actions .batch-add-btn {
    width: auto !important;
    height: 34px !important;
    padding: 0 9px !important;
    border-radius: 17px !important;
    gap: 4px !important;
  }
  #appView .topbar-actions .batch-add-btn span {
    font-size: 10px !important;
  }
  #appView .topbar-actions .batch-add-btn svg {
    width: 14px;
    height: 14px;
  }
}


/* ==================================================================
   BOTTOM DOCK · 左侧菜单移到底部居中，顶部品牌上移
   ================================================================== */
#appView .sidebar {
  display: none !important;
}
#appView .workspace {
  margin-left: 0 !important;
  width: 100% !important;
}
#appView .topbar-title {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}
#appView .topbar-heading {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
#appView .topbar-brand-mark {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 13px;
  background:
    radial-gradient(100% 100% at 0% 0%, rgba(255,255,255,.97), rgba(205,244,226,.7)),
    #e8f7ef;
  border: 1px solid rgba(255,255,255,.9);
  box-shadow:
    inset 0 1px 0 #fff,
    0 7px 16px -10px rgba(40,86,61,.28);
}
#appView .topbar-brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (max-width: 640px) {
  #appView .topbar-brand-mark { display: none !important; }
}

@media (min-width: 641px) {
  #appView.app {
    height: 100dvh !important;
    min-height: 0 !important;
    padding: 14px 18px 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  #appView .workspace {
    height: 100% !important;
    margin: 0 !important;
    border-radius: 28px !important;
    overflow: hidden !important;
  }
  #appView .topbar {
    border-radius: 26px !important;
  }
}

.tabbar[hidden] { display: none !important; }
.tabbar {
  display: flex !important;
  position: fixed !important;
  left: 50% !important;
  right: auto !important;
  bottom: calc(16px + env(safe-area-inset-bottom)) !important;
  width: min(440px, calc(100vw - 40px)) !important;
  transform: translateX(-50%) !important;
  z-index: 95 !important;
  gap: 9px !important;
  padding: 7px !important;
  border-radius: 30px !important;
  background:
    radial-gradient(95% 120% at 0% 0%, rgba(255,255,255,.95), rgba(255,255,255,.4) 48%, rgba(255,255,255,.18)),
    linear-gradient(145deg, rgba(250,253,250,.98), rgba(243,250,246,.97)),
    #f7fbf8 !important;
  border: 1px solid rgba(255,255,255,.86) !important;
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 -1px 0 rgba(78,116,92,.06),
    0 0 0 1px rgba(67,104,82,.09),
    0 18px 46px -22px rgba(35,68,49,.34) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.tabbar .tab {
  border-radius: 22px !important;
  padding: 10px 0 9px !important;
  font-size: 11px !important;
  gap: 3px;
}
.tabbar .tab svg {
  width: 21px;
  height: 21px;
}
.tabbar .tab[data-view="library"].active {
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(255,255,255,.95), rgba(255,255,255,.2) 62%),
    linear-gradient(145deg, rgba(199,246,224,.95), rgba(217,240,255,.9)) !important;
  color: #1b5a42 !important;
  box-shadow:
    inset 0 1px 0 #fff,
    0 8px 18px -10px rgba(30,105,73,.32) !important;
}
.tabbar .tab[data-view="profile"].active {
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(255,255,255,.95), rgba(255,255,255,.2) 62%),
    linear-gradient(145deg, rgba(231,224,255,.95), rgba(255,228,240,.9)) !important;
  color: #594a91 !important;
  box-shadow:
    inset 0 1px 0 #fff,
    0 8px 18px -10px rgba(105,84,156,.28) !important;
}
@media (max-width: 640px) {
  .tabbar {
    width: calc(100vw - 28px) !important;
    bottom: calc(10px + env(safe-area-inset-bottom)) !important;
    padding: 6px !important;
    gap: 8px !important;
    border-radius: 28px !important;
  }
}
#appView .content {
  padding-bottom: 124px !important;
}
.toast {
  bottom: calc(96px + env(safe-area-inset-bottom)) !important;
}

/* ==================================================================
   COLORFUL GLASS · 主界面多色环境光
   ================================================================== */
#appView.app {
  background:
    radial-gradient(circle at 0% 0%, rgba(156, 244, 203, .72), transparent 32%),
    radial-gradient(circle at 100% 0%, rgba(165, 205, 255, .64), transparent 36%),
    radial-gradient(circle at 100% 100%, rgba(255, 194, 225, .44), transparent 40%),
    radial-gradient(circle at 0% 100%, rgba(255, 226, 165, .38), transparent 42%),
    linear-gradient(145deg, #edf8f1 0%, #eef4ff 48%, #f8eef8 100%) !important;
}
#appView .topbar {
  background:
    radial-gradient(90% 120% at 0% 0%, rgba(255,255,255,.84), rgba(255,255,255,.24) 48%, rgba(255,255,255,0) 80%),
    radial-gradient(90% 100% at 100% 0%, rgba(186, 218, 255, .27), transparent 62%),
    radial-gradient(80% 100% at 100% 100%, rgba(255, 208, 232, .16), transparent 60%),
    linear-gradient(135deg, rgba(255,255,255,.72), rgba(246,252,248,.52)) !important;
}
#appView .result-head {
  background:
    radial-gradient(100% 120% at 0% 0%, rgba(255,255,255,.76), rgba(255,255,255,.18) 56%, transparent 82%),
    radial-gradient(80% 120% at 100% 0%, rgba(185, 222, 255, .18), transparent 65%),
    rgba(255,255,255,.26) !important;
}
#appView .card:nth-child(3n+1) {
  background:
    radial-gradient(110% 90% at 4% 0%, rgba(255,255,255,.96), rgba(255,255,255,.32) 42%, transparent 72%),
    radial-gradient(85% 100% at 100% 0%, rgba(174, 240, 206, .27), transparent 62%),
    radial-gradient(80% 100% at 12% 100%, rgba(255, 231, 177, .16), transparent 60%),
    linear-gradient(145deg, rgba(255,255,255,.74), rgba(242,251,246,.5)) !important;
}
#appView .card:nth-child(3n+2) {
  background:
    radial-gradient(110% 90% at 4% 0%, rgba(255,255,255,.96), rgba(255,255,255,.32) 42%, transparent 72%),
    radial-gradient(85% 100% at 100% 0%, rgba(172, 209, 255, .29), transparent 62%),
    radial-gradient(80% 100% at 12% 100%, rgba(213, 196, 255, .18), transparent 60%),
    linear-gradient(145deg, rgba(255,255,255,.74), rgba(244,248,255,.5)) !important;
}
#appView .card:nth-child(3n+3) {
  background:
    radial-gradient(110% 90% at 4% 0%, rgba(255,255,255,.96), rgba(255,255,255,.32) 42%, transparent 72%),
    radial-gradient(85% 100% at 100% 0%, rgba(255, 198, 226, .24), transparent 62%),
    radial-gradient(80% 100% at 12% 100%, rgba(255, 226, 180, .17), transparent 60%),
    linear-gradient(145deg, rgba(255,255,255,.74), rgba(255,246,251,.5)) !important;
}
.tabbar {
  background:
    radial-gradient(95% 120% at 0% 0%, rgba(255,255,255,.95), rgba(255,255,255,.4) 48%, rgba(255,255,255,.18)),
    radial-gradient(80% 100% at 100% 100%, rgba(195, 222, 255, .22), transparent 64%),
    linear-gradient(145deg, rgba(250,253,250,.98), rgba(243,250,246,.97)),
    #f7fbf8 !important;
}

/* ==================================================================
   SCROLL ELASTIC · 拉到底部/顶部时的弹性拉扯动画
   ================================================================== */
.content,
.sheet-body,
.modal-body {
  overscroll-behavior-y: contain;
}
.scroll-stretch {
  transition: transform 460ms cubic-bezier(.16, 1, .3, 1);
}
.scroll-stretch.is-pulling {
  transition: none !important;
  will-change: transform;
}
.scroll-stretch.is-pulling.pull-top {
  transform: translateY(var(--pull, 0px)) scaleY(var(--stretch, 1));
  transform-origin: center top;
}
.scroll-stretch.is-pulling.pull-bottom {
  transform: translateY(var(--pull, 0px)) scaleY(var(--stretch, 1));
  transform-origin: center bottom;
}
@media (prefers-reduced-motion: reduce) {
  .scroll-stretch,
  .scroll-stretch.is-pulling {
    transition: none !important;
    transform: none !important;
  }
}


/* 让滚动拉扯的 transform 不被一次性入场动画的 fill-mode 锁住 */
.content.view-enter {
  animation-fill-mode: backwards !important;
}
.layer.open .sheet-body {
  animation-fill-mode: backwards !important;
}


/* 底部导航图标和文字必须纵向居中排列 */
.tabbar .tab {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  line-height: 1.2 !important;
  text-align: center !important;
}
.tabbar .tab svg {
  display: block !important;
  flex: none !important;
  margin: 0 !important;
}
.tabbar .tab span {
  display: block !important;
  margin: 0 !important;
  line-height: 1.2 !important;
}


/* 打开话术详情：从被点击的卡片位置展开到详情面板 */
.layer.open .sheet.from-card {
  animation: sheet-expand-from-card 560ms cubic-bezier(.2, .72, .25, 1) both !important;
  overflow: hidden !important;
}
@keyframes sheet-expand-from-card {
  0% {
    opacity: .92;
    translate: var(--sheet-fx, 0px) var(--sheet-fy, 24px);
    scale: var(--sheet-sx, .96) var(--sheet-sy, .96);
    border-radius: 24px;
  }
  55% { opacity: 1; }
  100% {
    opacity: 1;
    translate: 0 0;
    scale: 1 1;
    border-radius: 30px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .layer.open .sheet.from-card { animation: none !important; }
}


.sheet {
  translate: none;
  scale: none;
}
.layer.open .sheet.from-card {
  translate: none;
  scale: none;
}


/* 我的页面不再显示副标题 */
body.view-profile #pageSub,
#pageSub:empty {
  display: none !important;
}


/* ==================================================================
   ORIGINOS 7 THEME · 取消液态玻璃，改为多彩、年轻、立体、流体动效
   ================================================================== */
:root {
  --os-ink: #1d2333;
  --os-muted: #747b8f;
  --os-soft-line: rgba(55, 61, 96, .09);
  --os-blue: #6fa8ff;
  --os-violet: #9d8cff;
  --os-mint: #55ddb1;
  --os-coral: #ff8fa8;
  --os-yellow: #ffc857;
  --os-cyan: #63ddf3;
  --os-pink: #ff9dcc;
  --os-paper: #fffdfa;
  --os-spring: cubic-bezier(.2, .9, .2, 1);
}

#appView.app,
#loginView.login {
  background:
    radial-gradient(circle at 0% 0%, rgba(139, 244, 199, .84), transparent 34%),
    radial-gradient(circle at 100% 0%, rgba(151, 199, 255, .8), transparent 37%),
    radial-gradient(circle at 100% 100%, rgba(255, 174, 211, .65), transparent 40%),
    radial-gradient(circle at 0% 100%, rgba(255, 226, 149, .68), transparent 38%),
    linear-gradient(145deg, #eefbf5 0%, #eef5ff 44%, #fff0f8 100%) !important;
}
#appView.app {
  isolation: isolate;
}
#appView.app::before,
#appView.app::after {
  content: "";
  position: fixed;
  z-index: 0;
  pointer-events: none;
  border-radius: 50%;
  filter: none;
}
#appView.app::before {
  width: 56vw;
  height: 56vw;
  left: -18vw;
  top: -24vw;
  background: radial-gradient(circle, rgba(93, 235, 188, .38), rgba(93, 235, 188, 0) 68%);
  animation: os-blob-a 22s ease-in-out infinite alternate;
}
#appView.app::after {
  width: 50vw;
  height: 50vw;
  right: -16vw;
  bottom: -22vw;
  background: radial-gradient(circle, rgba(163, 146, 255, .3), rgba(163, 146, 255, 0) 68%);
  animation: os-blob-b 26s ease-in-out infinite alternate;
}
#appView .workspace { position: relative; z-index: 1; }
@keyframes os-blob-a {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(8vw, 5vw, 0) scale(1.14); }
}
@keyframes os-blob-b {
  0% { transform: translate3d(0, 0, 0) scale(1.05); }
  100% { transform: translate3d(-7vw, -4vw, 0) scale(.94); }
}

/* 顶栏：实色奶油白，彩色立体边 */
#appView .topbar {
  border: 1px solid rgba(255, 255, 255, .9) !important;
  border-radius: 27px !important;
  background:
    radial-gradient(90% 110% at 0% 0%, rgba(255, 255, 255, .96), rgba(255, 255, 255, .35) 46%, rgba(255, 255, 255, 0) 75%),
    linear-gradient(135deg, #fffdfb, #f2f7ff 52%, #fbf2ff) !important;
  box-shadow:
    inset 0 1px 0 #fff,
    0 5px 0 -2px #dfdcff,
    0 20px 38px -26px rgba(54, 48, 96, .3) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
#appView .topbar::after {
  background: linear-gradient(90deg, transparent, rgba(158, 140, 255, .16), transparent) !important;
}
#appView .topbar-brand-mark {
  background:
    radial-gradient(100% 100% at 0% 0%, rgba(255, 255, 255, .9), rgba(185, 255, 228, .75)),
    #c8f7df !important;
  border: 1px solid rgba(255, 255, 255, .92) !important;
  box-shadow:
    inset 0 1px 0 #fff,
    0 4px 0 -1px #a7e7cf,
    0 9px 18px -12px rgba(36, 114, 81, .35) !important;
}
#appView .topbar-title h1 { color: var(--os-ink) !important; }
#appView .topbar-title p { color: #7c8295 !important; }
#appView .topbar-actions {
  background: linear-gradient(145deg, #fff, #f6f1ff) !important;
  border: 1px solid rgba(226, 218, 255, .95) !important;
  box-shadow:
    inset 0 1px 0 #fff,
    0 3px 0 -1px #ddd4ff,
    0 10px 18px -16px rgba(64, 51, 120, .28) !important;
}
#appView .searchbox {
  background: #ffffff !important;
  border: 1px solid #e7e2f8 !important;
  border-radius: 16px !important;
  box-shadow:
    inset 0 2px 0 rgba(80, 62, 140, .035),
    0 3px 0 -2px #e5defa !important;
}
#appView .searchbox input { color: var(--os-ink) !important; }
#appView .searchbox svg { color: #9a90bb !important; }

/* 面板：实色纸面 + 彩色立体底边 */
#appView .panel,
#appView .audit-entry,
#appView .dl-card,
#appView .profile-open-card,
#appView .profile-hero-panel,
#appView .version-log-entry,
#appView .batch-preview,
#appView .related-suggest,
#appView .user-table,
#appView .stat-card,
#appView .empty {
  background: linear-gradient(145deg, #fffdfa, #f7f3ff) !important;
  border: 1px solid rgba(255, 255, 255, .92) !important;
  border-radius: 26px !important;
  box-shadow:
    inset 0 1px 0 #fff,
    0 5px 0 -2px #e1dbf6,
    0 20px 36px -28px rgba(53, 43, 102, .28) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
#appView .profile-hero {
  background: linear-gradient(135deg, #e6fff4, #eaf2ff 56%, #fff0fb) !important;
  border: 1px solid rgba(255, 255, 255, .9) !important;
  border-radius: 22px !important;
  box-shadow: inset 0 1px 0 #fff, 0 3px 0 -1px #d9ecf7 !important;
}

/* 话术卡片：五套年轻色，立体底边 */
#appView .card {
  --os-card-a: #ecfff7;
  --os-card-b: #d4f9e7;
  --os-edge: #9ae5c8;
  background: linear-gradient(150deg, var(--os-card-a), var(--os-card-b)) !important;
  border: 1px solid rgba(255, 255, 255, .92) !important;
  border-radius: 25px !important;
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 -1px 0 rgba(42, 84, 66, .05),
    0 6px 0 -2px var(--os-edge),
    0 22px 38px -28px rgba(43, 77, 61, .34) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transition: transform 300ms var(--os-spring), box-shadow 300ms var(--os-spring), background 300ms ease !important;
}
#appView .card:nth-child(5n+2) {
  --os-card-a: #eef6ff;
  --os-card-b: #d6e8ff;
  --os-edge: #9ac5ff;
}
#appView .card:nth-child(5n+3) {
  --os-card-a: #fff3f8;
  --os-card-b: #ffdcea;
  --os-edge: #ffa7c6;
}
#appView .card:nth-child(5n+4) {
  --os-card-a: #fffaf0;
  --os-card-b: #ffe9bd;
  --os-edge: #ffd06b;
}
#appView .card:nth-child(5n+5) {
  --os-card-a: #f7f1ff;
  --os-card-b: #e5d8ff;
  --os-edge: #b9a4ff;
}
#appView .card::before { display: none !important; }
#appView .card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(circle at var(--os-px, 50%) var(--os-py, 45%), rgba(255,255,255,.42), rgba(255,255,255,0) 42%);
  opacity: 0;
  transition: opacity .28s ease;
}
#appView .card:hover::after { opacity: .8 !important; }
#appView .card:hover {
  transform: translateY(-5px) perspective(900px) rotateX(.8deg) !important;
  box-shadow:
    inset 0 1px 0 #fff,
    0 10px 0 -3px var(--os-edge),
    0 32px 48px -30px rgba(43, 77, 61, .4) !important;
}
#appView .card-content { color: #2b3245 !important; }
#appView .card-foot { border-color: rgba(64, 72, 104, .08) !important; }
#appView .card-meta { color: #83899c !important; }
#appView .card-actions .copy-mini {
  background: rgba(255,255,255,.76) !important;
  border: 1px solid rgba(255,255,255,.92) !important;
  box-shadow: 0 2px 0 -1px rgba(76, 84, 118, .14) !important;
  color: #666f87 !important;
}

/* 筛选条：奶油白实底，彩色选中 */
#appView .result-head {
  background: linear-gradient(135deg, #fffdfa, #f7f1ff) !important;
  border: 1px solid rgba(231, 224, 255, .95) !important;
  border-radius: 18px !important;
  box-shadow:
    inset 0 1px 0 #fff,
    0 3px 0 -2px #e2dbff,
    0 12px 20px -20px rgba(55, 47, 110, .28) !important;
  backdrop-filter: none !important;
}
#appView .result-head .chip {
  background: #fff !important;
  border: 1px solid #eee8fb !important;
  color: #5f6478 !important;
  box-shadow: 0 2px 0 -1px #e8e1f7 !important;
}
#appView .result-head .chip.active {
  color: #13513b !important;
  border-color: #b5efd6 !important;
  background: linear-gradient(135deg, #cbffe9, #c8e9ff) !important;
  box-shadow:
    inset 0 1px 0 #fff,
    0 3px 0 -1px #99dfc7 !important;
}
#appView .result-count { color: #878da1 !important; }

/* 按钮：圆润彩色立体 */
#appView .btn.primary,
#appView .add-btn.btn.primary {
  background: linear-gradient(135deg, #8d7dff, #6ea8ff) !important;
  border: 1px solid rgba(255,255,255,.35) !important;
  color: #fff !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.55),
    0 4px 0 #5d72d2,
    0 10px 18px -12px rgba(83, 84, 190, .55) !important;
}
#appView .btn.primary:hover { transform: translateY(-2px) !important; }
#appView .btn.primary:active { transform: translateY(2px) scale(.98) !important; box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 1px 0 #5d72d2 !important; }
#appView .btn.ghost,
#appView .mini-btn,
#appView .copy-mini,
#appView .profile-hero-manage,
#appView .batch-file-btn {
  background: linear-gradient(145deg, #fff, #f8f5ff) !important;
  border: 1px solid #ebe5fb !important;
  color: #4d5368 !important;
  box-shadow:
    inset 0 1px 0 #fff,
    0 3px 0 -2px #e2dcf5 !important;
}
#appView .btn.ghost:hover,
#appView .mini-btn:hover,
#appView .copy-mini:hover {
  transform: translateY(-2px) !important;
  background: #fff !important;
}
#appView .icon-btn {
  background: #fff !important;
  border: 1px solid #ece7fa !important;
  box-shadow: 0 2px 0 -1px #e5def6 !important;
}
#appView .account-chip {
  background: linear-gradient(145deg, #fff0f5, #ffe3ed) !important;
  border: 1px solid #ffd3e3 !important;
  box-shadow:
    inset 0 1px 0 #fff,
    0 3px 0 -1px #f2b9ce !important;
}
#appView .add-btn { transition: transform 280ms var(--os-spring), box-shadow 280ms var(--os-spring) !important; }
#appView .add-btn:active { transform: translateY(2px) scale(.97) !important; }

/* 输入：白色纸面，聚焦彩色 */
#appView .field input,
#appView .field select,
#appView .field textarea,
#appView .batch-input,
#appView .batch-link-row input,
#appView .audit-toolbar input,
#appView .audit-toolbar select,
#appView .category-trigger,
#appView .audit-select-trigger {
  background: #fff !important;
  border: 1px solid #e8e2f6 !important;
  color: var(--os-ink) !important;
  box-shadow:
    inset 0 2px 0 rgba(85, 70, 140, .03),
    0 3px 0 -2px #eee8fb !important;
  transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms var(--os-spring) !important;
}
#appView .field input:focus,
#appView .field select:focus,
#appView .field textarea:focus,
#appView .batch-input:focus,
#appView .batch-link-row input:focus,
#appView .audit-toolbar input:focus,
#appView .audit-toolbar select:focus {
  border-color: #a897f5 !important;
  box-shadow:
    0 0 0 4px rgba(159, 140, 255, .14),
    0 2px 0 -1px #e1d9fa !important;
  transform: translateY(-1px);
}

/* 横幅、标签、状态、表格 */
#appView .banner {
  background: linear-gradient(135deg, #fff2c8, #ffe4b6) !important;
  border: 1px solid #ffe1a5 !important;
  box-shadow:
    inset 0 1px 0 #fff8e8,
    0 3px 0 -1px #efca7e !important;
  color: #685022 !important;
}
#appView .banner-link { color: #9b6513 !important; }
#appView .tag {
  background: #f6f1ff !important;
  border: 1px solid #ebe3ff !important;
  color: #665b88 !important;
  box-shadow: 0 2px 0 -1px #e3daf7 !important;
}
#appView .role-chip,
#appView .status-chip,
#appView .variant-count {
  border: 1px solid rgba(255,255,255,.8) !important;
}
#appView .user-row:not(.head):hover { background: #f8f3ff !important; }
#appView .user-row.head { background: #f7f2ff !important; color: #7b718f !important; }
#appView .user-row { border-color: rgba(73, 62, 112, .07) !important; }
#appView .user-actions .mini-btn { box-shadow: 0 2px 0 -1px #e5def6 !important; }

/* 弹层、抽屉、菜单：实色纸面 */
.layer .backdrop {
  background: rgba(44, 33, 78, .38) !important;
  backdrop-filter: none !important;
}
.layer .modal,
.layer .sheet {
  background: linear-gradient(145deg, #fffdfa, #f8f3ff) !important;
  border: 1px solid rgba(255,255,255,.95) !important;
  box-shadow:
    inset 0 1px 0 #fff,
    0 7px 0 -3px #ded6fa,
    0 30px 60px -28px rgba(34, 27, 78, .4) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.layer .modal-head,
.layer .sheet-top { border-color: #efe8fb !important; }
.account-menu,
.card-menu,
.search-suggest {
  background: #fffdfa !important;
  border: 1px solid #ece4fb !important;
  box-shadow:
    inset 0 1px 0 #fff,
    0 5px 0 -2px #e0d8f6,
    0 22px 44px -28px rgba(46, 35, 91, .34) !important;
  backdrop-filter: none !important;
}
.toast {
  background: linear-gradient(145deg, #2e2751, #1e1a38) !important;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,.16) !important;
  box-shadow: 0 5px 0 -2px rgba(92, 80, 160, .45), 0 16px 30px rgba(20, 16, 45, .3) !important;
}

/* 底部导航：实色立体底座 */
.tabbar {
  background:
    radial-gradient(100% 150% at 0% 0%, #fff, #fbf8ff 58%),
    #fffdfa !important;
  border: 1px solid rgba(255,255,255,.95) !important;
  box-shadow:
    inset 0 1px 0 #fff,
    0 6px 0 -2px #ded6f7,
    0 22px 42px -26px rgba(42, 31, 90, .4) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.tabbar .tab[data-view="library"].active {
  background: linear-gradient(135deg, #c9ffe9, #cae7ff) !important;
  color: #13543d !important;
  box-shadow: inset 0 1px 0 #fff, 0 4px 0 -1px #9fe1c9 !important;
}
.tabbar .tab[data-view="profile"].active {
  background: linear-gradient(135deg, #f3e7ff, #ffe1ec) !important;
  color: #5b448d !important;
  box-shadow: inset 0 1px 0 #fff, 0 4px 0 -1px #d7c2f2 !important;
}
.tabbar .tab { transition: transform 260ms var(--os-spring), background 260ms ease, color 260ms ease !important; }
.tabbar .tab:hover { transform: translateY(-2px); }
.tabbar .tab:active { transform: translateY(1px) scale(.98); }
.tabbar .tab.active svg { animation: os-tab-pop 420ms var(--os-spring); }
@keyframes os-tab-pop {
  0% { transform: scale(.86); }
  55% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

/* 登录页同步换肤 */
.login { background: linear-gradient(145deg, #eefbf5, #eef5ff 50%, #fff0f8) !important; }
.login-brand {
  background:
    radial-gradient(80% 100% at 0% 0%, rgba(186, 255, 224, .8), transparent 60%),
    radial-gradient(80% 100% at 100% 100%, rgba(196, 218, 255, .78), transparent 62%),
    linear-gradient(145deg, #dffcf0, #e8e2ff) !important;
}
.login-panel { background: transparent !important; backdrop-filter: none !important; }
.login-card {
  background: #fffdfa !important;
  border: 1px solid #eee7fb !important;
  border-radius: 28px !important;
  box-shadow:
    inset 0 1px 0 #fff,
    0 7px 0 -3px #dfd7f7,
    0 28px 56px -28px rgba(44, 32, 92, .3) !important;
  backdrop-filter: none !important;
}
.login-tab.active { background: linear-gradient(135deg, #d2ffe9, #d9e9ff) !important; color: #1b5a42 !important; }
.login-tabs { background: #f6f1ff !important; }

/* 全站去除玻璃模糊，统一实色 */
#appView *,
.layer *,
.login * {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* ==================================================================
   FLUID MOTION · 流体动效
   ================================================================== */
@keyframes os-page-in {
  from { opacity: 0; transform: translateY(14px) scale(.992); }
  to { opacity: 1; transform: none; }
}
.content.view-enter {
  animation: os-page-in 420ms var(--os-spring) both !important;
}
@keyframes os-card-in {
  from { opacity: 0; transform: translateY(20px) scale(.95); }
  to { opacity: 1; transform: none; }
}
#appView .view-enter .card-grid > .card {
  animation: os-card-in 520ms var(--os-spring) backwards !important;
  animation-delay: calc(var(--i, 0) * 32ms) !important;
}
#appView .view-enter .audit-list > .audit-entry,
#appView .view-enter .dl-grid > .dl-card,
#appView .view-enter .profile-open-card {
  animation: os-card-in 480ms var(--os-spring) backwards !important;
  animation-delay: calc(var(--i, 0) * 24ms) !important;
}
#appView .btn,
#appView .mini-btn,
#appView .icon-btn,
#appView .copy-mini,
#appView .chip,
#appView .tab,
#appView .nav-item,
#appView .profile-menu-row,
#appView .profile-hero-manage,
#appView .card,
#appView .dl-card,
#appView .audit-entry,
#appView .user-row,
#appView .detail-variant-card {
  transition:
    transform 260ms var(--os-spring),
    box-shadow 260ms var(--os-spring),
    background 240ms ease,
    border-color 240ms ease,
    color 180ms ease !important;
}
#appView .chip:hover,
#appView .profile-menu-row:hover,
#appView .profile-hero-manage:hover {
  transform: translateY(-2px);
}
#appView .chip:active,
#appView .mini-btn:active,
#appView .icon-btn:active,
#appView .copy-mini:active {
  transform: translateY(1px) scale(.96) !important;
}
#appView .profile-menu-row:hover,
#appView .detail-variant-card:hover {
  background: #faf5ff !important;
}
#appView .detail-variant-card,
#appView .detail-content,
#appView .detail-images {
  border-radius: 20px !important;
}
#appView .detail-image {
  transition: transform 300ms var(--os-spring), box-shadow 300ms var(--os-spring) !important;
}
#appView .detail-image:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 8px 20px -14px rgba(45,35,90,.35); }
#appView .empty-icon {
  animation: os-float 4s ease-in-out infinite;
}
@keyframes os-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
#appView .topbar-brand-mark {
  animation: os-brand-breathe 5s ease-in-out infinite;
}
@keyframes os-brand-breathe {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-2px) rotate(-1deg); }
}
#appView .searchbox {
  transition: transform 260ms var(--os-spring), box-shadow 260ms ease, border-color 260ms ease !important;
}
#appView .searchbox:focus-within {
  transform: translateY(-1px);
  border-color: #b7a8ff !important;
  box-shadow: 0 0 0 4px rgba(157,140,255,.12), 0 3px 0 -2px #e3dbfa !important;
}
#appView .toast { animation: os-toast-in 340ms var(--os-spring) both !important; }
@keyframes os-toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(14px) scale(.96); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
#appView .banner { animation: os-card-in 480ms var(--os-spring) backwards !important; }

.click-ripple {
  background: rgba(255, 255, 255, .42) !important;
}

@media (prefers-reduced-motion: reduce) {
  #appView.app::before,
  #appView.app::after,
  #appView .topbar-brand-mark,
  #appView .empty-icon,
  .tabbar .tab.active svg,
  .content.view-enter,
  #appView .view-enter .card-grid > .card,
  #appView .view-enter .audit-list > .audit-entry,
  #appView .view-enter .dl-grid > .dl-card,
  #appView .view-enter .profile-open-card,
  #appView .toast,
  #appView .banner {
    animation: none !important;
  }
  #appView .card:hover,
  #appView .btn:hover,
  #appView .btn.primary:hover,
  #appView .chip:hover,
  .tabbar .tab:hover {
    transform: none !important;
  }
}


/* OriginOS 卡片实色填充，覆盖旧液态玻璃的浅色径向背景 */
#appView .card:nth-child(n) {
  background: linear-gradient(150deg, var(--os-card-a, #ecfff7), var(--os-card-b, #d4f9e7)) !important;
}
#appView .topbar {
  background:
    radial-gradient(85% 120% at 0% 0%, rgba(188, 255, 228, .52), transparent 58%),
    radial-gradient(85% 120% at 100% 0%, rgba(184, 214, 255, .42), transparent 60%),
    linear-gradient(135deg, #f4fff9, #eef7ff 52%, #fff2fb) !important;
}
#appView .result-head {
  background:
    radial-gradient(80% 100% at 0% 0%, rgba(188, 255, 228, .3), transparent 60%),
    radial-gradient(80% 100% at 100% 0%, rgba(192, 209, 255, .24), transparent 62%),
    linear-gradient(135deg, #fffdf8, #f7f1ff) !important;
}


/* ==================================================================
   MATURE PALETTE · 降低 OriginOS 主题饱和度，更成熟
   ================================================================== */
#appView.app {
  background:
    radial-gradient(circle at 0% 0%, rgba(187, 226, 207, .52), transparent 35%),
    radial-gradient(circle at 100% 0%, rgba(186, 204, 230, .5), transparent 38%),
    radial-gradient(circle at 100% 100%, rgba(232, 205, 216, .36), transparent 40%),
    radial-gradient(circle at 0% 100%, rgba(236, 226, 199, .4), transparent 38%),
    linear-gradient(145deg, #f4f7f3 0%, #f1f4f7 48%, #f6f2f4 100%) !important;
}
#appView.app::before {
  background: radial-gradient(circle, rgba(117, 174, 145, .2), rgba(117, 174, 145, 0) 70%) !important;
}
#appView.app::after {
  background: radial-gradient(circle, rgba(137, 137, 177, .18), rgba(137, 137, 177, 0) 70%) !important;
}
#appView .topbar {
  background:
    radial-gradient(80% 120% at 0% 0%, rgba(207, 238, 222, .36), transparent 58%),
    radial-gradient(80% 120% at 100% 0%, rgba(203, 216, 235, .3), transparent 62%),
    linear-gradient(135deg, #fbfcf9, #f3f6f7 54%, #f8f3f7) !important;
}
#appView .topbar-actions { background: linear-gradient(145deg, #fdfdfb, #f3f3f7) !important; border-color: #e6e3ee !important; }
#appView .result-head {
  background:
    radial-gradient(80% 100% at 0% 0%, rgba(190, 228, 207, .24), transparent 60%),
    radial-gradient(80% 100% at 100% 0%, rgba(197, 211, 231, .22), transparent 62%),
    linear-gradient(135deg, #fcfcf9, #f6f2f7) !important;
}
#appView .card {
  --os-card-a: #f5f9f6;
  --os-card-b: #e8f0ea;
  --os-edge: #cbdccf;
}
#appView .card:nth-child(5n+2) {
  --os-card-a: #f2f6fa;
  --os-card-b: #e4ebf4;
  --os-edge: #c5d2e0;
}
#appView .card:nth-child(5n+3) {
  --os-card-a: #faf5f6;
  --os-card-b: #f0e5e8;
  --os-edge: #dbc6cc;
}
#appView .card:nth-child(5n+4) {
  --os-card-a: #faf8f2;
  --os-card-b: #f0eadd;
  --os-edge: #ddcfb9;
}
#appView .card:nth-child(5n+5) {
  --os-card-a: #f7f4f9;
  --os-card-b: #ebe5f0;
  --os-edge: #d2c7da;
}
#appView .card:nth-child(n) {
  background: linear-gradient(150deg, var(--os-card-a), var(--os-card-b)) !important;
}
#appView .btn.primary,
#appView .add-btn.btn.primary {
  background: linear-gradient(135deg, #7c87cc, #7184b7) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.45),
    0 4px 0 #59668f,
    0 10px 18px -12px rgba(70, 77, 130, .4) !important;
}
#appView .result-head .chip.active {
  color: #395a4a !important;
  border-color: #c8d9cc !important;
  background: linear-gradient(135deg, #e3f1e8, #e2ebf4) !important;
  box-shadow: inset 0 1px 0 #fff, 0 3px 0 -1px #c2d5c9 !important;
}
#appView .tag {
  background: #f5f4f2 !important;
  border-color: #eae7e2 !important;
  color: #6f6c72 !important;
  box-shadow: 0 2px 0 -1px #e5e1da !important;
}
#appView .banner {
  background: linear-gradient(135deg, #f8f2e4, #f1e7d2) !important;
  border-color: #e8dcc3 !important;
  box-shadow: inset 0 1px 0 #fffaf1, 0 3px 0 -1px #d9c8a6 !important;
  color: #655740 !important;
}
#appView .banner-link { color: #846b3d !important; }
.tabbar {
  background: linear-gradient(145deg, #fdfdfb, #f3f4f6) !important;
  box-shadow: inset 0 1px 0 #fff, 0 6px 0 -2px #d8d5df, 0 22px 42px -26px rgba(46, 40, 70, .3) !important;
}
.tabbar .tab[data-view="library"].active {
  background: linear-gradient(135deg, #dcece3, #dce6f1) !important;
  color: #315b48 !important;
  box-shadow: inset 0 1px 0 #fff, 0 4px 0 -1px #bccfc4 !important;
}
.tabbar .tab[data-view="profile"].active {
  background: linear-gradient(135deg, #e9e2f0, #f0e2e8) !important;
  color: #5d4f72 !important;
  box-shadow: inset 0 1px 0 #fff, 0 4px 0 -1px #d0c3d8 !important;
}
#appView .topbar-brand-mark {
  filter: saturate(.82);
}
#appView .account-chip { filter: saturate(.8); }

/* ==================================================================
   TOPBAR AUTO HIDE · 向下阅读时自动收起，向上滑恢复
   ================================================================== */
#appView .topbar {
  flex: none !important;
  margin-bottom: 0 !important;
  transition:
    transform 360ms var(--os-spring),
    margin-bottom 360ms var(--os-spring),
    opacity 230ms ease !important;
  will-change: transform;
}
#appView.topbar-auto-hidden .topbar {
  transform: translateY(calc(-100% - 18px)) !important;
  margin-bottom: calc(-1 * var(--os-topbar-h, 110px)) !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
@media (prefers-reduced-motion: reduce) {
  #appView .topbar { transition: none !important; }
  #appView.topbar-auto-hidden .topbar { transform: none !important; }
}


/* ==================================================================
   UNIFIED TOPBAR ACTIONS · 顶栏三个操作按钮统一形状与厚度
   ================================================================== */
#appView .topbar-actions {
  gap: 6px !important;
  padding: 5px !important;
  border-radius: 19px !important;
}
#appView .topbar-actions .batch-add-btn,
#appView .topbar-actions .add-btn,
#appView .topbar-actions .account-chip {
  flex: none !important;
  height: 42px !important;
  border-radius: 14px !important;
  overflow: hidden !important;
  transition:
    transform 240ms var(--os-spring),
    box-shadow 240ms var(--os-spring),
    background 220ms ease,
    border-color 220ms ease !important;
}
#appView .topbar-actions .batch-add-btn {
  width: auto !important;
  min-width: 0 !important;
  padding: 0 12px !important;
  gap: 6px !important;
  color: #454b5f !important;
  background: #fffdfa !important;
  border: 1px solid #e8e3ee !important;
  box-shadow:
    inset 0 1px 0 #fff,
    0 3px 0 -1px #dcd6e2,
    0 8px 14px -12px rgba(60, 54, 82, .24) !important;
}
#appView .topbar-actions .batch-add-btn span {
  display: inline !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
}
#appView .topbar-actions .batch-add-btn svg {
  width: 16px !important;
  height: 16px !important;
  color: #6c7183 !important;
}
#appView .topbar-actions .add-btn {
  width: 42px !important;
  min-width: 42px !important;
  padding: 0 !important;
  justify-content: center !important;
  background: linear-gradient(135deg, #7c87cc, #7184b7) !important;
  border: 1px solid rgba(255,255,255,.5) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.5),
    0 3px 0 -1px #59668f,
    0 8px 14px -12px rgba(69, 75, 128, .36) !important;
  color: #fff !important;
}
#appView .topbar-actions .add-btn span { display: none !important; }
#appView .topbar-actions .add-btn svg {
  width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
}
#appView .topbar-actions .account-chip {
  width: 42px !important;
  min-width: 42px !important;
  height: 42px !important;
  max-width: 42px !important;
  padding: 4px !important;
  gap: 0 !important;
  justify-content: center !important;
  border-radius: 14px !important;
  background: #fffdfa !important;
  border: 1px solid #e8e3ee !important;
  box-shadow:
    inset 0 1px 0 #fff,
    0 3px 0 -1px #dcd6e2,
    0 8px 14px -12px rgba(60, 54, 82, .24) !important;
}
#appView .topbar-actions .account-chip-copy,
#appView .topbar-actions .account-chip-chevron { display: none !important; }
#appView .topbar-actions .account-chip .top-avatar {
  display: grid !important;
  place-items: center;
  width: 32px !important;
  height: 32px !important;
  border-radius: 9px !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  color: #8b5b66 !important;
  background: linear-gradient(145deg, #fff0f3, #ffe2ea) !important;
  border: 1px solid #ffd4df !important;
  box-shadow: inset 0 1px 0 #fff !important;
}
#appView .topbar-actions .batch-add-btn:hover,
#appView .topbar-actions .add-btn:hover,
#appView .topbar-actions .account-chip:hover {
  transform: translateY(-2px) !important;
}
#appView .topbar-actions .batch-add-btn:active,
#appView .topbar-actions .add-btn:active,
#appView .topbar-actions .account-chip:active {
  transform: translateY(2px) scale(.96) !important;
}
@media (max-width: 640px) {
  #appView .topbar-actions {
    gap: 4px !important;
    padding: 4px !important;
    border-radius: 16px !important;
  }
  #appView .topbar-actions .batch-add-btn,
  #appView .topbar-actions .add-btn,
  #appView .topbar-actions .account-chip {
    height: 34px !important;
    border-radius: 11px !important;
  }
  #appView .topbar-actions .batch-add-btn {
    padding: 0 8px !important;
    gap: 4px !important;
  }
  #appView .topbar-actions .batch-add-btn span { font-size: 10px !important; }
  #appView .topbar-actions .batch-add-btn svg { width: 14px !important; height: 14px !important; }
  #appView .topbar-actions .add-btn {
    width: 34px !important;
    min-width: 34px !important;
  }
  #appView .topbar-actions .add-btn svg { width: 16px !important; height: 16px !important; }
  #appView .topbar-actions .account-chip {
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    height: 34px !important;
    padding: 3px !important;
  }
  #appView .topbar-actions .account-chip .top-avatar {
    width: 27px !important;
    height: 27px !important;
    border-radius: 8px !important;
    font-size: 11px !important;
  }
}


/* 批量添加是文字按钮，不能被 .add-btn 的方形图标按钮规则覆盖 */
#appView .topbar-actions .batch-add-btn {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  padding: 0 12px !important;
  justify-content: center !important;
  background: #fffdfa !important;
  border: 1px solid #e8e3ee !important;
  box-shadow:
    inset 0 1px 0 #fff,
    0 3px 0 -1px #dcd6e2,
    0 8px 14px -12px rgba(60, 54, 82, .24) !important;
}
#appView .topbar-actions .batch-add-btn span {
  display: inline !important;
  max-width: none !important;
  overflow: visible !important;
  clip: auto !important;
  font-size: 11.5px !important;
}
@media (max-width: 640px) {
  #appView .topbar-actions .batch-add-btn {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: 0 8px !important;
    height: 34px !important;
    border-radius: 11px !important;
  }
  #appView .topbar-actions .batch-add-btn span {
    display: inline !important;
    font-size: 10px !important;
  }
}


/* 账号名称本身就是修改入口，不再显示独立编辑图标 */
.profile-hero-main .p-name {
  align-items: center;
  gap: 0 !important;
}
.profile-name-button {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  line-height: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: 8px;
  transition: color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}
.profile-name-button:hover {
  color: #4e648f !important;
  background: rgba(126, 143, 178, .08);
  box-shadow: 0 0 0 5px rgba(126, 143, 178, .06);
}
.profile-name-button:active {
  transform: translateY(1px);
}
.profile-name-button:focus-visible {
  outline: 2px solid #879bd0;
  outline-offset: 5px;
}


/* ==================================================================
   CONSISTENT 3D CONTROLS · 所有按键与菜单按钮统一立体风格
   ================================================================== */
#appView .btn,
#appView .mini-btn,
#appView .copy-mini,
#appView .image-download,
#appView .profile-hero-manage,
#appView .batch-file-btn,
#appView .account-menu-item,
#appView .suggest-item,
#appView .category-option,
#appView .audit-select-option,
#appView .profile-menu-row {
  --btn3d-edge: #dcd6e2;
  --btn3d-border: #e8e3ee;
  --btn3d-bg: #fffdfa;
  border-radius: 14px !important;
  transition:
    transform 240ms var(--os-spring),
    box-shadow 240ms var(--os-spring),
    background 220ms ease,
    border-color 220ms ease,
    color 180ms ease !important;
}
#appView .btn {
  border: 1px solid var(--btn3d-border) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.9),
    0 3px 0 -1px var(--btn3d-edge),
    0 9px 16px -14px rgba(53, 47, 81, .26) !important;
}
#appView .btn.ghost {
  background: linear-gradient(145deg, #fffdfa, #f5f2f8) !important;
  border-color: #e8e3ee !important;
  color: #50566b !important;
  --btn3d-edge: #dcd6e2;
}
#appView .btn.primary {
  background: linear-gradient(135deg, #7c87cc, #7184b7) !important;
  border-color: rgba(255,255,255,.45) !important;
  color: #fff !important;
  --btn3d-edge: #59668f;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.5),
    0 3px 0 -1px #59668f,
    0 9px 16px -14px rgba(56, 64, 120, .4) !important;
}
#appView .btn.danger {
  background: linear-gradient(145deg, #fff5f4, #fbe8e6) !important;
  border-color: #f0d5d2 !important;
  color: #b3544f !important;
  --btn3d-edge: #d9aaa5;
}
#appView .mini-btn {
  background: linear-gradient(145deg, #fffdfa, #f6f3f8) !important;
  border: 1px solid #e8e3ee !important;
  color: #596074 !important;
  box-shadow:
    inset 0 1px 0 #fff,
    0 2px 0 -1px #ddd7e2,
    0 7px 12px -12px rgba(53,47,81,.25) !important;
}
#appView .mini-btn.danger,
#appView .mini-btn.image-delete {
  color: #b3544f !important;
  border-color: #f0d5d2 !important;
  background: linear-gradient(145deg, #fff7f6, #fbe9e7) !important;
  box-shadow:
    inset 0 1px 0 #fff,
    0 2px 0 -1px #dfb4af !important;
}
#appView .copy-mini,
#appView .image-download,
#appView .profile-hero-manage,
#appView .batch-file-btn {
  background: linear-gradient(145deg, #fffdfa, #f6f3f8) !important;
  border: 1px solid #e8e3ee !important;
  color: #596074 !important;
  box-shadow:
    inset 0 1px 0 #fff,
    0 2px 0 -1px #dcd6e2,
    0 7px 12px -12px rgba(53,47,81,.25) !important;
}
#appView .icon-btn {
  background: linear-gradient(145deg, #fffdfa, #f6f3f8) !important;
  border: 1px solid #e8e3ee !important;
  color: #62697b !important;
  box-shadow:
    inset 0 1px 0 #fff,
    0 2px 0 -1px #dcd6e2,
    0 7px 12px -12px rgba(53,47,81,.24) !important;
  transition: transform 220ms var(--os-spring), box-shadow 220ms var(--os-spring) !important;
}
#appView .btn:not(:disabled):hover,
#appView .mini-btn:not(:disabled):hover,
#appView .copy-mini:hover,
#appView .image-download:hover,
#appView .profile-hero-manage:hover,
#appView .batch-file-btn:hover,
#appView .icon-btn:hover {
  transform: translateY(-2px) !important;
}
#appView .btn:not(:disabled):active,
#appView .mini-btn:not(:disabled):active,
#appView .copy-mini:active,
#appView .image-download:active,
#appView .profile-hero-manage:active,
#appView .batch-file-btn:active,
#appView .icon-btn:active {
  transform: translateY(2px) scale(.97) !important;
}
#appView .btn.disabled,
#appView .btn:disabled,
#appView .mini-btn:disabled {
  transform: none !important;
  box-shadow: inset 0 1px 0 #fff, 0 2px 0 -1px #e6e1eb !important;
}

/* 菜单、下拉、分类列表里的可点击行统一为立体浮起行 */
#appView .account-menu-item,
#appView .suggest-item,
#appView .category-option,
#appView .audit-select-option,
#appView .profile-menu-row {
  background: linear-gradient(145deg, #fffdfa, #f8f5fa) !important;
  border: 1px solid #ebe5f1 !important;
  box-shadow:
    inset 0 1px 0 #fff,
    0 2px 0 -1px #ded8e7,
    0 7px 12px -13px rgba(53,47,81,.24) !important;
}
#appView .account-menu-item {
  margin: 3px 0 !important;
  min-height: 42px !important;
}
#appView .suggest-item {
  margin-bottom: 4px !important;
}
#appView .category-option {
  margin-bottom: 3px !important;
}
#appView .category-option.active,
#appView .audit-select-option.active {
  background: linear-gradient(145deg, #e9f5ee, #e6edf7) !important;
  border-color: #cddfd2 !important;
  box-shadow:
    inset 0 1px 0 #fff,
    0 2px 0 -1px #c7d8cc !important;
}
#appView .account-menu-item:hover,
#appView .suggest-item:hover,
#appView .category-option:hover,
#appView .audit-select-option:hover,
#appView .profile-menu-row:hover {
  transform: translateY(-1px) !important;
  background: #fff !important;
}
#appView .account-menu-item:active,
#appView .suggest-item:active,
#appView .category-option:active,
#appView .audit-select-option:active {
  transform: translateY(1px) scale(.99) !important;
}

/* 底部导航的未选中项也保持同样的立体按键语言 */
.tabbar .tab {
  background: rgba(255,255,255,.5);
  border: 1px solid rgba(255,255,255,.8) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.85),
    0 2px 0 -1px rgba(204,198,216,.5) !important;
}
.tabbar .tab.active {
  border-color: rgba(255,255,255,.95) !important;
}


/* 顶部栏展开/收起：高度折叠 + 轻微压缩，而不是直接瞬移隐藏 */
#appView .topbar {
  overflow: hidden !important;
  max-height: var(--os-topbar-h, 300px) !important;
  transform-origin: center top !important;
  transition:
    max-height 560ms cubic-bezier(.34, .72, .24, 1),
    padding-top 560ms cubic-bezier(.34, .72, .24, 1),
    padding-bottom 560ms cubic-bezier(.34, .72, .24, 1),
    transform 560ms cubic-bezier(.34, .72, .24, 1),
    opacity 300ms ease !important;
  will-change: max-height, transform;
}
#appView.topbar-auto-hidden .topbar {
  max-height: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
  transform: translateY(-10px) scaleY(.94) !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
@media (prefers-reduced-motion: reduce) {
  #appView .topbar,
  #appView.topbar-auto-hidden .topbar {
    transition: none !important;
    max-height: none !important;
    transform: none !important;
  }
}


/* 弹窗背景改为中性深灰，不再给画面外罩一层紫色 */
.layer .backdrop,
.layer.open .backdrop,
.sheet .backdrop,
.modal .backdrop {
  background: rgba(22, 24, 28, .46) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.layer .modal,
.layer .sheet {
  box-shadow:
    inset 0 1px 0 #fff,
    0 7px 0 -3px #ded6fa,
    0 30px 60px -28px rgba(22, 23, 30, .38) !important;
}


/* 弹窗打开时把底层界面去色，彻底消除外围紫色氛围 */
body.locked #appView,
body.locked .tabbar {
  filter: grayscale(1) brightness(.82) !important;
  transition: filter 220ms ease !important;
}
.layer .backdrop,
.layer.open .backdrop {
  background: rgba(16, 17, 19, .5) !important;
}

/* 补齐所有遗漏的可点击控件，统一为立体按键 */
#appView .category-trigger,
#appView .audit-select-trigger,
#appView .dl-back,
#appView .related-item,
#appView .switch-saved-row,
#appView .icon-btn,
#appView .search-clear,
#appView .image-remove,
#appView .batch-preview-remove,
#appView .install-close {
  border-radius: 14px !important;
  border: 1px solid #e8e3ee !important;
  background: linear-gradient(145deg, #fffdfa, #f6f3f8) !important;
  color: #596074 !important;
  box-shadow:
    inset 0 1px 0 #fff,
    0 3px 0 -1px #dcd6e2,
    0 8px 14px -14px rgba(53, 47, 81, .26) !important;
  transition:
    transform 240ms var(--os-spring),
    box-shadow 240ms var(--os-spring),
    background 220ms ease,
    border-color 220ms ease !important;
}
#appView .icon-btn,
#appView .search-clear,
#appView .image-remove,
#appView .batch-preview-remove,
#appView .install-close {
  border-radius: 12px !important;
}
#appView .related-item {
  border-radius: 16px !important;
}
#appView .category-trigger:hover,
#appView .audit-select-trigger:hover,
#appView .dl-back:hover,
#appView .related-item:hover,
#appView .switch-saved-row:hover,
#appView .icon-btn:hover,
#appView .search-clear:hover,
#appView .image-remove:hover,
#appView .batch-preview-remove:hover,
#appView .install-close:hover {
  transform: translateY(-2px) !important;
}
#appView .category-trigger:active,
#appView .audit-select-trigger:active,
#appView .dl-back:active,
#appView .related-item:active,
#appView .switch-saved-row:active,
#appView .icon-btn:active,
#appView .search-clear:active,
#appView .image-remove:active,
#appView .batch-preview-remove:active,
#appView .install-close:active {
  transform: translateY(2px) scale(.97) !important;
}
#appView .chip:not(.active) {
  border: 1px solid #e8e3ee !important;
  background: #fffdfa !important;
  box-shadow:
    inset 0 1px 0 #fff,
    0 2px 0 -1px #dcd6e2,
    0 7px 12px -13px rgba(53, 47, 81, .24) !important;
}
#appView .avatar-edit-badge {
  border: 1px solid #e8e3ee !important;
  box-shadow:
    inset 0 1px 0 #fff,
    0 2px 0 -1px #dcd6e2,
    0 6px 10px -9px rgba(53, 47, 81, .24) !important;
}


/* 弹窗、抽屉、登录页和账号菜单里的按钮也使用同一套立体规则 */
.layer .btn,
.layer .mini-btn,
.layer .icon-btn,
.layer .copy-mini,
.login .btn,
.account-menu .account-menu-item,
.search-suggest .suggest-item {
  border-radius: 14px !important;
  border: 1px solid #e8e3ee !important;
  box-shadow:
    inset 0 1px 0 #fff,
    0 3px 0 -1px #dcd6e2,
    0 9px 16px -14px rgba(53, 47, 81, .26) !important;
  transition:
    transform 240ms var(--os-spring),
    box-shadow 240ms var(--os-spring),
    background 220ms ease,
    border-color 220ms ease !important;
}
.layer .btn.primary,
.login .btn.primary {
  background: linear-gradient(135deg, #7c87cc, #7184b7) !important;
  border-color: rgba(255,255,255,.45) !important;
  color: #fff !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.5),
    0 3px 0 -1px #59668f,
    0 9px 16px -14px rgba(56, 64, 120, .4) !important;
}
.layer .btn.ghost,
.login .btn.ghost {
  background: linear-gradient(145deg, #fffdfa, #f5f2f8) !important;
  color: #50566b !important;
}
.layer .btn.danger,
.login .btn.danger {
  background: linear-gradient(145deg, #fff5f4, #fbe8e6) !important;
  border-color: #f0d5d2 !important;
  color: #b3544f !important;
  box-shadow:
    inset 0 1px 0 #fff,
    0 3px 0 -1px #d9aaa5 !important;
}
.layer .icon-btn,
.layer .copy-mini {
  border-radius: 12px !important;
  background: linear-gradient(145deg, #fffdfa, #f6f3f8) !important;
  color: #62697b !important;
}
.account-menu .account-menu-item {
  margin: 3px 0 !important;
  background: linear-gradient(145deg, #fffdfa, #f8f5fa) !important;
  color: #454b5f !important;
}
.account-menu .account-menu-item.danger { color: #b3544f !important; }
.layer .btn:hover,
.layer .mini-btn:hover,
.layer .icon-btn:hover,
.layer .copy-mini:hover,
.login .btn:hover,
.account-menu .account-menu-item:hover,
.search-suggest .suggest-item:hover {
  transform: translateY(-2px) !important;
}
.layer .btn:active,
.layer .mini-btn:active,
.layer .icon-btn:active,
.layer .copy-mini:active,
.login .btn:active,
.account-menu .account-menu-item:active,
.search-suggest .suggest-item:active {
  transform: translateY(2px) scale(.97) !important;
}
.layer .btn.disabled,
.layer .btn:disabled,
.login .btn:disabled {
  transform: none !important;
  box-shadow: inset 0 1px 0 #fff, 0 2px 0 -1px #e6e1eb !important;
}


/* ==================================================================
   iOS BOLD TYPE · 系统字体 + 全局粗体文本
   ================================================================== */
:root {
  --ios-font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}
html body,
html body button,
html body input,
html body select,
html body textarea {
  font-family: var(--ios-font) !important;
}
html body :not(#ocp-force-weight) {
  font-family: var(--ios-font) !important;
  font-weight: 600 !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
html body {
  font-weight: 600 !important;
  letter-spacing: -0.012em;
}
html body :not(#ocp-force-weight):is(h1, h2, h3, h4, h5, h6, strong, b, th, legend) {
  font-weight: 800 !important;
  letter-spacing: -0.018em;
}
html body :not(#ocp-force-weight):is(button, .btn, .tab, .chip, .nav-item, .account-menu-item, .suggest-item, .category-option, .audit-select-option, .profile-hero-manage, .icon-btn, .copy-mini, .mini-btn, .image-download) {
  font-weight: 700 !important;
  letter-spacing: -0.01em;
}
html body :not(#ocp-force-weight):is(.p-name, .topbar-title h1, .panel h3, .card-content, .detail-content, .user-row, .audit-entry-copy strong) {
  font-weight: 700 !important;
}
html body input::placeholder,
html body textarea::placeholder {
  font-weight: 600 !important;
}


/* ==================================================================
   PROFILE ALIGNMENT · 主页与云端权限布局统一对齐
   ================================================================== */
#appView .profile-grid > div {
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
}
#appView .profile-grid > div > .panel {
  margin: 0 !important;
}
@media (min-width: 641px) {
  #appView .panel { padding: 22px !important; }
}
@media (max-width: 640px) {
  #appView .panel { padding: 16px !important; }
}
#appView .panel > h3 {
  margin: 0 !important;
  line-height: 1.35 !important;
}
#appView .panel > h3 + .panel-sub {
  margin: 4px 0 0 !important;
  line-height: 1.6 !important;
}
#appView .panel .panel-sub + .info-list,
#appView .panel .panel-sub + .backup-actions {
  margin-top: 14px !important;
}
#appView .info-list { margin-top: 14px !important; }
#appView .info-row {
  align-items: center !important;
  min-height: 40px;
  padding: 10px 0 !important;
}
#appView .info-row > span:last-child { text-align: right; }
#appView .backup-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  margin-top: 14px !important;
}
#appView .backup-actions .btn {
  min-height: 42px !important;
  padding: 0 16px !important;
}
#appView .cloud-sync-box {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 10px !important;
  margin-top: 16px !important;
  padding-top: 14px !important;
}
#appView .cloud-sync-box .backup-actions {
  margin-top: 0 !important;
}
#appView .cloud-member-panel .backup-actions {
  margin-top: 12px !important;
}
#appView .cloud-member-actions .btn {
  min-width: 148px !important;
}
#appView .section-head {
  align-items: center !important;
  margin-bottom: 16px !important;
}
#appView .head-actions {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
}
#appView .form-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
}
#appView .perm-grid {
  align-items: start !important;
}


/* ==================================================================
   TOPBAR ACTIONS FINAL · 三个按钮完全同一套 3D 规格
   ================================================================== */
#appView .topbar-actions {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}
#appView .topbar-actions .batch-add-btn,
#appView .topbar-actions .add-btn.btn.primary,
#appView .topbar-actions .account-chip {
  box-sizing: border-box !important;
  height: 42px !important;
  border-radius: 14px !important;
  border: 1px solid #e7e2ee !important;
  overflow: hidden !important;
  box-shadow:
    inset 0 1px 0 #fff,
    0 3px 0 -1px #dcd6e2,
    0 8px 14px -12px rgba(53, 47, 81, .28) !important;
  transition:
    transform 240ms var(--os-spring),
    box-shadow 240ms var(--os-spring),
    background 220ms ease,
    border-color 220ms ease !important;
}
#appView .topbar-actions .batch-add-btn {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  padding: 0 12px !important;
  gap: 6px !important;
  background: #fffdfa !important;
  color: #50566b !important;
}
#appView .topbar-actions .batch-add-btn span {
  display: inline !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
}
#appView .topbar-actions .batch-add-btn svg {
  width: 16px !important;
  height: 16px !important;
  color: #6c7183 !important;
}
#appView .topbar-actions .add-btn.btn.primary {
  width: 42px !important;
  min-width: 42px !important;
  padding: 0 !important;
  justify-content: center !important;
  background: linear-gradient(135deg, #7c87cc, #7184b7) !important;
  border-color: #dfe4f3 !important;
  color: #fff !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.5),
    0 3px 0 -1px #59668f,
    0 8px 14px -12px rgba(69, 75, 128, .34) !important;
}
#appView .topbar-actions .add-btn.btn.primary span { display: none !important; }
#appView .topbar-actions .add-btn.btn.primary svg {
  width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
}
#appView .topbar-actions .account-chip {
  width: 42px !important;
  min-width: 42px !important;
  max-width: 42px !important;
  height: 42px !important;
  padding: 4px !important;
  gap: 0 !important;
  justify-content: center !important;
  background: #fffdfa !important;
  border-color: #e7e2ee !important;
  color: #50566b !important;
}
#appView .topbar-actions .account-chip-copy,
#appView .topbar-actions .account-chip-chevron { display: none !important; }
#appView .topbar-actions .account-chip .top-avatar {
  display: grid !important;
  place-items: center;
  width: 32px !important;
  height: 32px !important;
  border-radius: 9px !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  color: #59657b !important;
  background: #eef3fb !important;
  border: 1px solid #e0e7f2 !important;
  box-shadow: inset 0 1px 0 #fff !important;
}
#appView .topbar-actions .batch-add-btn:hover,
#appView .topbar-actions .add-btn.btn.primary:hover,
#appView .topbar-actions .account-chip:hover {
  transform: translateY(-2px) !important;
}
#appView .topbar-actions .batch-add-btn:active,
#appView .topbar-actions .add-btn.btn.primary:active,
#appView .topbar-actions .account-chip:active {
  transform: translateY(2px) scale(.96) !important;
}
@media (max-width: 640px) {
  #appView .topbar-actions { gap: 6px !important; padding: 0 !important; }
  #appView .topbar-actions .batch-add-btn,
  #appView .topbar-actions .add-btn.btn.primary,
  #appView .topbar-actions .account-chip {
    height: 34px !important;
    border-radius: 11px !important;
  }
  #appView .topbar-actions .batch-add-btn { padding: 0 8px !important; gap: 4px !important; }
  #appView .topbar-actions .batch-add-btn span { font-size: 10px !important; }
  #appView .topbar-actions .batch-add-btn svg { width: 14px !important; height: 14px !important; }
  #appView .topbar-actions .add-btn.btn.primary { width: 34px !important; min-width: 34px !important; }
  #appView .topbar-actions .add-btn.btn.primary svg { width: 16px !important; height: 16px !important; }
  #appView .topbar-actions .account-chip { width: 34px !important; min-width: 34px !important; max-width: 34px !important; height: 34px !important; padding: 3px !important; }
  #appView .topbar-actions .account-chip .top-avatar { width: 27px !important; height: 27px !important; border-radius: 8px !important; font-size: 11px !important; }
}


/* ==================================================================
   MOBILE FLICKER FIX · 手机打开页面/弹窗/抽屉不再闪屏
   ================================================================== */
@media (max-width: 640px) {
  /* 手机端不再对整个页面做去色滤镜，滤镜过渡最容易造成闪屏 */
  body.locked #appView,
  body.locked .tabbar {
    filter: none !important;
    transition: none !important;
  }

  /* 遮罩直接出现，不再先透明再淡入 */
  .layer .backdrop {
    opacity: 0 !important;
    transition: none !important;
    animation: none !important;
    background: rgba(18, 19, 22, .62) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .layer.open .backdrop {
    opacity: 1 !important;
    animation: none !important;
  }

  /* 弹窗只做很短的不透明度/缩放，不再从透明层闪出来 */
  .layer.open .modal {
    animation: os-mobile-modal-in 160ms ease-out both !important;
    filter: none !important;
  }
  @keyframes os-mobile-modal-in {
    from { opacity: .97; scale: .988; }
    to { opacity: 1; scale: 1; }
  }

  /* 抽屉从卡片展开改为稳定的轻微上移，不再有模糊/位移闪烁 */
  .layer.open .sheet {
    animation: os-mobile-sheet-in 170ms ease-out both !important;
    transform: none !important;
    filter: none !important;
    opacity: 1;
  }
  .layer.open .sheet.from-card {
    animation: sheet-expand-from-card 560ms cubic-bezier(.2, .72, .25, 1) both !important;
    transform: none !important;
    translate: none;
    scale: none;
    filter: none !important;
    opacity: 1;
  }
  @keyframes os-mobile-sheet-in {
    from { opacity: .97; translate: 0 8px; }
    to { opacity: 1; translate: 0 0; }
  }

  /* 弹窗/抽屉内容直接显示，避免第二层透明度动画叠在一起 */
  .layer.open .modal-body,
  .layer.open .modal-body > *,
  .layer.open .sheet-body,
  .layer.open .sheet-body > *,
  .layer.open .sheet-actions {
    animation: none !important;
    filter: none !important;
  }

  /* 页面切换不再闪一整层，只保留极轻的淡入 */
  .view-curtain { display: none !important; }
  .content.view-enter {
    animation: os-mobile-page-in 130ms ease-out both !important;
  }
  @keyframes os-mobile-page-in {
    from { opacity: .985; }
    to { opacity: 1; }
  }
  #appView .view-enter .card-grid > .card,
  #appView .view-enter .audit-list > .audit-entry,
  #appView .view-enter .dl-grid > .dl-card,
  #appView .view-enter .profile-open-card {
    animation: none !important;
  }

  /* 手机端关闭持续背景动画，减少合成层闪烁 */
  #appView.app::before,
  #appView.app::after {
    animation: none !important;
  }

  /* 弹出菜单直接出现，不做缩放动画 */
  .account-menu,
  .card-menu,
  .search-suggest,
  .category-options,
  .audit-select-menu {
    animation: none !important;
    transition: none !important;
  }
}

/* 手机卡片底部三个操作按钮严格左、中、右 */
@media (max-width: 640px) {
  #appView .card .card-foot {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
  }
  #appView .card .card-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr !important;
    align-items: center !important;
    width: 100% !important;
    margin-left: 0 !important;
    gap: 0 !important;
  }
  #appView .card .card-actions .card-action:nth-child(1) {
    justify-self: start !important;
  }
  #appView .card .card-actions .card-action:nth-child(2) {
    justify-self: center !important;
  }
  #appView .card .card-actions .card-action:nth-child(3) {
    justify-self: end !important;
  }
  #appView .card .card-actions .card-action {
    margin: 0 !important;
    flex: none !important;
  }
}


/* 底部导航在弹窗/抽屉打开时必须位于遮罩下方 */
.tabbar {
  z-index: 45 !important;
}


/* 顶栏“新增话术”与左右按钮完全同一种图标风格 */
#appView .topbar-actions .add-btn.btn.primary {
  background: #fffdfa !important;
  border-color: #e7e2ee !important;
  color: #50566b !important;
  box-shadow:
    inset 0 1px 0 #fff,
    0 3px 0 -1px #dcd6e2,
    0 8px 14px -12px rgba(53, 47, 81, .28) !important;
}
#appView .topbar-actions .add-btn.btn.primary svg {
  width: 16px !important;
  height: 16px !important;
  color: #6c7183 !important;
  stroke-width: 1.8;
}
#appView .topbar-actions .add-btn.btn.primary:hover {
  background: #fff !important;
}
@media (max-width: 640px) {
  #appView .topbar-actions .add-btn.btn.primary svg {
    width: 15px !important;
    height: 15px !important;
  }
}


/* 主页管理：标题居中，移除右侧账号功能菜单 */
body.view-profile #appView .topbar {
  position: relative !important;
  grid-template-columns: minmax(0, 1fr) !important;
  justify-items: center !important;
  text-align: center !important;
}
body.view-profile #appView .topbar-title {
  width: 100% !important;
  padding: 0 !important;
  justify-content: center !important;
  text-align: center !important;
}
body.view-profile #appView .topbar-heading {
  align-items: center !important;
  text-align: center !important;
}
body.view-profile #appView .topbar-title h1 {
  margin: 0 auto !important;
  text-align: center !important;
}
body.view-profile #appView .topbar-brand-mark {
  position: absolute !important;
  left: 26px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  margin: 0 !important;
}
body.view-profile #appView .topbar-actions {
  display: none !important;
}
@media (max-width: 640px) {
  body.view-profile #appView .topbar-brand-mark {
    left: 16px !important;
  }
  body.view-profile #appView .topbar-title h1 {
    font-size: 22px !important;
  }
}


/* 管理员数据区四个操作并排，每个使用不同底色 */
#appView .data-actions {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  align-items: stretch !important;
  gap: 10px !important;
  width: 100% !important;
  margin-top: 16px !important;
}
#appView .data-actions .btn {
  width: 100% !important;
  min-width: 0 !important;
  height: 44px !important;
  min-height: 44px !important;
  padding: 0 12px !important;
  border-radius: 14px !important;
  white-space: nowrap !important;
  font-size: 12.5px !important;
  border: 1px solid var(--data-border, #e5e0eb) !important;
  color: var(--data-color, #50566b) !important;
  background: var(--data-bg, #fffdfa) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.9),
    0 3px 0 -1px var(--data-edge, #dcd6e2),
    0 8px 14px -12px rgba(53, 47, 81, .26) !important;
}
#appView .data-actions [data-action="export-data"] {
  --data-bg: linear-gradient(145deg, #ebf6ee, #dcefe2);
  --data-border: #cfe3d4;
  --data-edge: #afcdb8;
  --data-color: #355b47;
}
#appView .data-actions [data-action="import-data"] {
  --data-bg: linear-gradient(145deg, #edf2fa, #dfe8f4);
  --data-border: #d2deed;
  --data-edge: #b5c7dd;
  --data-color: #3d506b;
}
#appView .data-actions [data-action="cloud-sync"] {
  --data-bg: linear-gradient(145deg, #7c87cc, #7184b7);
  --data-border: #dfe4f3;
  --data-edge: #59668f;
  --data-color: #ffffff;
}
#appView .data-actions [data-action="cloud-config"] {
  --data-bg: linear-gradient(145deg, #f8f1e4, #efe4d1);
  --data-border: #e8dcc8;
  --data-edge: #d6c5a8;
  --data-color: #66523b;
}
#appView .data-actions .btn:hover {
  transform: translateY(-2px) !important;
}
#appView .data-actions .btn:active {
  transform: translateY(2px) scale(.97) !important;
}
@media (max-width: 900px) {
  #appView .data-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}


/* ==================================================================
   UNIFIED BACK BUTTON · 所有“返回我的”按钮统一规格
   ================================================================== */
#appView .dl-back {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  width: auto !important;
  height: 42px !important;
  min-height: 42px !important;
  margin: 0 0 16px !important;
  padding: 0 16px !important;
  border-radius: 14px !important;
  border: 1px solid #e7e2ee !important;
  background: #fffdfa !important;
  color: #50566b !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  box-shadow:
    inset 0 1px 0 #fff,
    0 3px 0 -1px #dcd6e2,
    0 8px 14px -12px rgba(53, 47, 81, .28) !important;
  transition:
    transform 240ms var(--os-spring),
    box-shadow 240ms var(--os-spring),
    background 220ms ease,
    border-color 220ms ease !important;
}
#appView .dl-back:hover {
  transform: translateY(-2px) !important;
  background: #fff !important;
}
#appView .dl-back:active {
  transform: translateY(2px) scale(.97) !important;
}
#appView .dl-back:focus-visible {
  outline: 2px solid #879bd0 !important;
  outline-offset: 3px !important;
}
@media (max-width: 640px) {
  #appView .dl-back {
    height: 38px !important;
    min-height: 38px !important;
    margin-bottom: 12px !important;
    padding: 0 13px !important;
    border-radius: 12px !important;
    font-size: 12px !important;
  }
}


/* 主页管理顶栏不再显示左侧品牌图标，只保留居中标题 */
body.view-profile #appView .topbar-brand-mark {
  display: none !important;
}


/* ==================================================================
   MOBILE WEB FINE POLISH · 按钮等大、白边清除、修改记录菜单移除
   ================================================================== */
@media (max-width: 640px) {
  #appView .topbar-actions .batch-add-btn,
  #appView .topbar-actions .add-btn.btn.primary,
  #appView .topbar-actions .account-chip {
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    height: 34px !important;
    padding: 0 !important;
    gap: 0 !important;
    justify-content: center !important;
    border-radius: 11px !important;
  }
  #appView .topbar-actions .batch-add-btn span {
    display: none !important;
  }
  #appView .topbar-actions .batch-add-btn svg {
    width: 16px !important;
    height: 16px !important;
    margin: 0 !important;
  }
  #appView .topbar-actions .account-chip {
    padding: 3px !important;
  }
  #appView .topbar-actions .account-chip .top-avatar {
    width: 27px !important;
    height: 27px !important;
    border-radius: 8px !important;
    font-size: 11px !important;
  }
}

/* 修改记录页不再显示右上角账号菜单 */
body.view-audit #appView .topbar-actions {
  display: none !important;
}

/* 统一去掉按钮边缘的白边 */
#appView .btn,
#appView .mini-btn,
#appView .icon-btn,
#appView .copy-mini,
#appView .chip,
#appView .dl-back,
#appView .profile-hero-manage,
#appView .related-item,
#appView .category-trigger,
#appView .audit-select-trigger,
#appView .search-clear,
#appView .image-remove,
#appView .batch-preview-remove,
#appView .install-close,
#appView .image-download,
#appView .account-menu-item,
#appView .suggest-item,
#appView .category-option,
#appView .audit-select-option,
.layer .btn,
.layer .mini-btn,
.layer .icon-btn,
.layer .copy-mini {
  border-color: #e7e2ee !important;
}
#appView .topbar-actions .batch-add-btn,
#appView .topbar-actions .add-btn.btn.primary,
#appView .topbar-actions .account-chip,
#appView .card-actions .copy-mini,
.layer .btn.primary,
.login .btn.primary {
  border-color: #e7e2ee !important;
}


/* 清除按键边缘的白色描边，立体感只保留底部厚度和阴影 */
#appView .btn,
#appView .mini-btn,
#appView .icon-btn,
#appView .copy-mini,
#appView .chip,
#appView .dl-back,
#appView .profile-hero-manage,
#appView .related-item,
#appView .category-trigger,
#appView .audit-select-trigger,
#appView .search-clear,
#appView .image-remove,
#appView .batch-preview-remove,
#appView .install-close,
#appView .image-download,
#appView .account-menu-item,
#appView .suggest-item,
#appView .category-option,
#appView .audit-select-option,
#appView .account-chip,
#appView .topbar-actions .batch-add-btn,
#appView .topbar-actions .add-btn.btn.primary,
#appView .topbar-actions .account-chip,
#appView .card-actions .copy-mini,
#appView .data-actions .btn,
.login .btn,
.layer .btn,
.layer .mini-btn,
.layer .icon-btn,
.layer .copy-mini,
.layer .btn.primary {
  border-color: transparent !important;
}
.tabbar .tab {
  border-color: transparent !important;
}


/* 返回按钮移到顶栏左侧，符合常见页面导航习惯 */
.topbar-back {
  display: grid !important;
  place-items: center !important;
  flex: none !important;
  width: 38px !important;
  height: 38px !important;
  padding: 0 !important;
  margin: 0 2px 0 0 !important;
  border-radius: 50% !important;
  border: 1px solid transparent !important;
  background: #fffdfa !important;
  color: #50566b !important;
  box-shadow:
    inset 0 1px 0 #fff,
    0 3px 0 -1px #dcd6e2,
    0 8px 14px -12px rgba(53, 47, 81, .28) !important;
  cursor: pointer;
  transition:
    transform 240ms var(--os-spring),
    box-shadow 240ms var(--os-spring),
    background 220ms ease !important;
}
.topbar-back[hidden] { display: none !important; }
.topbar-back svg {
  width: 18px !important;
  height: 18px !important;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.topbar-back:hover {
  transform: translateY(-2px) !important;
  background: #fff !important;
}
.topbar-back:active {
  transform: translateY(2px) scale(.96) !important;
}
.topbar-back:focus-visible {
  outline: 2px solid #879bd0 !important;
  outline-offset: 3px !important;
}
body.view-subpage #appView .topbar-brand-mark {
  display: none !important;
}
body.view-subpage #appView .topbar-title {
  justify-content: flex-start !important;
  text-align: left !important;
}
body.view-subpage #appView .topbar-heading {
  align-items: flex-start !important;
  text-align: left !important;
}
body.view-subpage #appView .topbar-title h1 {
  margin: 0 !important;
  text-align: left !important;
}
@media (max-width: 640px) {
  .topbar-back {
    width: 34px !important;
    height: 34px !important;
    border-radius: 11px !important;
  }
  .topbar-back svg {
    width: 16px !important;
    height: 16px !important;
  }
}


/* ==================================================================
   CRISP TEXT · 修复文字发虚与悬停模糊
   ================================================================== */
html,
body,
body * {
  -webkit-font-smoothing: auto !important;
  -moz-osx-font-smoothing: auto !important;
  text-rendering: auto !important;
}
#appView .topbar,
#appView .panel,
#appView .card,
.tabbar,
.account-menu,
.search-suggest,
.modal,
.sheet,
.login-card,
.toast {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
#appView .card::before,
#appView .card::after {
  display: none !important;
  opacity: 0 !important;
}
#appView .card:hover {
  transform: translateY(-2px) !important;
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 -1px 0 rgba(42, 84, 66, .05),
    0 8px 0 -3px var(--os-edge),
    0 26px 42px -30px rgba(43, 77, 61, .38) !important;
}
#appView .card:hover::after {
  opacity: 0 !important;
}
.topbar-title,
.topbar-title h1,
.topbar-title p,
#appView .card,
#appView .card-content,
#appView .btn,
#appView .mini-btn,
#appView .chip,
#appView .tab,
#appView .p-name,
#appView .panel h3,
.layer .modal,
.layer .sheet,
.layer .modal-body,
.layer .sheet-body,
.layer .btn {
  will-change: auto !important;
}
#appView .card-content,
#appView .detail-content,
#appView .panel,
#appView .card,
#appView .info-row,
#appView .user-row,
#appView .audit-entry,
#appView .profile-hero,
.layer .modal,
.layer .sheet {
  text-rendering: auto !important;
}

/* ==== 自动保存状态 / 手动保存 / 批量分类 / 重复检查 ==== */
#appView .save-state-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 42px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .84);
  color: var(--muted);
  box-shadow: 0 2px 6px rgba(12, 42, 35, .06), 0 8px 18px rgba(12, 42, 35, .05);
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}
#appView .save-state-btn svg { width: 17px; height: 17px; stroke-width: 1.9; }
#appView .save-state-btn.saved { color: var(--green); background: var(--green-soft); border-color: rgba(14, 122, 92, .18); }
#appView .save-state-btn.saving { color: var(--amber); background: #fff7e8; border-color: rgba(162, 98, 27, .2); }
#appView .save-state-btn.error { color: var(--red); background: #fff1ef; border-color: rgba(178, 59, 50, .2); }
#appView .save-state-btn:active { transform: scale(.97); }

.batch-category-pick {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .62);
}
.batch-category-label {
  flex: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.batch-category-pick .category-picker { flex: 1; min-width: 0; }
.batch-category-pick .category-options { z-index: 4; }

.duplicate-review-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-height: min(48vh, 440px);
  overflow: auto;
  margin: 12px 0;
  padding-right: 4px;
}
.duplicate-review-item {
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, .7);
}
.duplicate-review-item strong { display: block; font-size: 13px; color: var(--ink); }
.duplicate-review-item p { margin: 4px 0 0; color: var(--ink-2); font-size: 12.5px; line-height: 1.55; }
.duplicate-review-item em { display: block; margin-top: 5px; color: var(--muted); font-size: 11.5px; font-style: normal; }
.duplicate-review-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 5px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #fff1d9;
  color: var(--amber);
  font-size: 10.5px;
  font-weight: 800;
}
.duplicate-review-badge.exact { background: #ffe8e4; color: var(--red); }

.batch-assign-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 10px 0;
}
.batch-assign-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: min(38vh, 350px);
  overflow: auto;
  margin: 10px 0;
  padding-right: 3px;
}
.batch-assign-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .68);
  cursor: pointer;
}
.batch-assign-item input { margin-top: 3px; accent-color: var(--green); }
.batch-assign-item span { min-width: 0; color: var(--ink-2); font-size: 12.5px; line-height: 1.5; }
.batch-assign-item small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.batch-assign-category { margin: 12px 0; }

@media (max-width: 640px) {
  #appView .save-state-btn {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 12px;
  }
  #appView .save-state-btn span { display: none; }
  #appView .save-state-btn svg { width: 16px; height: 16px; }
  .batch-category-pick { align-items: flex-start; flex-direction: column; gap: 7px; }
  .batch-category-pick .category-picker { width: 100%; }
}

/* ==================================================================
   MOBILE ACCOUNT FIX · 手机账号卡片按钮对齐 + 底部避开菜单栏
   ================================================================== */
@media (max-width: 760px) {
  body.view-accounts #appView .content {
    padding-bottom: calc(178px + env(safe-area-inset-bottom)) !important;
  }
  #appView .account-admin-panel .user-table {
    margin-bottom: 18px !important;
  }
  #appView .account-admin-panel .user-row:not(.head) {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 14px 14px 16px !important;
  }
  #appView .account-admin-panel .user-identity {
    width: 100% !important;
    min-width: 0 !important;
  }
  #appView .account-admin-panel .user-identity > div {
    min-width: 0 !important;
  }
  #appView .account-admin-panel .user-actions {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    width: 100% !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    justify-items: stretch !important;
    flex-wrap: nowrap !important;
    overflow: visible !important;
    gap: 7px !important;
    margin-top: 2px !important;
    padding-top: 9px !important;
    border-top: 1px dashed rgba(80, 116, 94, .12) !important;
  }
  #appView .account-admin-panel .user-actions .mini-btn {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    flex: none !important;
    height: 36px !important;
    padding: 0 6px !important;
    justify-content: center !important;
    text-align: center !important;
    font-size: 11.5px !important;
  }
  #appView .account-admin-panel .user-created-cell {
    align-self: flex-start !important;
    white-space: normal !important;
  }
}

/* ==================================================================
   ACCOUNT ACTION GRID · 账号卡片操作按钮按动作固定列对齐
   ================================================================== */
@media (min-width: 761px) {
  #appView .account-admin-panel .user-actions {
    display: grid !important;
    grid-template-columns: 38px 38px 64px 38px 38px !important;
    gap: 4px !important;
    align-items: center !important;
    justify-content: start !important;
    justify-items: stretch !important;
    flex-wrap: nowrap !important;
    overflow: visible !important;
    min-width: 0 !important;
  }
  #appView .account-admin-panel .user-actions .mini-btn {
    width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    font-size: 10.5px !important;
    text-align: center !important;
    justify-content: center !important;
  }
  #appView .account-admin-panel .user-actions .mini-btn[data-uaction="edit"] { grid-column: 1 !important; }
  #appView .account-admin-panel .user-actions .mini-btn[data-uaction="perms"] { grid-column: 2 !important; }
  #appView .account-admin-panel .user-actions .mini-btn[data-uaction="reset"] { grid-column: 3 !important; }
  #appView .account-admin-panel .user-actions .mini-btn[data-uaction="toggle"] { grid-column: 4 !important; }
  #appView .account-admin-panel .user-actions .mini-btn[data-uaction="delete"] { grid-column: 5 !important; }
  #appView .account-admin-panel .user-row.head span:last-child {
    text-align: left !important;
    padding-left: 0 !important;
  }
}
@media (max-width: 760px) {
  #appView .account-admin-panel .user-actions .mini-btn {
    grid-column: auto !important;
  }
}

/* ==================================================================
   PASSWORD PANEL · 桌面双栏，右侧安全建议填补空白
   ================================================================== */
#appView .password-panel {
  padding: 26px 30px !important;
}
#appView .password-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 300px !important;
  gap: 34px !important;
  align-items: stretch !important;
}
#appView .password-main {
  min-width: 0 !important;
}
#appView .password-panel .pw-form {
  max-width: 620px !important;
}
#appView .password-side {
  min-width: 0 !important;
  display: flex !important;
  align-items: stretch !important;
}
#appView .password-side-card {
  width: 100% !important;
  padding: 20px 20px 18px !important;
  border-radius: 20px !important;
  border: 1px solid rgba(124, 158, 140, .16) !important;
  background:
    radial-gradient(110% 80% at 100% 0%, rgba(211, 244, 228, .64), transparent 58%),
    linear-gradient(155deg, #fbfefc, #f4f8ff 62%, #fff8fc) !important;
  box-shadow: inset 0 1px 0 #fff, 0 8px 24px -20px rgba(39, 77, 58, .22) !important;
}
#appView .password-side-icon {
  display: grid !important;
  place-items: center !important;
  width: 42px !important;
  height: 42px !important;
  margin-bottom: 13px !important;
  border-radius: 13px !important;
  color: #0e7a5c !important;
  background: rgba(220, 246, 232, .9) !important;
  border: 1px solid rgba(14, 122, 92, .12) !important;
}
#appView .password-side-icon svg { width: 21px !important; height: 21px !important; }
#appView .password-side-card h4 {
  margin: 0 0 11px !important;
  color: var(--ink) !important;
  font-size: 15px !important;
  font-weight: 800 !important;
}
#appView .password-side-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 9px !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}
#appView .password-side-list li {
  position: relative !important;
  padding-left: 17px !important;
  color: var(--ink-2) !important;
  font-size: 12px !important;
  line-height: 1.65 !important;
}
#appView .password-side-list li::before {
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  top: .55em !important;
  width: 6px !important;
  height: 6px !important;
  border-radius: 999px !important;
  background: #48a985 !important;
  box-shadow: 0 0 0 3px rgba(72, 169, 133, .12) !important;
}
#appView .password-side-account {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  margin-top: 16px !important;
  padding-top: 14px !important;
  border-top: 1px dashed rgba(80, 116, 94, .17) !important;
}
#appView .password-side-account span {
  color: var(--muted) !important;
  font-size: 11px !important;
}
#appView .password-side-account strong {
  color: var(--ink) !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  overflow-wrap: anywhere !important;
}
#appView .password-side-account em {
  color: var(--muted) !important;
  font-size: 11px !important;
  font-style: normal !important;
}
@media (max-width: 900px) {
  #appView .password-panel {
    padding: 20px 18px !important;
  }
  #appView .password-layout {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 20px !important;
  }
  #appView .password-panel .pw-form {
    max-width: none !important;
  }
  #appView .password-side-card {
    padding: 16px 17px !important;
  }
}

/* ==================================================================
   ACCOUNT ACTIONS UNIFIED · 编辑 + 更多，两列等宽无留白
   ================================================================== */
#appView .account-admin-panel .user-row,
#appView .account-admin-panel .user-row.head {
  grid-template-columns: 185px 118px minmax(0, 1fr) 88px 156px !important;
}
@media (max-width: 1040px) and (min-width: 761px) {
  #appView .account-admin-panel .user-row,
  #appView .account-admin-panel .user-row.head {
    grid-template-columns: 165px 112px minmax(0, 1fr) 86px 148px !important;
  }
}
@media (min-width: 761px) {
  #appView .account-admin-panel .user-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
    width: 100% !important;
    justify-content: stretch !important;
    justify-items: stretch !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    overflow: visible !important;
  }
  #appView .account-admin-panel .user-actions .mini-btn {
    width: 100% !important;
    min-width: 0 !important;
    padding: 0 6px !important;
    height: 32px !important;
    font-size: 10.5px !important;
    justify-content: center !important;
    text-align: center !important;
    grid-column: auto !important;
  }
  #appView .account-admin-panel .user-actions .mini-btn[data-uaction="edit"] { grid-column: 1 !important; }
  #appView .account-admin-panel .user-actions .mini-btn[data-uaction="more"] { grid-column: 2 !important; }
}
@media (max-width: 760px) {
  #appView .account-admin-panel .user-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  #appView .account-admin-panel .user-actions .mini-btn {
    grid-column: auto !important;
  }
}

/* 账号“更多”管理弹窗 */
.account-more-user {
  display: flex !important;
  align-items: center !important;
  gap: 11px !important;
  padding: 4px 2px 14px !important;
  border-bottom: 1px dashed rgba(80, 116, 94, .14) !important;
}
.account-more-user .avatar {
  width: 42px !important;
  height: 42px !important;
  flex: none !important;
  display: grid !important;
  place-items: center !important;
}
.account-more-user > div {
  min-width: 0 !important;
}
.account-more-user strong {
  display: block !important;
  color: var(--ink) !important;
  font-size: 15px !important;
  font-weight: 800 !important;
}
.account-more-user > div > span {
  display: block !important;
  margin-top: 2px !important;
  color: var(--muted) !important;
  font-size: 11.5px !important;
}
.account-more-list {
  display: grid !important;
  gap: 8px !important;
  margin-top: 14px !important;
}
.account-more-item {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  width: 100% !important;
  padding: 11px 13px !important;
  border: 1px solid rgba(80, 116, 94, .12) !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, .78) !important;
  text-align: left !important;
  transition: background .18s ease, transform .18s ease !important;
}
.account-more-item:hover { background: #f2fbf6 !important; }
.account-more-item:active { transform: scale(.99) !important; }
.account-more-item > span:first-child {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  min-width: 0 !important;
}
.account-more-item strong {
  color: var(--ink) !important;
  font-size: 13px !important;
  font-weight: 750 !important;
}
.account-more-item em {
  color: var(--muted) !important;
  font-size: 11px !important;
  font-style: normal !important;
  line-height: 1.45 !important;
}
.account-more-arrow {
  flex: none !important;
  color: var(--faint) !important;
  font-size: 19px !important;
  line-height: 1 !important;
}
.account-more-item.danger strong { color: var(--red) !important; }
.account-more-item.danger:hover { background: #fff5f3 !important; }

/* ==================================================================
   LOGIN PASSWORD FIELD · 隐藏浏览器自带查看密码/自动填充按钮
   ================================================================== */
#loginPass::-ms-reveal,
#loginPass::-ms-clear,
#loginPass::-webkit-credentials-auto-fill-button,
#loginPass::-webkit-textfield-decoration-container,
#loginPass::-webkit-caps-lock-indicator {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: none !important;
}

/* ==================================================================
   PASSWORD VISIBILITY · 自定义显示密码开关
   ================================================================== */
.password-control {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
}
.password-control > input {
  width: 100% !important;
  padding-right: 44px !important;
}
.password-reveal {
  position: absolute !important;
  right: 8px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  display: grid !important;
  place-items: center !important;
  width: 30px !important;
  height: 30px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 9px !important;
  color: #8b9991 !important;
  background: transparent !important;
  box-shadow: none !important;
  cursor: pointer !important;
}
.password-reveal:hover {
  color: #0e7a5c !important;
  background: rgba(14, 122, 92, .08) !important;
}
.password-reveal.on {
  color: #0e7a5c !important;
  background: rgba(14, 122, 92, .10) !important;
}
.password-reveal svg {
  width: 17px !important;
  height: 17px !important;
  stroke-width: 1.8 !important;
}
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear,
input[type="password"]::-webkit-credentials-auto-fill-button,
input[type="password"]::-webkit-textfield-decoration-container,
input[type="password"]::-webkit-caps-lock-indicator {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: none !important;
}
@media (max-width: 640px) {
  .password-control > input { padding-right: 42px !important; }
  .password-reveal { right: 6px !important; width: 28px !important; height: 28px !important; }
}

/* ==================================================================
   CATEGORY CUSTOM FLOW · 先选分类，再展开自定义名称确认
   ================================================================== */
#appView .category-custom-option {
  border-style: dashed !important;
  border-color: rgba(83, 102, 196, .24) !important;
  color: #5366c4 !important;
  background: rgba(246, 248, 255, .8) !important;
}
#appView .category-custom-option:hover {
  background: #fff !important;
  border-color: rgba(83, 102, 196, .4) !important;
}
#appView .category-add-row[hidden] {
  display: none !important;
}
#appView .category-add-row .mini-btn.primary {
  color: #fff !important;
  background: #6272c8 !important;
  border-color: #6272c8 !important;
}
#appView .category-add-row .mini-btn.primary:hover {
  background: #5366c4 !important;
}

/* ==================================================================
   FLOATING SYNC · 左下角同步按钮
   ================================================================== */
#appView .save-state-btn.floating-sync {
  position: fixed !important;
  left: 22px !important;
  bottom: 22px !important;
  z-index: 44 !important;
  width: auto !important;
  min-width: 100px !important;
  height: 40px !important;
  padding: 0 15px !important;
  border-radius: 14px !important;
  gap: 7px !important;
  font-size: 12.5px !important;
  backdrop-filter: blur(10px) saturate(1.08) !important;
  -webkit-backdrop-filter: blur(10px) saturate(1.08) !important;
  transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease !important;
}
#appView .save-state-btn.floating-sync svg {
  width: 17px !important;
  height: 17px !important;
  flex: none !important;
}
#appView .save-state-btn.floating-sync span {
  display: inline !important;
  white-space: nowrap !important;
}
#appView .save-state-btn.floating-sync.saving svg {
  animation: sync-pulse 1s ease-in-out infinite;
}
@keyframes sync-pulse {
  0%, 100% { opacity: .55; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-1px); }
}
@media (max-width: 640px) {
  #appView .save-state-btn.floating-sync {
    left: 14px !important;
    bottom: calc(96px + env(safe-area-inset-bottom)) !important;
    min-width: 94px !important;
    height: 38px !important;
    padding: 0 12px !important;
    border-radius: 13px !important;
    font-size: 12px !important;
  }
  #appView .save-state-btn.floating-sync span {
    display: inline !important;
    font-size: 12px !important;
  }
}

/* ==================================================================
   SYNC DOCK v2 · 只在话术库主界面显示的左下角同步卡片
   ================================================================== */
#appView .sync-dock {
  position: fixed !important;
  left: 22px !important;
  bottom: 22px !important;
  z-index: 44 !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-width: 158px !important;
  height: 54px !important;
  padding: 7px 14px 7px 7px !important;
  border-radius: 18px !important;
  border: 1px solid rgba(255, 255, 255, .94) !important;
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(244,249,255,.92)) !important;
  color: #5366c4 !important;
  box-shadow:
    inset 0 1px 0 #fff,
    0 3px 0 -2px rgba(108, 128, 196, .16),
    0 14px 32px -18px rgba(43, 67, 116, .42) !important;
  backdrop-filter: blur(12px) saturate(1.1) !important;
  -webkit-backdrop-filter: blur(12px) saturate(1.1) !important;
  cursor: pointer !important;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease !important;
}
#appView .sync-dock:hover {
  transform: translateY(-2px) !important;
  box-shadow:
    inset 0 1px 0 #fff,
    0 4px 0 -2px rgba(108, 128, 196, .2),
    0 18px 38px -18px rgba(43, 67, 116, .48) !important;
}
#appView .sync-dock:active { transform: translateY(1px) scale(.985) !important; }
#appView .sync-dock-icon {
  width: 38px !important;
  height: 38px !important;
  flex: none !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 13px !important;
  background: linear-gradient(145deg, #eaf0ff, #dfe8ff) !important;
  border: 1px solid rgba(126, 146, 214, .18) !important;
  color: #5366c4 !important;
}
#appView .sync-dock-icon svg { width: 19px !important; height: 19px !important; stroke-width: 1.9 !important; }
#appView .sync-dock-copy {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 1px !important;
  min-width: 0 !important;
  text-align: left !important;
}
#appView .sync-dock-copy strong {
  color: #4053a8 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
  white-space: nowrap !important;
}
#appView .sync-dock-copy small {
  color: #8a94b4 !important;
  font-size: 10px !important;
  font-weight: 500 !important;
  line-height: 1.3 !important;
  white-space: nowrap !important;
}
#appView .sync-dock-indicator {
  position: absolute !important;
  top: 9px !important;
  right: 10px !important;
  width: 6px !important;
  height: 6px !important;
  border-radius: 999px !important;
  background: #b8c2dc !important;
  box-shadow: 0 0 0 3px rgba(184, 194, 220, .14) !important;
}
#appView .sync-dock.saved {
  border-color: rgba(147, 209, 181, .75) !important;
  background: linear-gradient(135deg, rgba(252,255,253,.97), rgba(237,251,245,.94)) !important;
}
#appView .sync-dock.saved .sync-dock-icon {
  color: #0e7a5c !important;
  background: linear-gradient(145deg, #e7fbf1, #d9f4e8) !important;
  border-color: rgba(14, 122, 92, .12) !important;
}
#appView .sync-dock.saved .sync-dock-copy strong { color: #0e6b50 !important; }
#appView .sync-dock.saved .sync-dock-copy small { color: #7b9d90 !important; }
#appView .sync-dock.saved .sync-dock-indicator {
  background: #37b47d !important;
  box-shadow: 0 0 0 3px rgba(55, 180, 125, .14) !important;
}
#appView .sync-dock.saving {
  border-color: rgba(235, 192, 112, .72) !important;
  background: linear-gradient(135deg, rgba(255,253,247,.97), rgba(255,248,232,.95)) !important;
}
#appView .sync-dock.saving .sync-dock-icon {
  color: #a2621b !important;
  background: linear-gradient(145deg, #fff8e9, #ffefd1) !important;
}
#appView .sync-dock.saving .sync-dock-copy strong { color: #8e5a1d !important; }
#appView .sync-dock.saving .sync-dock-copy small { color: #a08455 !important; }
#appView .sync-dock.saving .sync-dock-icon svg { animation: sync-dock-pulse 1s ease-in-out infinite; }
#appView .sync-dock.saving .sync-dock-indicator {
  background: #e4a33d !important;
  animation: sync-dock-blink 1s ease-in-out infinite;
}
#appView .sync-dock.error {
  border-color: rgba(224, 154, 146, .6) !important;
  background: linear-gradient(135deg, rgba(255,253,252,.97), rgba(255,243,240,.94)) !important;
}
#appView .sync-dock.error .sync-dock-icon {
  color: #b23b32 !important;
  background: linear-gradient(145deg, #fff2ef, #ffe7e2) !important;
}
#appView .sync-dock.error .sync-dock-copy strong { color: #a6352c !important; }
#appView .sync-dock.error .sync-dock-copy small { color: #b47e78 !important; }
#appView .sync-dock.error .sync-dock-indicator { background: #d4675c !important; }
body:not(.view-library) #appView .sync-dock {
  display: none !important;
}
@keyframes sync-dock-pulse {
  0%, 100% { opacity: .55; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-1px); }
}
@keyframes sync-dock-blink {
  0%, 100% { opacity: .45; }
  50% { opacity: 1; }
}
@media (max-width: 640px) {
  #appView .sync-dock {
    left: 14px !important;
    bottom: calc(96px + env(safe-area-inset-bottom)) !important;
    min-width: 146px !important;
    height: 50px !important;
    padding: 6px 12px 6px 6px !important;
    border-radius: 16px !important;
    gap: 9px !important;
  }
  #appView .sync-dock-icon { width: 36px !important; height: 36px !important; border-radius: 12px !important; }
  #appView .sync-dock-icon svg { width: 18px !important; height: 18px !important; }
  #appView .sync-dock-copy strong { font-size: 12.5px !important; }
  #appView .sync-dock-copy small { font-size: 9.5px !important; }
}

/* ==================================================================
   COMPACT UI · 整体界面与控件紧凑一档
   ================================================================== */
#appView .topbar {
  padding: 12px 22px 10px !important;
  row-gap: 8px !important;
}
#appView .topbar-title {
  gap: 9px !important;
}
#appView .topbar-brand-mark {
  width: 36px !important;
  height: 36px !important;
  border-radius: 12px !important;
}
#appView .topbar-title h1 {
  font-size: 23px !important;
  line-height: 1.25 !important;
}
#appView .topbar-title p {
  margin-top: 1px !important;
  font-size: 10px !important;
  line-height: 1.3 !important;
}
#appView .searchbox {
  height: 38px !important;
  max-width: 340px !important;
  border-radius: 12px !important;
}
#appView .searchbox input {
  font-size: 12px !important;
}
#appView .topbar-actions {
  gap: 7px !important;
}
#appView .topbar-actions .batch-add-btn,
#appView .topbar-actions .add-btn.btn.primary,
#appView .topbar-actions .account-chip {
  height: 36px !important;
  border-radius: 11px !important;
}
#appView .topbar-actions .batch-add-btn {
  padding: 0 9px !important;
  font-size: 11px !important;
}
#appView .topbar-actions .batch-add-btn svg {
  width: 15px !important;
  height: 15px !important;
}
#appView .topbar-actions .add-btn.btn.primary {
  width: 36px !important;
  min-width: 36px !important;
}
#appView .topbar-actions .account-chip {
  width: 36px !important;
  min-width: 36px !important;
  max-width: 36px !important;
  padding: 3px !important;
}
#appView .topbar-actions .account-chip .top-avatar {
  width: 28px !important;
  height: 28px !important;
  border-radius: 9px !important;
  font-size: 11px !important;
}
#appView .content {
  padding-top: 16px !important;
  padding-bottom: 88px !important;
}
#appView .card-grid {
  gap: 14px !important;
}
#appView .card {
  padding: 15px !important;
  border-radius: 20px !important;
}
#appView .card h3 {
  font-size: 15px !important;
  line-height: 1.4 !important;
}
#appView .card-content {
  font-size: 13px !important;
  line-height: 1.65 !important;
}
#appView .card-foot {
  padding-top: 10px !important;
}
#appView .panel,
#appView .account-admin-panel,
#appView .account-self-panel {
  padding: 16px !important;
  border-radius: 22px !important;
}
#appView .stat-card {
  padding: 12px 13px !important;
  border-radius: 16px !important;
}
#appView .stat-label {
  font-size: 10.5px !important;
}
#appView .stat-value {
  font-size: 24px !important;
}
#appView .section-head h2 {
  font-size: 17px !important;
}
#appView .section-head .sub {
  font-size: 10.5px !important;
}
#appView .user-row {
  padding-top: 11px !important;
  padding-bottom: 11px !important;
}
#appView .user-actions .mini-btn {
  height: 30px !important;
}
#appView .password-panel {
  padding: 20px 22px !important;
}
#appView .password-panel .pw-form {
  max-width: 560px !important;
}
#appView .password-side-card {
  padding: 16px !important;
  border-radius: 17px !important;
}
#appView .password-side-card h4 {
  font-size: 14px !important;
}
#appView .password-side-list li {
  font-size: 11.5px !important;
}
#appView .field > span {
  margin-bottom: 6px !important;
  font-size: 11.5px !important;
}
#appView .field input,
#appView .field select,
#appView .field textarea {
  min-height: 38px !important;
  padding-top: 8px !important;
  padding-bottom: 8px !important;
  font-size: 13px !important;
}
#appView .password-control > input {
  padding-right: 38px !important;
}
#appView .password-reveal {
  right: 7px !important;
  width: 26px !important;
  height: 26px !important;
  border-radius: 7px !important;
}
#appView .password-reveal svg {
  width: 15px !important;
  height: 15px !important;
}
#appView .sync-dock {
  left: 18px !important;
  bottom: 18px !important;
  min-width: 136px !important;
  height: 46px !important;
  padding: 5px 11px 5px 5px !important;
  gap: 8px !important;
  border-radius: 15px !important;
}
#appView .sync-dock-icon {
  width: 34px !important;
  height: 34px !important;
  border-radius: 11px !important;
}
#appView .sync-dock-icon svg {
  width: 17px !important;
  height: 17px !important;
}
#appView .sync-dock-copy strong { font-size: 12px !important; }
#appView .sync-dock-copy small { font-size: 9.5px !important; }
#appView .sync-dock-indicator { top: 8px !important; right: 8px !important; width: 5px !important; height: 5px !important; }
.tabbar {
  padding: 4px !important;
  gap: 5px !important;
  border-radius: 24px !important;
}
.tabbar .tab {
  height: 46px !important;
  border-radius: 18px !important;
  gap: 1px !important;
}
.tabbar .tab svg {
  width: 19px !important;
  height: 19px !important;
}
.tabbar .tab span {
  font-size: 10px !important;
}
@media (max-width: 640px) {
  #appView .topbar {
    padding: 10px 12px 8px !important;
    row-gap: 7px !important;
  }
  #appView .topbar-title h1 { font-size: 20px !important; }
  #appView .topbar-title p { font-size: 9px !important; }
  #appView .topbar-brand-mark { width: 32px !important; height: 32px !important; }
  #appView .searchbox { height: 38px !important; }
  #appView .topbar-actions .batch-add-btn,
  #appView .topbar-actions .add-btn.btn.primary,
  #appView .topbar-actions .account-chip {
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    height: 32px !important;
    border-radius: 10px !important;
  }
  #appView .topbar-actions .account-chip .top-avatar {
    width: 24px !important;
    height: 24px !important;
    border-radius: 7px !important;
    font-size: 10px !important;
  }
  #appView .content {
    padding: 10px 12px calc(98px + env(safe-area-inset-bottom)) !important;
  }
  #appView .card-grid { gap: 12px !important; }
  #appView .card { padding: 13px !important; border-radius: 18px !important; }
  #appView .card h3 { font-size: 14px !important; }
  #appView .card-content { font-size: 12.5px !important; line-height: 1.6 !important; }
  #appView .panel,
  #appView .account-admin-panel,
  #appView .account-self-panel { padding: 13px !important; border-radius: 20px !important; }
  #appView .stat-card { padding: 10px 11px !important; }
  #appView .stat-value { font-size: 22px !important; }
  #appView .sync-dock {
    left: 12px !important;
    bottom: calc(88px + env(safe-area-inset-bottom)) !important;
    min-width: 132px !important;
    height: 44px !important;
    padding: 5px 10px 5px 5px !important;
    gap: 7px !important;
    border-radius: 14px !important;
  }
  #appView .sync-dock-icon { width: 32px !important; height: 32px !important; border-radius: 10px !important; }
  #appView .sync-dock-icon svg { width: 16px !important; height: 16px !important; }
  #appView .sync-dock-copy strong { font-size: 11.5px !important; }
  #appView .sync-dock-copy small { font-size: 9px !important; }
  .tabbar {
    width: calc(100vw - 24px) !important;
    bottom: calc(8px + env(safe-area-inset-bottom)) !important;
    padding: 4px !important;
    border-radius: 24px !important;
  }
  .tabbar .tab {
    height: 44px !important;
    border-radius: 17px !important;
  }
  .tabbar .tab svg { width: 18px !important; height: 18px !important; }
  .tabbar .tab span { font-size: 9.5px !important; }
  #appView .password-panel { padding: 15px !important; }
  #appView .field input,
  #appView .field select,
  #appView .field textarea { min-height: 40px !important; }
  #appView .user-actions .mini-btn { height: 32px !important; }
}

/* ==================================================================
   SYNC DOCK v3 · 右下角紧凑同步按钮
   ================================================================== */
#appView .sync-dock {
  left: auto !important;
  right: 18px !important;
  bottom: 18px !important;
  min-width: 0 !important;
  width: auto !important;
  height: 34px !important;
  padding: 4px 10px 4px 4px !important;
  gap: 6px !important;
  border-radius: 12px !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.96),
    0 2px 0 -1px rgba(108, 128, 196, .13),
    0 8px 20px -12px rgba(43, 67, 116, .36) !important;
}
#appView .sync-dock:hover {
  transform: translateY(-1px) !important;
}
#appView .sync-dock-icon {
  width: 26px !important;
  height: 26px !important;
  border-radius: 8px !important;
}
#appView .sync-dock-icon svg {
  width: 14px !important;
  height: 14px !important;
}
#appView .sync-dock-copy {
  gap: 0 !important;
  justify-content: center !important;
}
#appView .sync-dock-copy strong {
  font-size: 11.5px !important;
  line-height: 1.15 !important;
}
#appView .sync-dock-copy small {
  display: none !important;
}
#appView .sync-dock-indicator {
  top: 6px !important;
  right: 6px !important;
  width: 5px !important;
  height: 5px !important;
  box-shadow: 0 0 0 2px rgba(184, 194, 220, .12) !important;
}
#appView .sync-dock.saved .sync-dock-indicator {
  box-shadow: 0 0 0 2px rgba(55, 180, 125, .12) !important;
}
@media (max-width: 640px) {
  #appView .sync-dock {
    right: 12px !important;
    bottom: calc(88px + env(safe-area-inset-bottom)) !important;
    height: 34px !important;
    padding: 4px 9px 4px 4px !important;
    gap: 5px !important;
    border-radius: 12px !important;
  }
  #appView .sync-dock-icon {
    width: 25px !important;
    height: 25px !important;
    border-radius: 8px !important;
  }
  #appView .sync-dock-icon svg {
    width: 13px !important;
    height: 13px !important;
  }
  #appView .sync-dock-copy strong {
    font-size: 11px !important;
  }
}

/* ==================================================================
   POINTS LEADERBOARD · 积分排行榜
   ================================================================== */
#appView .points-page {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  max-width: 1080px !important;
  margin: 0 auto !important;
}
#appView .points-hero {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 22px !important;
  padding: 20px 22px !important;
  border-radius: 22px !important;
  border: 1px solid rgba(255, 255, 255, .9) !important;
  background:
    radial-gradient(100% 140% at 0% 0%, rgba(205, 244, 225, .9), transparent 54%),
    radial-gradient(120% 160% at 100% 100%, rgba(219, 227, 255, .92), transparent 62%),
    linear-gradient(135deg, #f9fffc, #f4f7ff) !important;
  box-shadow: inset 0 1px 0 #fff, 0 4px 0 -2px #e4e9f8, 0 16px 30px -26px rgba(59, 80, 128, .42) !important;
}
#appView .points-hero-copy { min-width: 0 !important; }
#appView .points-kicker {
  display: inline-block !important;
  margin-bottom: 6px !important;
  color: #6e7fba !important;
  font-size: 9px !important;
  font-weight: 800 !important;
  letter-spacing: .16em !important;
}
#appView .points-hero h2 {
  margin: 0 !important;
  color: #203332 !important;
  font-size: 24px !important;
  line-height: 1.25 !important;
  font-weight: 850 !important;
}
#appView .points-hero p {
  margin: 5px 0 0 !important;
  color: #71807a !important;
  font-size: 11.5px !important;
}
#appView .points-hero-stats {
  display: flex !important;
  align-items: stretch !important;
  gap: 8px !important;
  flex: none !important;
}
#appView .points-hero-stats > div {
  min-width: 98px !important;
  padding: 10px 12px !important;
  border-radius: 14px !important;
  border: 1px solid rgba(255, 255, 255, .92) !important;
  background: rgba(255, 255, 255, .68) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
}
#appView .points-hero-stats strong {
  color: #304f48 !important;
  font-size: 17px !important;
  font-weight: 850 !important;
  white-space: nowrap !important;
}
#appView .points-hero-stats span {
  color: #89968f !important;
  font-size: 9.5px !important;
  white-space: nowrap !important;
}
#appView .points-toolbar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
  padding: 9px 11px !important;
  border-radius: 16px !important;
  border: 1px solid rgba(255, 255, 255, .9) !important;
  background: rgba(255, 255, 255, .6) !important;
  box-shadow: inset 0 1px 0 #fff, 0 2px 0 -1px #e8ecef !important;
}
#appView .points-mode-tabs {
  display: inline-flex !important;
  gap: 4px !important;
  padding: 3px !important;
  border-radius: 12px !important;
  background: rgba(236, 241, 244, .72) !important;
}
#appView .points-mode-tabs button {
  min-height: 30px !important;
  padding: 0 13px !important;
  border-radius: 9px !important;
  color: #71807a !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease !important;
}
#appView .points-mode-tabs button.active {
  color: #3d54a6 !important;
  background: #fff !important;
  box-shadow: 0 2px 7px -3px rgba(59, 80, 128, .3) !important;
}
#appView .points-tools {
  display: flex !important;
  align-items: center !important;
  gap: 9px !important;
  flex-wrap: wrap !important;
}
#appView .points-month-control {
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  height: 34px !important;
  padding: 0 9px 0 11px !important;
  border-radius: 11px !important;
  border: 1px solid rgba(80, 116, 94, .12) !important;
  background: #fff !important;
}
#appView .points-month-control span {
  color: #8a9791 !important;
  font-size: 10px !important;
  white-space: nowrap !important;
}
#appView .points-month-control input {
  width: 122px !important;
  border: 0 !important;
  background: transparent !important;
  color: #40564c !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  padding: 0 !important;
  min-height: 0 !important;
}
#appView .points-import-btn {
  height: 34px !important;
  padding: 0 12px !important;
  border-radius: 11px !important;
  font-size: 11px !important;
  gap: 5px !important;
}
#appView .points-import-btn svg { width: 14px !important; height: 14px !important; }
#appView .points-list {
  overflow: hidden !important;
  border-radius: 20px !important;
  border: 1px solid rgba(255, 255, 255, .92) !important;
  background: rgba(255, 253, 251, .85) !important;
  box-shadow: inset 0 1px 0 #fff, 0 4px 0 -2px #e8e2f2, 0 18px 32px -28px rgba(53, 43, 102, .3) !important;
}
#appView .points-row {
  display: grid !important;
  grid-template-columns: 34px 34px minmax(0, 1fr) 92px !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 10px 16px !important;
  border-top: 1px solid rgba(80, 116, 94, .07) !important;
}
#appView .points-row:first-child { border-top: 0 !important; }
#appView .points-row.top-1 { background: linear-gradient(90deg, rgba(255, 250, 226, .72), rgba(255, 255, 255, 0)) !important; }
#appView .points-row.top-2 { background: linear-gradient(90deg, rgba(243, 248, 252, .9), rgba(255, 255, 255, 0)) !important; }
#appView .points-row.top-3 { background: linear-gradient(90deg, rgba(255, 246, 237, .78), rgba(255, 255, 255, 0)) !important; }
#appView .points-rank {
  display: grid !important;
  place-items: center !important;
  width: 30px !important;
  height: 30px !important;
  border-radius: 10px !important;
  color: #7e8a84 !important;
  background: rgba(244, 247, 245, .8) !important;
  font-size: 11.5px !important;
  font-weight: 800 !important;
}
#appView .points-row.top-1 .points-rank { font-size: 18px !important; background: #fff5ce !important; }
#appView .points-row.top-2 .points-rank { font-size: 18px !important; background: #eef4f8 !important; }
#appView .points-row.top-3 .points-rank { font-size: 18px !important; background: #fff0e3 !important; }
#appView .points-avatar {
  display: grid !important;
  place-items: center !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 10px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}
#appView .points-person { min-width: 0 !important; display: flex !important; flex-direction: column !important; gap: 4px !important; }
#appView .points-person strong {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  color: #31463e !important;
  font-size: 12.5px !important;
  font-weight: 750 !important;
}
#appView .points-bar {
  height: 4px !important;
  overflow: hidden !important;
  border-radius: 999px !important;
  background: rgba(222, 232, 226, .72) !important;
}
#appView .points-bar i {
  display: block !important;
  height: 100% !important;
  border-radius: inherit !important;
  background: linear-gradient(90deg, #8edbbd, #86a8e8) !important;
}
#appView .points-value {
  display: flex !important;
  align-items: baseline !important;
  justify-content: flex-end !important;
  gap: 3px !important;
  text-align: right !important;
}
#appView .points-value strong { color: #365b9e !important; font-size: 15px !important; font-weight: 850 !important; }
#appView .points-value span { color: #93a09a !important; font-size: 9px !important; }
#appView .points-empty {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 260px !important;
  gap: 6px !important;
  border: 1px dashed rgba(80, 116, 94, .16) !important;
  border-radius: 20px !important;
  background: rgba(255, 255, 255, .52) !important;
}
#appView .points-empty svg { width: 34px !important; height: 34px !important; color: #9eb6aa !important; margin-bottom: 4px !important; }
#appView .points-empty h3 { font-size: 14px !important; color: #40564c !important; }
#appView .points-empty p { font-size: 11.5px !important; color: #89968f !important; }
#appView .points-skeleton { max-width: 1080px !important; margin: 0 auto !important; }
#appView .points-import-form .form-row { gap: 10px !important; }
#appView .points-import-actions {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 10px 0 !important;
}
#appView .points-import-actions .btn { height: 34px !important; font-size: 11.5px !important; }
#appView .points-import-actions span { color: #7c8b84 !important; font-size: 11px !important; }
#appView .points-preview {
  margin: 10px 0 !important;
  border: 1px solid rgba(80, 116, 94, .12) !important;
  border-radius: 14px !important;
  background: rgba(249, 252, 250, .9) !important;
  overflow: hidden !important;
}
#appView .points-preview-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  padding: 9px 12px !important;
  border-bottom: 1px solid rgba(80, 116, 94, .08) !important;
  font-size: 11.5px !important;
}
#appView .points-preview-head span { color: #8b9991 !important; overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap !important; }
#appView .points-preview-list { max-height: 230px !important; overflow: auto !important; padding: 5px 12px !important; }
#appView .points-preview-list > div {
  display: flex !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 5px 0 !important;
  color: #506158 !important;
  font-size: 11.5px !important;
}
#appView .points-preview-list strong { color: #365b9e !important; }
#appView .points-preview-list p { color: #8b9991 !important; font-size: 10.5px !important; margin: 5px 0 !important; }
@media (max-width: 760px) {
  #appView .points-page { gap: 10px !important; }
  #appView .points-hero {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    padding: 15px !important;
    border-radius: 18px !important;
  }
  #appView .points-hero h2 { font-size: 20px !important; }
  #appView .points-hero p { font-size: 10.5px !important; }
  #appView .points-hero-stats { width: 100% !important; gap: 6px !important; }
  #appView .points-hero-stats > div { flex: 1 !important; min-width: 0 !important; padding: 8px !important; border-radius: 11px !important; }
  #appView .points-hero-stats strong { font-size: 14px !important; }
  #appView .points-hero-stats span { font-size: 8.5px !important; }
  #appView .points-toolbar { align-items: stretch !important; padding: 8px !important; }
  #appView .points-mode-tabs { width: 100% !important; }
  #appView .points-mode-tabs button { flex: 1 !important; }
  #appView .points-tools { width: 100% !important; justify-content: space-between !important; }
  #appView .points-month-control { flex: 1 !important; min-width: 0 !important; }
  #appView .points-month-control input { width: 100% !important; }
  #appView .points-row {
    grid-template-columns: 28px 30px minmax(0, 1fr) 68px !important;
    gap: 8px !important;
    padding: 9px 11px !important;
  }
  #appView .points-rank { width: 26px !important; height: 26px !important; border-radius: 8px !important; }
  #appView .points-avatar { width: 28px !important; height: 28px !important; border-radius: 8px !important; }
  #appView .points-person strong { font-size: 12px !important; }
  #appView .points-value strong { font-size: 13px !important; }
  #appView .points-empty { min-height: 220px !important; }
}

/* ==================================================================
   POINTS IMPORT DROPZONE · 拖动文件 / 粘贴截图
   ================================================================== */
#appView .points-drop-zone {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  min-height: 150px !important;
  padding: 18px !important;
  border: 1.5px dashed rgba(90, 125, 108, .28) !important;
  border-radius: 16px !important;
  background: linear-gradient(135deg, rgba(248, 253, 250, .9), rgba(246, 249, 255, .8)) !important;
  text-align: center !important;
  cursor: pointer !important;
  outline: none !important;
  transition: border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease !important;
}
#appView .points-drop-zone:hover,
#appView .points-drop-zone:focus-visible {
  border-color: rgba(63, 151, 111, .52) !important;
  background: linear-gradient(135deg, #f7fdf9, #f5f8ff) !important;
  box-shadow: 0 0 0 3px rgba(63, 151, 111, .08) !important;
}
#appView .points-drop-zone.is-dragover {
  border-color: #45aa80 !important;
  border-style: solid !important;
  background: linear-gradient(135deg, #effbf4, #eef3ff) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 0 0 4px rgba(69, 170, 128, .1) !important;
}
#appView .points-drop-zone.is-loading {
  border-style: solid !important;
  border-color: rgba(86, 111, 198, .36) !important;
  background: linear-gradient(135deg, #f5f8ff, #f6f5ff) !important;
  cursor: wait !important;
}
#appView .points-drop-zone input[type="file"] {
  display: none !important;
}
#appView .points-drop-icon {
  display: grid !important;
  place-items: center !important;
  width: 38px !important;
  height: 38px !important;
  margin-bottom: 3px !important;
  border-radius: 12px !important;
  color: #527d67 !important;
  background: linear-gradient(145deg, #e8f8ef, #e8eefc) !important;
}
#appView .points-drop-icon svg {
  width: 20px !important;
  height: 20px !important;
  stroke-width: 1.8 !important;
}
#appView .points-drop-zone strong {
  color: #365349 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}
#appView .points-drop-zone > span:not(.points-drop-icon) {
  color: #75867d !important;
  font-size: 11px !important;
}
#appView .points-drop-zone > small {
  margin-top: 2px !important;
  color: #9aa9a1 !important;
  font-size: 9.5px !important;
}
@media (max-width: 640px) {
  #appView .points-drop-zone {
    min-height: 132px !important;
    padding: 14px !important;
    border-radius: 14px !important;
  }
  #appView .points-drop-zone strong { font-size: 12.5px !important; }
  #appView .points-drop-zone > span:not(.points-drop-icon) { font-size: 10.5px !important; }
}

/* 弹窗在 #appView 之外，拖放区使用全局选择器 */
.points-drop-zone {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  min-height: 150px !important;
  padding: 18px !important;
  border: 1.5px dashed rgba(90, 125, 108, .28) !important;
  border-radius: 16px !important;
  background: linear-gradient(135deg, rgba(248, 253, 250, .9), rgba(246, 249, 255, .8)) !important;
  text-align: center !important;
  cursor: pointer !important;
  outline: none !important;
  transition: border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease !important;
}
.points-drop-zone:hover,
.points-drop-zone:focus-visible {
  border-color: rgba(63, 151, 111, .52) !important;
  background: linear-gradient(135deg, #f7fdf9, #f5f8ff) !important;
  box-shadow: 0 0 0 3px rgba(63, 151, 111, .08) !important;
}
.points-drop-zone.is-dragover {
  border-color: #45aa80 !important;
  border-style: solid !important;
  background: linear-gradient(135deg, #effbf4, #eef3ff) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 0 0 4px rgba(69, 170, 128, .1) !important;
}
.points-drop-zone.is-loading {
  border-style: solid !important;
  border-color: rgba(86, 111, 198, .36) !important;
  background: linear-gradient(135deg, #f5f8ff, #f6f5ff) !important;
  cursor: wait !important;
}
.points-drop-zone input[type="file"] { display: none !important; }
.points-drop-icon {
  display: grid !important;
  place-items: center !important;
  width: 38px !important;
  height: 38px !important;
  margin-bottom: 3px !important;
  border-radius: 12px !important;
  color: #527d67 !important;
  background: linear-gradient(145deg, #e8f8ef, #e8eefc) !important;
}
.points-drop-icon svg { width: 20px !important; height: 20px !important; stroke-width: 1.8 !important; }
.points-drop-zone strong { color: #365349 !important; font-size: 13px !important; font-weight: 800 !important; }
.points-drop-zone > span:not(.points-drop-icon) { color: #75867d !important; font-size: 11px !important; }
.points-drop-zone > small { margin-top: 2px !important; color: #9aa9a1 !important; font-size: 9.5px !important; }
.points-import-actions {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 10px 0 !important;
}
.points-import-actions span { color: #7c8b84 !important; font-size: 11px !important; }
.points-preview {
  margin: 10px 0 !important;
  border: 1px solid rgba(80, 116, 94, .12) !important;
  border-radius: 14px !important;
  background: rgba(249, 252, 250, .9) !important;
  overflow: hidden !important;
}
.points-preview[hidden] { display: none !important; }
.points-preview-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  padding: 9px 12px !important;
  border-bottom: 1px solid rgba(80, 116, 94, .08) !important;
  font-size: 11.5px !important;
}
.points-preview-head strong { color: #40564c !important; }
.points-preview-head span { color: #8b9991 !important; overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap !important; }
.points-preview-list { max-height: 230px !important; overflow: auto !important; padding: 5px 12px !important; }
.points-preview-list > div {
  display: flex !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 5px 0 !important;
  color: #506158 !important;
  font-size: 11.5px !important;
}
.points-preview-list strong { color: #365b9e !important; }
.points-preview-list p { color: #8b9991 !important; font-size: 10.5px !important; margin: 5px 0 !important; }
@media (max-width: 640px) {
  .points-drop-zone { min-height: 132px !important; padding: 14px !important; border-radius: 14px !important; }
  .points-drop-zone strong { font-size: 12.5px !important; }
  .points-drop-zone > span:not(.points-drop-icon) { font-size: 10.5px !important; }
}

/* 积分排行榜不显示右上角账号/菜单栏 */
body.view-points #appView .topbar-actions {
  display: none !important;
}

/* ==================================================================
   POINTS MEMBER DETAIL · 展开成员每月积分
   ================================================================== */
#appView .points-item {
  border-top: 1px solid rgba(80, 116, 94, .07) !important;
}
#appView .points-item:first-child {
  border-top: 0 !important;
}
#appView .points-row {
  border-top: 0 !important;
  cursor: pointer !important;
  outline: none !important;
  transition: background .16s ease !important;
}
#appView .points-row:hover {
  background: rgba(246, 251, 248, .86) !important;
}
#appView .points-row:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(83, 102, 196, .28) !important;
}
#appView .points-row[aria-expanded="true"] {
  background: rgba(245, 250, 247, .94) !important;
}
#appView .points-person strong {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
}
#appView .points-caret {
  display: inline-grid !important;
  place-items: center !important;
  width: 15px !important;
  height: 15px !important;
  flex: none !important;
  border-radius: 5px !important;
  color: #9aa9a1 !important;
  font-size: 12px !important;
  line-height: 1 !important;
  transition: transform .18s ease, background .18s ease !important;
}
#appView .points-row:hover .points-caret {
  color: #527d67 !important;
  background: rgba(82, 125, 103, .08) !important;
}
#appView .points-row[aria-expanded="true"] .points-caret {
  transform: rotate(180deg) !important;
  color: #365b9e !important;
  background: rgba(83, 102, 196, .1) !important;
}
#appView .points-member-detail {
  padding: 0 16px 13px !important;
  background: linear-gradient(180deg, rgba(248, 252, 249, .9), rgba(246, 250, 255, .62)) !important;
}
#appView .points-member-detail[hidden] {
  display: none !important;
}
#appView .points-member-detail-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 7px 0 9px !important;
  border-top: 1px dashed rgba(80, 116, 94, .12) !important;
}
#appView .points-member-detail-head strong {
  color: #456058 !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
}
#appView .points-member-detail-head span {
  color: #82958b !important;
  font-size: 10px !important;
  white-space: nowrap !important;
}
#appView .points-month-grid {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 6px !important;
}
#appView .points-month-cell {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 5px !important;
  min-height: 30px !important;
  padding: 5px 8px !important;
  border: 1px solid rgba(80, 116, 94, .08) !important;
  border-radius: 9px !important;
  background: rgba(255, 255, 255, .56) !important;
}
#appView .points-month-cell span {
  color: #9aa9a1 !important;
  font-size: 9px !important;
  white-space: nowrap !important;
}
#appView .points-month-cell strong {
  color: #aebbb4 !important;
  font-size: 10.5px !important;
  font-weight: 650 !important;
  white-space: nowrap !important;
}
#appView .points-month-cell.has {
  border-color: rgba(84, 163, 126, .2) !important;
  background: rgba(241, 252, 247, .86) !important;
}
#appView .points-month-cell.has span { color: #6d9281 !important; }
#appView .points-month-cell.has strong { color: #2f7459 !important; }
#appView .points-month-cell.current {
  border-color: rgba(83, 102, 196, .28) !important;
  background: rgba(240, 244, 255, .9) !important;
}
#appView .points-month-cell.current span,
#appView .points-month-cell.current strong { color: #4d61b0 !important; }
@media (max-width: 760px) {
  #appView .points-member-detail { padding: 0 11px 11px !important; }
  #appView .points-member-detail-head { padding: 6px 0 8px !important; }
  #appView .points-member-detail-head strong { font-size: 10px !important; }
  #appView .points-member-detail-head span { font-size: 9px !important; }
  #appView .points-month-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 5px !important; }
  #appView .points-month-cell { min-height: 29px !important; padding: 4px 6px !important; border-radius: 8px !important; }
  #appView .points-month-cell span { font-size: 8.5px !important; }
  #appView .points-month-cell strong { font-size: 10px !important; }
}


/* ==================================================================
   POINTS CARET · 展开箭头动画优化
   ================================================================== */
#appView .points-caret {
  display: inline-grid !important;
  place-items: center !important;
  width: 17px !important;
  height: 17px !important;
  flex: none !important;
  border-radius: 6px !important;
  color: #97a69e !important;
  background: transparent !important;
  transform-origin: 50% 50% !important;
  transition:
    transform .28s cubic-bezier(.34, 1.45, .64, 1),
    color .18s ease,
    background .18s ease !important;
}
#appView .points-caret svg {
  width: 13px !important;
  height: 13px !important;
  display: block !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2.15 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  transform: translateY(-.4px) !important;
  transition: transform .28s cubic-bezier(.34, 1.45, .64, 1) !important;
}
#appView .points-row:hover .points-caret {
  color: #527d67 !important;
  background: rgba(82, 125, 103, .08) !important;
}
#appView .points-row[aria-expanded="true"] .points-caret {
  color: #365b9e !important;
  background: rgba(83, 102, 196, .1) !important;
  transform: rotate(180deg) !important;
}
#appView .points-row[aria-expanded="true"] .points-caret svg {
  transform: translateY(.4px) !important;
}
#appView .points-member-detail:not([hidden]) {
  animation: points-detail-reveal .22s cubic-bezier(.22, 1, .36, 1) both !important;
  transform-origin: top center !important;
}
@keyframes points-detail-reveal {
  from {
    opacity: 0;
    transform: translateY(-5px) scaleY(.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scaleY(1);
  }
}
@media (max-width: 760px) {
  #appView .points-caret { width: 18px !important; height: 18px !important; }
  #appView .points-caret svg { width: 13px !important; height: 13px !important; }
}

/* ==================================================================
   POINTS RESET / EDITABLE PREVIEW · 当月重置 + 可编辑预览
   ================================================================== */
#appView .points-reset-btn {
  height: 34px !important;
  padding: 0 11px !important;
  border-radius: 11px !important;
  font-size: 11px !important;
  gap: 5px !important;
  color: #a94b44 !important;
  border-color: rgba(178, 59, 50, .18) !important;
  background: rgba(255, 249, 248, .8) !important;
}
#appView .points-reset-btn svg { width: 14px !important; height: 14px !important; }
#appView .points-reset-btn:hover {
  background: #fff1ef !important;
  border-color: rgba(178, 59, 50, .28) !important;
}
.points-preview-head-name { color: #8b9991 !important; font-size: 10.5px !important; }
.points-preview-tip {
  margin: 8px 12px 2px !important;
  color: #8a7c6c !important;
  font-size: 10.5px !important;
  line-height: 1.5 !important;
}
.points-preview-row {
  display: grid !important;
  grid-template-columns: 22px minmax(0, 1fr) 92px 24px !important;
  align-items: center !important;
  gap: 7px !important;
  padding: 5px 0 !important;
  border-bottom: 1px solid rgba(80, 116, 94, .06) !important;
}
.points-preview-row:last-child { border-bottom: 0 !important; }
.points-preview-index {
  color: #a5b0aa !important;
  font-size: 10px !important;
  text-align: right !important;
}
.points-preview-name,
.points-preview-score {
  width: 100% !important;
  min-width: 0 !important;
  height: 29px !important;
  padding: 0 8px !important;
  border: 1px solid rgba(80, 116, 94, .12) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, .86) !important;
  color: #40564c !important;
  font-size: 11.5px !important;
  outline: none !important;
}
.points-preview-name:focus,
.points-preview-score:focus {
  border-color: rgba(83, 102, 196, .4) !important;
  box-shadow: 0 0 0 3px rgba(83, 102, 196, .08) !important;
}
.points-preview-score {
  text-align: right !important;
  color: #365b9e !important;
  font-weight: 700 !important;
}
.points-preview-remove {
  display: grid !important;
  place-items: center !important;
  width: 23px !important;
  height: 23px !important;
  padding: 0 !important;
  border-radius: 7px !important;
  color: #b8a19d !important;
  background: transparent !important;
  font-size: 15px !important;
  line-height: 1 !important;
}
.points-preview-remove:hover {
  color: #a6352c !important;
  background: #fff0ed !important;
}
@media (max-width: 640px) {
  #appView .points-reset-btn { padding: 0 9px !important; font-size: 10.5px !important; }
  .points-preview-row { grid-template-columns: 18px minmax(0, 1fr) 74px 22px !important; gap: 5px !important; }
  .points-preview-name, .points-preview-score { height: 30px !important; font-size: 12px !important; }
}

/* ==================================================================
   MEMBER ADMIN · 导入姓名 / 独立改积分 / 直接改姓名
   ================================================================== */
#appView .points-import-names-btn {
  height: 34px !important;
  padding: 0 11px !important;
  border-radius: 11px !important;
  font-size: 11px !important;
  gap: 5px !important;
  color: #3e6b56 !important;
  border-color: rgba(62, 107, 86, .18) !important;
  background: rgba(248, 252, 249, .84) !important;
}
#appView .points-import-names-btn svg { width: 14px !important; height: 14px !important; }
#appView .points-import-names-btn:hover { background: #f0faf4 !important; border-color: rgba(62, 107, 86, .3) !important; }
#appView .points-member-detail-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 6px !important;
  flex-wrap: wrap !important;
}
#appView .points-detail-action {
  height: 23px !important;
  padding: 0 8px !important;
  border: 1px solid rgba(83, 102, 196, .14) !important;
  border-radius: 7px !important;
  color: #6676bd !important;
  background: rgba(255, 255, 255, .7) !important;
  font-size: 9.5px !important;
  font-weight: 650 !important;
}
#appView .points-detail-action:hover {
  color: #4559a8 !important;
  border-color: rgba(83, 102, 196, .28) !important;
  background: #f2f5ff !important;
}
.points-import-mode-note {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  gap: 3px !important;
  min-height: 58px !important;
  padding: 9px 12px !important;
  border: 1px solid rgba(80, 116, 94, .1) !important;
  border-radius: 11px !important;
  background: rgba(246, 251, 248, .8) !important;
}
.points-import-mode-note strong { color: #365349 !important; font-size: 11.5px !important; }
.points-import-mode-note span { color: #84948c !important; font-size: 10px !important; line-height: 1.4 !important; }
.points-preview-row.names-only {
  grid-template-columns: 22px minmax(0, 1fr) auto 24px !important;
}
.points-preview-zero {
  color: #94a39b !important;
  font-size: 10px !important;
  white-space: nowrap !important;
}
.points-edit-member {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 2px 0 14px !important;
  padding: 10px 12px !important;
  border: 1px solid rgba(80, 116, 94, .1) !important;
  border-radius: 12px !important;
  background: rgba(248, 252, 249, .8) !important;
}
.points-edit-member > div {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  min-width: 0 !important;
}
.points-edit-member strong { color: #354c42 !important; font-size: 13px !important; overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap !important; }
.points-edit-member span { color: #8b9991 !important; font-size: 10.5px !important; }
@media (max-width: 760px) {
  #appView .points-member-detail-head { align-items: flex-start !important; flex-direction: column !important; gap: 5px !important; }
  #appView .points-member-detail-actions { width: 100% !important; justify-content: flex-start !important; }
  #appView .points-detail-action { height: 25px !important; font-size: 10px !important; }
  #appView .points-import-names-btn { padding: 0 9px !important; font-size: 10.5px !important; }
}

.points-preview-row.names-only {
  grid-template-columns: 22px minmax(0, 1fr) 24px !important;
}

/* ==================================================================
   SCORES ONLY / FILE RECOGNITION
   ================================================================== */
.points-preview-row.unknown {
  margin: 0 -5px !important;
  padding-left: 5px !important;
  padding-right: 5px !important;
  border-radius: 9px !important;
  background: rgba(255, 245, 243, .86) !important;
}
.points-preview-row.unknown .points-preview-name {
  color: #a94b44 !important;
  border-color: rgba(178, 59, 50, .26) !important;
  background: #fffafa !important;
}
@media (max-width: 760px) {
  #appView .points-tools { gap: 6px !important; }
}

/* ==================================================================
   POINTS EXPERIENCE v2 · 展开动画 / 字体 / 系统控件
   ================================================================== */
#appView .points-page {
  font-family: "MiSans", "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif !important;
  -webkit-font-smoothing: antialiased !important;
  text-rendering: optimizeLegibility !important;
  font-variant-numeric: tabular-nums !important;
}
#appView .points-page button,
#appView .points-page input,
#appView .points-page select {
  font-family: inherit !important;
}
#appView .points-page .points-value strong,
#appView .points-page .points-hero-stats strong,
#appView .points-page .points-month-cell strong {
  font-variant-numeric: tabular-nums !important;
  letter-spacing: -.02em !important;
}
#appView .points-hero h2 {
  letter-spacing: -.045em !important;
}
#appView .points-person strong {
  letter-spacing: -.015em !important;
}
#appView .points-member-detail-wrap {
  display: grid !important;
  grid-template-rows: 0fr !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transition:
    grid-template-rows .34s cubic-bezier(.22, 1, .36, 1),
    opacity .22s ease !important;
  will-change: grid-template-rows !important;
}
#appView .points-member-detail-wrap.open {
  grid-template-rows: 1fr !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}
#appView .points-member-detail {
  min-height: 0 !important;
  overflow: hidden !important;
  animation: none !important;
  transform: none !important;
}
#appView .points-member-detail-wrap.open .points-member-detail {
  animation: points-detail-settle .34s cubic-bezier(.22, 1, .36, 1) both !important;
}
@keyframes points-detail-settle {
  from { opacity: .35; transform: translateY(-3px); }
  to { opacity: 1; transform: translateY(0); }
}
#appView .points-row:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(83, 102, 196, .34) !important;
}
#appView .points-toolbar,
#appView .points-hero,
#appView .points-list {
  transition: opacity .22s ease, transform .22s ease, box-shadow .22s ease !important;
}
#appView .points-month-control:focus-within {
  border-color: rgba(83, 102, 196, .32) !important;
  box-shadow: 0 0 0 3px rgba(83, 102, 196, .08) !important;
}
#appView .points-mode-tabs button:active,
#appView .points-import-btn:active,
#appView .points-add-name-btn:active,
#appView .points-reset-btn:active {
  transform: scale(.97) !important;
}
#appView .points-list::-webkit-scrollbar,
.points-preview-list::-webkit-scrollbar {
  width: 7px !important;
  height: 7px !important;
}
#appView .points-list::-webkit-scrollbar-thumb,
.points-preview-list::-webkit-scrollbar-thumb {
  background: rgba(112, 136, 124, .22) !important;
  border-radius: 999px !important;
}
#appView .points-page-input,
#appView .points-import-form input,
#appView .points-import-form select {
  accent-color: #5366c4 !important;
}
#appView .points-add-name-btn {
  height: 34px !important;
  padding: 0 11px !important;
  border-radius: 11px !important;
  font-size: 11px !important;
  gap: 5px !important;
  color: #3e6b56 !important;
  border-color: rgba(62, 107, 86, .18) !important;
  background: rgba(248, 252, 249, .84) !important;
}
#appView .points-add-name-btn svg { width: 14px !important; height: 14px !important; }
#appView .points-add-name-btn:hover { background: #f0faf4 !important; border-color: rgba(62, 107, 86, .3) !important; }
.points-add-head {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 2px 0 14px !important;
  padding: 10px 12px !important;
  border: 1px solid rgba(80, 116, 94, .1) !important;
  border-radius: 12px !important;
  background: rgba(248, 252, 249, .8) !important;
}
.points-add-icon {
  display: grid !important;
  place-items: center !important;
  width: 34px !important;
  height: 34px !important;
  flex: none !important;
  border-radius: 10px !important;
  color: #527d67 !important;
  background: linear-gradient(145deg, #e8f8ef, #e8eefc) !important;
}
.points-add-icon svg { width: 17px !important; height: 17px !important; }
.points-add-head > div { display: flex !important; flex-direction: column !important; gap: 2px !important; }
.points-add-head strong { color: #354c42 !important; font-size: 12.5px !important; }
.points-add-head span:not(.points-add-icon) { color: #8b9991 !important; font-size: 10.5px !important; }
@media (prefers-reduced-motion: reduce) {
  #appView .points-member-detail-wrap,
  #appView .points-caret,
  #appView .points-caret svg {
    transition-duration: .01ms !important;
    animation: none !important;
  }
}
@media (max-width: 760px) {
  #appView .points-add-name-btn { padding: 0 9px !important; font-size: 10.5px !important; }
  #appView .points-tools { gap: 6px !important; }
}

/* ==================================================================
   CUSTOM IMPORT DROPDOWNS · 月份/方式卡片与应用一致
   ================================================================== */
.ocp-field {
  position: relative !important;
}
.ocp-dropdown {
  position: relative !important;
}
.ocp-dropdown-trigger {
  width: 100% !important;
  min-height: 42px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  padding: 0 12px !important;
  border: 1px solid rgba(80, 116, 94, .14) !important;
  border-radius: 13px !important;
  background: #fff !important;
  color: #3f554b !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  text-align: left !important;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease !important;
}
.ocp-dropdown-trigger:hover {
  border-color: rgba(83, 102, 196, .26) !important;
  background: #fcfdff !important;
}
.ocp-dropdown-trigger:focus-visible,
.ocp-dropdown-trigger[aria-expanded="true"] {
  outline: none !important;
  border-color: rgba(83, 102, 196, .38) !important;
  box-shadow: 0 0 0 3px rgba(83, 102, 196, .08) !important;
}
.ocp-dropdown-trigger svg {
  width: 17px !important;
  height: 17px !important;
  flex: none !important;
  color: #8d9c94 !important;
  stroke-width: 1.7 !important;
  transition: transform .2s ease, color .2s ease !important;
}
.ocp-dropdown-trigger[aria-expanded="true"] svg {
  color: #5366c4 !important;
  transform: rotate(180deg) !important;
}
#pointsMonthTrigger svg {
  width: 18px !important;
  height: 18px !important;
}
#pointsMonthTrigger[aria-expanded="true"] svg {
  transform: none !important;
}
.ocp-dropdown-menu {
  position: absolute !important;
  z-index: 60 !important;
  top: calc(100% + 7px) !important;
  left: 0 !important;
  right: 0 !important;
  min-width: 0 !important;
  padding: 7px !important;
  border: 1px solid rgba(255, 255, 255, .95) !important;
  border-radius: 15px !important;
  background: rgba(255, 255, 255, .97) !important;
  box-shadow:
    inset 0 1px 0 #fff,
    0 3px 0 -2px rgba(108, 128, 196, .12),
    0 18px 34px -18px rgba(43, 67, 116, .35) !important;
  backdrop-filter: blur(14px) saturate(1.08) !important;
  -webkit-backdrop-filter: blur(14px) saturate(1.08) !important;
  animation: ocp-dropdown-in .18s cubic-bezier(.22, 1, .36, 1) both !important;
  transform-origin: top center !important;
}
.ocp-dropdown-menu[hidden] {
  display: none !important;
}
@keyframes ocp-dropdown-in {
  from { opacity: 0; transform: translateY(-4px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.ocp-month-menu {
  width: 280px !important;
  right: auto !important;
}
.ocp-month-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  padding: 4px 3px 8px !important;
}
.ocp-month-head strong {
  color: #40564c !important;
  font-size: 11.5px !important;
  font-weight: 750 !important;
}
.ocp-month-head button {
  width: 26px !important;
  height: 26px !important;
  display: grid !important;
  place-items: center !important;
  border: 0 !important;
  border-radius: 8px !important;
  color: #7d8d84 !important;
  background: rgba(246, 249, 247, .9) !important;
  font-size: 16px !important;
  line-height: 1 !important;
}
.ocp-month-head button:hover {
  color: #5366c4 !important;
  background: #eef2ff !important;
}
.ocp-month-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 5px !important;
}
.ocp-month-grid button {
  height: 30px !important;
  padding: 0 4px !important;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  color: #63736a !important;
  background: rgba(247, 250, 248, .92) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
}
.ocp-month-grid button:hover {
  color: #3e549e !important;
  background: #f1f4ff !important;
}
.ocp-month-grid button.active {
  color: #3f54a5 !important;
  background: #e9eeff !important;
  border-color: rgba(83, 102, 196, .18) !important;
  font-weight: 800 !important;
}
.ocp-mode-menu {
  width: 100% !important;
}
.ocp-mode-item {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 1px !important;
  width: 100% !important;
  padding: 8px 9px !important;
  border: 1px solid transparent !important;
  border-radius: 9px !important;
  background: transparent !important;
  text-align: left !important;
}
.ocp-mode-item:hover {
  background: rgba(246, 250, 248, .95) !important;
}
.ocp-mode-item.active {
  background: #f0f4ff !important;
  border-color: rgba(83, 102, 196, .12) !important;
}
.ocp-mode-item span {
  color: #43594e !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
}
.ocp-mode-item small {
  color: #97a39d !important;
  font-size: 9.5px !important;
}
.ocp-mode-item.active span { color: #4056a6 !important; }
@media (max-width: 640px) {
  .ocp-dropdown-trigger { min-height: 44px !important; font-size: 13px !important; }
  .ocp-month-menu { width: min(280px, calc(100vw - 70px)) !important; }
  .ocp-month-grid button { height: 32px !important; font-size: 11.5px !important; }
}

/* ==================================================================
   APPLE TYPOGRAPHY · 全局苹方风格加粗 + 超清平滑边缘
   ================================================================== */
:root {
  --font-apple: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "MiSans",
    "Microsoft YaHei UI", "Microsoft YaHei", "Segoe UI", sans-serif !important;
}
html body,
html body *:not(svg):not(path):not(use):not(circle):not(rect):not(line):not(polyline):not(polygon) {
  font-family: var(--font-apple) !important;
}
html body {
  font-weight: 600 !important;
  letter-spacing: -.012em !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
  text-rendering: optimizeLegibility !important;
  font-kerning: normal !important;
  font-optical-sizing: auto !important;
  -webkit-text-size-adjust: 100% !important;
}
html body h1,
html body h2,
html body h3,
html body h4,
html body .topbar-title h1,
html body .brand-word,
html body .login-card h2,
html body .sheet-body h2 {
  font-weight: 800 !important;
  letter-spacing: -.028em !important;
  text-rendering: geometricPrecision !important;
}
html body button,
html body .btn,
html body .tab,
html body .nav-item,
html body .mini-btn,
html body .account-menu-item,
html body .category-option,
html body .ocp-dropdown-trigger,
html body .ocp-mode-item span,
html body .ocp-month-grid button {
  font-weight: 700 !important;
  letter-spacing: -.01em !important;
}
html body input,
html body select,
html body textarea {
  font-weight: 600 !important;
  letter-spacing: -.01em !important;
}
html body small,
html body .sub,
html body .muted,
html body .form-hint,
html body .side-sub,
html body .topbar-title p,
html body .page-sub,
html body .points-kicker,
html body .points-hero p {
  font-weight: 500 !important;
  letter-spacing: 0 !important;
}
html body .card-content,
html body .detail-content,
html body .sheet-body,
html body p {
  font-weight: 550 !important;
  letter-spacing: -.008em !important;
}
html body .brand-word,
html body .side-name,
html body .points-kicker,
html body .dl-url,
html body .points-hero-stats span {
  -webkit-font-smoothing: antialiased !important;
}
html body svg {
  shape-rendering: geometricPrecision !important;
}
html body svg * {
  shape-rendering: geometricPrecision !important;
}
html body img,
html body canvas {
  image-rendering: auto !important;
}
html body ::selection {
  background: rgba(83, 102, 196, .22) !important;
  color: #1d3030 !important;
}
html body input::placeholder,
html body textarea::placeholder {
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  opacity: 1 !important;
}
html body :focus-visible {
  outline-color: rgba(83, 102, 196, .55) !important;
}
html body .topbar-title h1,
html body .points-hero h2 {
  text-wrap: balance;
}
html body .points-page,
html body .points-hero-stats strong,
html body .points-value strong,
html body .points-month-cell strong,
html body .stat-value {
  font-variant-numeric: tabular-nums !important;
}
html body button,
html body .btn,
html body .card,
html body .topbar,
html body .modal {
  text-rendering: geometricPrecision !important;
}
@media (max-width: 640px) {
  html body {
    -webkit-font-smoothing: antialiased !important;
    letter-spacing: -.008em !important;
  }
}

/* ==================================================================
   APPLE TYPE FINAL · 覆盖旧 iOS 字体变量与组件字体
   ================================================================== */
:root {
  --ios-font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "MiSans",
    "Microsoft YaHei UI", "Microsoft YaHei", "Segoe UI", sans-serif;
}
html body :not(#ocp-force-weight) {
  font-family: var(--font-apple) !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
  text-rendering: optimizeLegibility !important;
}
html body #appView,
html body #appView *,
html body #loginView,
html body #loginView *,
html body #modalLayer,
html body #modalLayer *,
html body #sheetLayer,
html body #sheetLayer *,
html body #tabbar,
html body #tabbar *,
html body .install-bar,
html body .install-bar * {
  font-family: var(--font-apple) !important;
}
html body #appView .points-page,
html body #appView .points-page * {
  font-family: var(--font-apple) !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
}
html body :not(#ocp-force-weight) h1,
html body :not(#ocp-force-weight) h2,
html body :not(#ocp-force-weight) h3,
html body :not(#ocp-force-weight) h4,
html body :not(#ocp-force-weight) .topbar-title h1,
html body :not(#ocp-force-weight) .brand-word,
html body :not(#ocp-force-weight) .login-card h2,
html body :not(#ocp-force-weight) .points-hero h2 {
  font-weight: 800 !important;
  letter-spacing: -.03em !important;
  -webkit-font-smoothing: antialiased !important;
}
html body :not(#ocp-force-weight) button,
html body :not(#ocp-force-weight) .btn,
html body :not(#ocp-force-weight) .tab,
html body :not(#ocp-force-weight) .nav-item,
html body :not(#ocp-force-weight) .mini-btn,
html body :not(#ocp-force-weight) .account-menu-item,
html body :not(#ocp-force-weight) .category-option,
html body :not(#ocp-force-weight) .ocp-dropdown-trigger,
html body :not(#ocp-force-weight) .ocp-mode-item span,
html body :not(#ocp-force-weight) .ocp-month-grid button {
  font-weight: 700 !important;
  letter-spacing: -.012em !important;
}
html body :not(#ocp-force-weight) input,
html body :not(#ocp-force-weight) select,
html body :not(#ocp-force-weight) textarea {
  font-weight: 600 !important;
  letter-spacing: -.012em !important;
}
html body :not(#ocp-force-weight) small,
html body :not(#ocp-force-weight) .sub,
html body :not(#ocp-force-weight) .side-sub,
html body :not(#ocp-force-weight) .topbar-title p,
html body :not(#ocp-force-weight) .form-hint,
html body :not(#ocp-force-weight) .points-kicker,
html body :not(#ocp-force-weight) .points-hero p {
  font-weight: 500 !important;
  letter-spacing: 0 !important;
}
html body :not(#ocp-force-weight) .card-content,
html body :not(#ocp-force-weight) .detail-content,
html body :not(#ocp-force-weight) .sheet-body,
html body :not(#ocp-force-weight) p {
  font-weight: 600 !important;
  letter-spacing: -.01em !important;
}
html body :not(#ocp-force-weight) .points-value strong,
html body :not(#ocp-force-weight) .points-hero-stats strong,
html body :not(#ocp-force-weight) .points-month-cell strong,
html body :not(#ocp-force-weight) .stat-value {
  font-variant-numeric: tabular-nums !important;
}
html body :not(#ocp-force-weight) ::placeholder {
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  opacity: 1 !important;
}


/* ==================================================================
   APP TOAST · 与应用一致的浅色玻璃提示
   ================================================================== */
.toast {
  display: flex !important;
  align-items: center !important;
  gap: 9px !important;
  width: max-content !important;
  max-width: min(calc(100vw - 40px), 430px) !important;
  padding: 9px 14px 9px 9px !important;
  border: 1px solid rgba(255, 255, 255, .96) !important;
  border-radius: 16px !important;
  background: rgba(255, 255, 255, .95) !important;
  color: #2d443a !important;
  box-shadow:
    inset 0 1px 0 #fff,
    0 3px 0 -2px rgba(108, 128, 196, .12),
    0 16px 34px -18px rgba(30, 55, 44, .34) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  text-shadow: none !important;
  font-family: var(--font-apple) !important;
  font-weight: 650 !important;
  letter-spacing: -.012em !important;
  -webkit-font-smoothing: antialiased !important;
  font-size: 12.5px !important;
  line-height: 1.5 !important;
}
.toast .toast-icon {
  display: grid !important;
  place-items: center !important;
  width: 28px !important;
  height: 28px !important;
  flex: none !important;
  border-radius: 9px !important;
}
.toast .toast-icon svg {
  width: 15px !important;
  height: 15px !important;
  stroke-width: 2.1 !important;
}
.toast .toast-text {
  min-width: 0 !important;
  color: #354d43 !important;
}
.toast.toast-success .toast-icon {
  color: #0e7a5c !important;
  background: linear-gradient(145deg, #e8faf2, #dcf4e9) !important;
  box-shadow: inset 0 0 0 1px rgba(14, 122, 92, .08) !important;
}
.toast.toast-success .toast-text { color: #2d4c40 !important; }
.toast.toast-error {
  border-color: rgba(255, 228, 224, .96) !important;
}
.toast.toast-error .toast-icon {
  color: #b23b32 !important;
  background: linear-gradient(145deg, #fff0ed, #ffe7e2) !important;
  box-shadow: inset 0 0 0 1px rgba(178, 59, 50, .1) !important;
}
.toast.toast-error .toast-text { color: #7f3731 !important; }
.toast.toast-info .toast-icon {
  color: #5366c4 !important;
  background: linear-gradient(145deg, #eef2ff, #e7edff) !important;
  box-shadow: inset 0 0 0 1px rgba(83, 102, 196, .08) !important;
}
.toast.toast-info .toast-text { color: #40527f !important; }
.toast.toast-success .toast-icon svg { animation: toast-check-pop .26s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes toast-check-pop {
  from { opacity: 0; transform: scale(.72); }
  to { opacity: 1; transform: scale(1); }
}
@media (max-width: 640px) {
  .toast {
    max-width: calc(100vw - 32px) !important;
    padding: 8px 12px 8px 8px !important;
    font-size: 12px !important;
    border-radius: 15px !important;
  }
  .toast .toast-icon { width: 26px !important; height: 26px !important; border-radius: 8px !important; }
  .toast .toast-icon svg { width: 14px !important; height: 14px !important; }
}


/* ==================================================================
   POINTS REPORT RANGE · 统计范围日期
   ================================================================== */
#appView .points-report-range {
  min-width: 188px !important;
}
#appView .points-report-range strong {
  font-size: 13px !important;
  font-weight: 800 !important;
  letter-spacing: -.02em !important;
  white-space: nowrap !important;
  font-variant-numeric: tabular-nums !important;
}
@media (max-width: 760px) {
  #appView .points-report-range {
    min-width: 0 !important;
  }
  #appView .points-report-range strong {
    font-size: 9.5px !important;
    line-height: 1.35 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }
}

@media (max-width: 760px) {
  #appView .points-tools {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
  }
  #appView .points-month-control {
    flex: 1 1 100% !important;
    width: 100% !important;
  }
  #appView .points-month-control input { width: 100% !important; }
  #appView .points-reset-btn,
  #appView .points-add-name-btn,
  #appView .points-import-btn {
    flex: 1 1 calc(33.333% - 5px) !important;
    justify-content: center !important;
    min-width: 0 !important;
    padding-left: 7px !important;
    padding-right: 7px !important;
  }
}

/* ==================================================================
   POINTS STATS ALIGNMENT · 三个统计卡片等宽对齐
   ================================================================== */
#appView .points-hero-stats {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  align-items: stretch !important;
  flex: 0 1 530px !important;
  width: 530px !important;
  max-width: 530px !important;
  gap: 8px !important;
}
#appView .points-hero-stats > div {
  width: auto !important;
  min-width: 0 !important;
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  gap: 5px !important;
}
#appView .points-hero-stats > div > span {
  margin-top: auto !important;
}
#appView .points-report-range {
  min-width: 0 !important;
}
#appView .points-report-range strong {
  font-size: 12px !important;
  letter-spacing: -.025em !important;
  white-space: nowrap !important;
}
@media (max-width: 980px) and (min-width: 761px) {
  #appView .points-hero-stats {
    flex-basis: 440px !important;
    width: 440px !important;
    max-width: 440px !important;
    gap: 6px !important;
  }
  #appView .points-report-range strong { font-size: 10.5px !important; }
}
@media (max-width: 760px) {
  #appView .points-hero-stats {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
    gap: 6px !important;
  }
  #appView .points-hero-stats > div {
    flex: none !important;
    height: 100% !important;
    padding: 8px !important;
  }
  #appView .points-report-range strong {
    font-size: 9px !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }
}

/* ==================================================================
   POINTS IMPORT OCR SUGGESTIONS · 近似姓名建议
   ================================================================== */
#modalLayer .points-suggest-row {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  margin: -3px 0 7px 38px !important;
  padding: 0 2px !important;
}
#modalLayer .points-suggest-label {
  color: #7a8f86 !important;
  font-size: 10.5px !important;
  font-weight: 600 !important;
  letter-spacing: .01em !important;
}
#modalLayer .points-suggest-btn {
  border: 1px solid rgba(115, 136, 210, .2) !important;
  border-radius: 9px !important;
  background: linear-gradient(145deg, #f4f7ff, #eef2ff) !important;
  color: #50659f !important;
  padding: 4px 9px !important;
  font-family: var(--font-apple) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  cursor: pointer !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9) !important;
  transition: transform .16s ease, border-color .16s ease, background .16s ease !important;
}
#modalLayer .points-suggest-btn:hover {
  border-color: rgba(104, 128, 210, .42) !important;
  background: linear-gradient(145deg, #eef3ff, #e7edff) !important;
  transform: translateY(-1px) !important;
}
#modalLayer .points-suggest-btn:active { transform: translateY(0) scale(.97) !important; }
@media (max-width: 640px) {
  #modalLayer .points-suggest-row { margin-left: 30px !important; }
  #modalLayer .points-suggest-btn { font-size: 10.5px !important; padding: 4px 8px !important; }
}

/* 统计范围日期居中 */
#appView .points-report-range {
  align-items: center !important;
  text-align: center !important;
}
#appView .points-report-range strong,
#appView .points-report-range span {
  width: 100% !important;
  text-align: center !important;
}

/* 统计卡片全部内容居中 */
#appView .points-hero-stats > div {
  align-items: center !important;
  text-align: center !important;
}
#appView .points-hero-stats > div > strong,
#appView .points-hero-stats > div > span {
  width: 100% !important;
  text-align: center !important;
}

/* 统计范围日期与旁边数字垂直对齐 */
#appView .points-report-range strong {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 27px !important;
  line-height: 1.2 !important;
  font-size: 12.5px !important;
  letter-spacing: -.035em !important;
}
@media (max-width: 760px) {
  #appView .points-report-range strong {
    min-height: 0 !important;
    line-height: 1.35 !important;
  }
}

/* 导入预览名单独立滚动 */
#appView .points-preview-list {
  overscroll-behavior: contain !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-y !important;
}


/* 自查修复：积分明细操作按钮触控尺寸 */
#appView .points-detail-action {
  min-height: 29px !important;
  padding: 0 10px !important;
  border-radius: 9px !important;
}
@media (max-width: 760px) {
  #appView .points-detail-action {
    min-height: 32px !important;
    padding: 0 12px !important;
    font-size: 11.5px !important;
  }
}


/* 点击月份卡片直接改积分 */
#appView button.points-month-cell {
  width: 100% !important;
  font-family: var(--font-apple) !important;
  color: inherit !important;
  cursor: pointer !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  text-align: left !important;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease !important;
}
#appView button.points-month-cell:hover {
  border-color: rgba(83, 102, 196, .38) !important;
  background: rgba(245, 248, 255, .96) !important;
  box-shadow: 0 4px 12px -8px rgba(83, 102, 196, .45) !important;
  transform: translateY(-1px) !important;
}
#appView button.points-month-cell:active { transform: scale(.98) !important; }


/* ICP 备案信息 */
.icp-footer {
  position: fixed;
  left: 50%;
  bottom: calc(78px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 35;
  padding: 3px 9px;
  border: 1px solid rgba(80, 116, 94, .08);
  border-radius: 999px;
  background: rgba(255, 255, 255, .62);
  color: rgba(64, 86, 76, .55);
  font-family: var(--font-apple);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: .01em;
  line-height: 1.4;
  white-space: nowrap;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  pointer-events: auto;
}
.icp-footer a {
  color: inherit;
  text-decoration: none;
}
.icp-footer a:hover {
  color: #43665a;
  text-decoration: underline;
}
@media (max-width: 640px) {
  .icp-footer {
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    font-size: 9px;
    padding: 2px 8px;
  }
}

@media (min-width: 641px) {
  .icp-footer { bottom: calc(96px + env(safe-area-inset-bottom, 0px)) !important; }
}

/* ICP 信息固定在底部导航下方，不遮挡内容 */
.tabbar {
  bottom: calc(30px + env(safe-area-inset-bottom, 0px)) !important;
}
.icp-footer {
  bottom: calc(5px + env(safe-area-inset-bottom, 0px)) !important;
  z-index: 46 !important;
  padding: 1px 8px !important;
  border-color: rgba(80, 116, 94, .06) !important;
  background: rgba(255, 255, 255, .72) !important;
  font-size: 9px !important;
}
@media (max-width: 640px) {
  .tabbar {
    bottom: calc(28px + env(safe-area-inset-bottom, 0px)) !important;
  }
  .icp-footer {
    bottom: calc(4px + env(safe-area-inset-bottom, 0px)) !important;
    font-size: 8.5px !important;
    padding: 1px 7px !important;
  }
}
