:root {
  /* 对齐后台设计规范 */
  --paper: #f9fafe;      /* 列表悬停色块 */
  --card: #ffffff;
  --ink: #2c3034;        /* 重要文字 */
  --text: #2c3034;
  --text-2: #5a5f6c;     /* 次要文字 */
  --muted: #8a90a1;      /* 辅助文字 */
  --hint: #adbcc7;       /* 输入提示 */
  --line: #edeff8;       /* 分割线 */
  --line-2: #dcdfea;
  --accent: #0066ff;     /* 品牌色 */
  --serif: var(--sans);
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Source Han Sans SC", "Noto Sans CJK SC", "Microsoft YaHei UI", "Microsoft YaHei", "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: auto; overflow-x: clip; }   /* 头部的装饰光斑会伸出屏幕右侧，手机上不能因此出现横向滚动 */
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; font-family: var(--sans); color: var(--text); background: var(--paper); -webkit-font-smoothing: antialiased; line-height: 1.6; }
a { color: inherit; text-decoration: none; }

/* ---------- 头部 ---------- */
.hero {
  position: relative; z-index: 1; overflow: hidden;
  background: linear-gradient(180deg, var(--h-bg1, #e6efff) 0%, var(--h-bg2, #f1f6ff) 52%, var(--paper) 100%);   /* 底部融入页面，无硬边 */
}
.hero > i { position: absolute; pointer-events: none; }
.blob { border-radius: 50%; filter: blur(90px); will-change: transform; }
.blob.b1 { width: 560px; height: 560px; left: -140px; top: -260px; background: rgba(var(--h-a, 0, 102, 255), .20); animation: d1 34s ease-in-out infinite alternate; }
.blob.b2 { width: 520px; height: 520px; right: -120px; top: -200px; background: rgba(var(--h-b, 0, 209, 255), .20); animation: d2 42s ease-in-out infinite alternate; }
.blob.b3 { width: 420px; height: 420px; left: 38%; top: -240px; background: rgba(var(--h-c, 110, 140, 255), .18); animation: d3 50s ease-in-out infinite alternate; }
@keyframes d1 { to { transform: translate(180px, 90px) scale(1.12); } }
@keyframes d2 { to { transform: translate(-200px, 110px) scale(1.18); } }
@keyframes d3 { to { transform: translate(-140px, 70px) scale(.9); } }
.hero-grid {
  inset: 0;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='224' height='224'%3E%3Cpath d='M112.5 106v13M106 112.5h13' stroke='%230066ff' stroke-opacity='.4'/%3E%3C/svg%3E"),
    linear-gradient(rgba(0, 102, 255, .055) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 102, 255, .055) 1px, transparent 1px);
  background-size: 224px 224px, 56px 56px, 56px 56px;
  -webkit-mask-image: radial-gradient(70% 100% at 50% 0%, #000, transparent 78%); mask-image: radial-gradient(70% 100% at 50% 0%, #000, transparent 78%);
  filter: hue-rotate(var(--h-hue, 0deg));
}
.hero-data { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%); }
.hero-tip { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }
.hero-glow { inset: 0; background: radial-gradient(460px circle at var(--mx, 50%) var(--my, 35%), rgba(var(--h-a, 0, 102, 255), .13), transparent 70%); }
#pagebg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.hero-inner { position: relative; z-index: 1; max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.topbar { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; color: var(--ink); letter-spacing: .14em; }
.logo { height: 26px; width: auto; display: block; }
.brand span { line-height: 1; position: relative; top: 4px; }   /* 光学对齐：X 标志重心偏下，文字下移与其居中 */
.admin-link { font-size: 13px; color: var(--muted); padding: 6px 2px; border-bottom: 1px solid transparent; transition: .2s; }
.admin-link:hover { color: var(--ink); border-color: var(--ink); }
#editLink { color: var(--accent); }
.admin-link[hidden] { display: none; }
.topbar-right { display: flex; align-items: center; gap: 20px; }
.who { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.who[hidden] { display: none; }
.who select { font: inherit; color: var(--ink); height: 30px; padding: 0 28px 0 12px; border: 1px solid rgba(0,0,0,.12); border-radius: 999px; background: rgba(255,255,255,.7) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%235a5f6c' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 11px center; -webkit-appearance: none; appearance: none; cursor: pointer; transition: .2s; }
.who select:hover, .who select:focus-visible { border-color: var(--ink); outline: none; }
.who-team { padding: 3px 12px; border-radius: 999px; background: rgba(0,102,255,.08); color: #0057d9; font-weight: 600; }
.who-name { color: var(--ink); }
.who-out { color: var(--muted); border-bottom: 1px solid transparent; transition: .2s; }
.who-out:hover { color: var(--ink); border-color: var(--ink); }
@media (max-width: 640px) { .topbar-right { gap: 12px; } .who-name { display: none; } }

.hero-body { padding: 64px 0 88px; text-align: center; }
.quick { display: flex; flex-wrap: nowrap; justify-content: center; align-items: center; gap: 8px; margin: 18px auto 0; max-width: 680px; }
.quick[hidden] { display: none; }
.qk-l { font-size: 12.5px; color: var(--muted); margin-right: 4px; }
.qk { display: inline-flex; align-items: center; gap: 7px; max-width: 190px; padding: 4px 12px 4px 5px; border-radius: 999px; background: rgba(255, 255, 255, .82); border: 1px solid rgba(var(--h-a, 0, 102, 255), .14); color: #2a3550; font-size: 13px; transition: transform .15s, box-shadow .15s, border-color .15s; }
.qk:hover { transform: translateY(-1px); border-color: rgba(var(--h-a, 0, 102, 255), .45); box-shadow: 0 8px 18px -10px rgba(var(--h-a, 0, 102, 255), .5); }
.qk .icon { width: 22px; height: 22px; border-radius: 7px; flex: none; }
.qk .icon img { padding: 3px; }
.qk .icon.full img { padding: 0; }
.qk .icon.ph { font-size: 12px; line-height: 1; }
.qk span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 14px; margin: 0 0 22px;
  font-size: 13px; letter-spacing: .5em; text-indent: .5em; color: var(--muted);
}
.eyebrow::before, .eyebrow::after { content: ""; width: 36px; height: 1px; background: var(--line-2); }
.hero h1 {
  margin: 0; font-family: var(--serif); font-size: 56px; line-height: 1.15; font-weight: 700;
  letter-spacing: .04em; text-indent: .04em; color: var(--ink);
}
.hero-body > * { animation: fade .7s both; }
.hero-body > :nth-child(2) { animation-delay: .1s; }
.hero-body > :nth-child(3) { animation-delay: .2s; }
.hero h1 em { font-style: normal; color: var(--accent); }
.sub { margin: 20px auto 0; font-size: 15px; color: var(--muted); max-width: 560px; }

.search {
  display: flex; align-items: center; gap: 12px; margin: 36px auto 0; max-width: 520px; height: 52px; padding: 0 16px;
  background: rgba(255, 255, 255, .92); border: 1px solid var(--line-2); border-radius: 10px; transition: border-color .2s, box-shadow .2s; box-shadow: 0 10px 30px -18px rgba(0, 60, 160, .35);
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(var(--h-a, 0, 102, 255), .12); }
.search svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; flex: none; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: 15px; }
.search input::placeholder { color: var(--hint); }
.search input::-webkit-search-cancel-button { display: none; }
.search kbd { font: 12px var(--sans); color: var(--muted); padding: 0 7px; border: 1px solid var(--line-2); border-radius: 4px; background: var(--paper); }
.meta { margin-top: 18px; font-size: 12.5px; color: var(--muted); letter-spacing: .08em; }

/* ---------- 左侧分类目录：垂直居中、低调的悬浮目录 ---------- */
.side { align-self: stretch; }   /* 仅占位，目录本身是 fixed */
.menu {
  list-style: none; margin: 0; padding: 40px 74px 40px 14px; width: 250px; pointer-events: none;   /* 右侧留白给放大后的文字；留白区不拦截鼠标 */
 
  position: fixed; z-index: 15; top: 0; left: max(20px, calc(50vw - 706px));
  transform: translate3d(0, var(--y, 40vh), 0); will-change: transform;   /* 纵向位置由 JS 平滑跟随滚动 */
  display: flex; flex-direction: column; gap: 1px; max-height: calc(100vh - 48px); overflow-y: auto; scrollbar-width: none;
}
/* 竖线：默认从第一项到最后一项、两端不渐隐；随目录滑向视口中间（--f 由 0 到 1），两端逐渐延展并渐隐 */
.menu::before { content: ""; position: absolute; left: 0; top: calc(40px * (1 - var(--f, 0))); bottom: calc(40px * (1 - var(--f, 0))); width: 1px; background: linear-gradient(to bottom, transparent, #e4e8f1 calc(64px * var(--f, 0)), #e4e8f1 calc(100% - 64px * var(--f, 0)), transparent); pointer-events: none; }
.menu::-webkit-scrollbar { display: none; }
.menu li { list-style: none; }
.menu button {
  pointer-events: auto; transform-origin: 0 50%; will-change: transform; transition: color .2s, background .25s, font-weight .2s;
  position: relative; display: grid; grid-template-columns: 22px max-content max-content; white-space: nowrap; align-items: baseline; gap: 2px; width: 100%; text-align: left;
  padding: 7px 8px; border: 0; border-radius: 6px; background: transparent; cursor: pointer;
  font: inherit; font-size: 13px; line-height: 1.4; color: var(--muted);
}
.menu .no { font-style: normal; font-size: 10.5px; letter-spacing: .04em; color: var(--hint); font-variant-numeric: tabular-nums; opacity: .7; }
.menu .count { margin-left: 6px; padding: 0 6px; border-radius: 999px; background: rgba(37, 99, 235, .08); font-size: 10.5px; line-height: 16px; color: var(--accent); font-variant-numeric: tabular-nums; opacity: 0; transition: opacity .2s; }   /* 数量紧跟在名字后面（不再贴到目录最右侧） */
.menu button::before { content: ""; position: absolute; left: -15px; top: 50%; width: 1.5px; opacity: .75; height: 0; background: var(--accent); transform: translateY(-50%); transition: height .35s cubic-bezier(.22, 1, .36, 1); }
.menu button { color: color-mix(in srgb, var(--ink) calc(var(--k, 0) * 100%), var(--muted)); }            /* 越靠近鼠标，文字越深 */
.menu button.lens-hot, .menu button:hover { color: var(--ink); background: rgba(37, 99, 235, .06); }
.menu button.lens-hot .count { opacity: 1; }                 /* 只在「被放大的那一项」显示数量，和鼠标指向的一致（不用 :hover，放大后的命中区域会错位） */
.menu button.active { color: var(--ink); font-weight: 600; }
.menu button.active::before { height: 16px; }
.menu button::before { left: calc(-15px / var(--s, 1)); }            /* 按钮放大时，左侧指示条保持原位置和粗细 */
.menu button.active .no { color: var(--accent); opacity: 1; }

/* ---------- 内容 ---------- */
.layout { position: relative; z-index: 1; flex: 1 0 auto; width: 100%; max-width: 1476px; margin: 0 auto; padding: 0 32px 40px; display: grid; grid-template-columns: 196px minmax(0, 1fr); gap: 40px; }   /* 目录 + 内容整体居中；内容区宽度与原先一致，仍是每行 4 个卡片 */   /* 内容少时撑开，页脚沉底 */
.content { padding-top: 40px; min-width: 0; }
.status { min-height: 22px; margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.group { margin-bottom: 44px; scroll-margin-top: 20px; }
.group-head { display: flex; align-items: baseline; gap: 14px; margin: 0 0 18px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.group-head .no { font-size: 13px; color: var(--accent); font-weight: 700; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.group-head h2 { margin: 0; font-size: 19px; font-weight: 700; color: var(--ink); letter-spacing: .02em; }
.group-head span.n { margin-left: auto; font-size: 12.5px; color: var(--muted); }
.fold-btn { font: inherit; font-size: 12.5px; color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; }
.fold-btn:hover { text-decoration: underline; }
.fold-btn::after { content: ' ▾'; }
.fold-btn[aria-expanded="true"]::after { content: ' ▴'; }
.card[hidden] { display: none; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }

/* ---------- 卡片 ---------- */
.card {
  position: relative; display: flex; flex-direction: column; padding: 16px 16px 15px;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  transition: border-color .2s, box-shadow .2s, transform .2s;
  animation: fade .4s both;
}
.card:hover { border-color: var(--accent); box-shadow: 0 10px 28px -14px rgba(0, 102, 255, .35); transform: translateY(-2px); }
.main { display: flex; gap: 14px; align-items: flex-start; }
.main::after { content: ""; position: absolute; inset: 0; border-radius: 10px; }
.icon {
  flex: none; width: 48px; height: 48px; border-radius: 12px; overflow: hidden;
  display: grid; place-items: center; background: var(--paper); border: 1px solid var(--line);
}
.icon img { width: 100%; height: 100%; object-fit: contain; padding: 7px; display: block; }
.icon.full { border-color: transparent; }
.icon.full img { padding: 0; object-fit: cover; }
.icon.ph { border: 0; color: #fff; font-size: 20px; font-weight: 700; }
.body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.body h3 { margin: 0; font-size: 15.5px; font-weight: 650; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 20px; }
.body p { margin: 0; font-size: 12.8px; color: var(--text-2); line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tags { display: flex; flex-wrap: nowrap; gap: 4px 10px; margin-top: 6px; overflow: hidden; }          /* 标签只占一行，放不下的截掉 */
.tags span { font-size: 11.5px; color: var(--muted); white-space: nowrap; flex: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.tags span::before { content: "#"; margin-right: 1px; color: var(--hint); }
.go { position: absolute; top: 15px; right: 15px; font-size: 14px; color: var(--accent); opacity: 0; transform: translate(-4px, 4px); transition: .2s; }
.card:hover .go { opacity: 1; transform: none; }

.envs { position: relative; z-index: 1; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--line); }
.envs-label { font-size: 12px; color: var(--muted); margin-right: 4px; }
.env {
  display: inline-flex; align-items: center; gap: 6px; padding: 1px 9px; font-size: 12px; line-height: 1.8;
  border: 1px solid var(--line-2); border-radius: 6px; background: #fff; color: var(--text); transition: .15s;
}
.env i { width: 6px; height: 6px; border-radius: 50%; background: var(--c, #aaa59a); }
.env:hover { border-color: var(--accent); background: var(--accent); color: #fff; }
.env:hover i { background: #fff; }

.empty { text-align: center; padding: 96px 0; color: var(--muted); }
.empty b { display: block; font-size: 17px; color: var(--ink); margin-bottom: 6px; }
.footer {
  position: relative; z-index: 1; flex: none; display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap;
  padding: 16px; font-size: 12.5px; color: var(--muted); letter-spacing: .04em;
  background: #fff; border-top: 1px solid var(--line);
}
.footer-logo { height: 26px; width: auto; display: block; opacity: .9; }
.footer-logo + div { padding-left: 14px; border-left: 1px solid var(--line); line-height: 1.2; }
.footer-beian { color: inherit; transition: color .2s; }
.footer-beian:hover { color: var(--accent); }

@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

@media (max-width: 880px) {
  .hero-inner, .layout { padding-left: 16px; padding-right: 16px; }
  .hero h1 { font-size: 34px; }
  .hero-body { padding: 36px 0 56px; }
  .content { padding-top: 28px; }
  .grid { grid-template-columns: 1fr; }
}

@media (max-width: 1520px) {   /* 放不下目录时，退化为顶部横条 */
  .layout { display: block; max-width: 1240px; }
  .side { position: sticky; top: 0; z-index: 20; margin: 0 -32px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
  .menu { position: static; transform: none; width: auto; pointer-events: auto; max-height: none; flex-direction: row; gap: 22px; padding: 0 32px; border: 0; background: none; overflow-x: auto; }
  .menu::before, .menu .no, .menu button::before { display: none; }
  .menu .count { opacity: 1; }
  .menu button { display: flex; gap: 6px; width: auto; white-space: nowrap; padding: 13px 0; border-radius: 0; border-bottom: 2px solid transparent; background: transparent !important; font-size: 15px; color: var(--text-2); }
  .menu button.active { border-bottom-color: var(--accent); color: var(--accent); }
  .menu button:hover { transform: none; }
  .menu button { scale: 1; }
  .group { scroll-margin-top: 56px; }
}
@media (max-width: 880px) { .side { margin: 0 -16px; } .menu { padding: 0 16px; } }

/* 悬停完整介绍提示 */
.tip { position: fixed; z-index: 999; pointer-events: none; padding: 12px 14px; border-radius: 10px; background: #fff; border: 1px solid var(--line-2); box-shadow: 0 8px 28px rgba(30, 50, 100, .16); opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s; }
.tip.show { opacity: 1; transform: none; }
.tip b { display: block; font-size: 13.5px; color: var(--ink); margin-bottom: 4px; }
.tip p { margin: 0; font-size: 12.8px; line-height: 1.7; color: var(--text-2); }

.tip::before { content: ''; position: absolute; top: var(--arrow, 24px); width: 10px; height: 10px; margin-top: -5px; background: #fff; transform: rotate(45deg); }
.tip[data-side="right"]::before { left: -6px; border-left: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.tip[data-side="left"]::before { right: -6px; border-right: 1px solid var(--line-2); border-top: 1px solid var(--line-2); }

/* 后台预览模式提示 */
#pvBanner { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 50; padding: 6px 16px; border-radius: 999px; background: rgba(20,24,36,.86); color: #fff; font-size: 12.5px; letter-spacing: .02em; pointer-events: none; box-shadow: 0 6px 20px rgba(0,0,0,.18); }

/* ---------- 页面内编辑（后台「导航配置」嵌入预览，?edit=1）---------- */
.editing .card { cursor: grab; position: relative; }
.editing .card .go { display: none; }
.editing .card .main { cursor: grab; }
.editing .card .ed { position: absolute; top: 8px; right: 8px; display: none; gap: 6px; z-index: 3; }
.editing .card:hover .ed { display: flex; }
.editing .card .ed button, .editing .ed-add { font: inherit; font-size: 12px; line-height: 1; padding: 5px 9px; border-radius: 6px; border: 1px solid var(--line-2, #d9dfec); background: #fff; color: var(--text-2, #4a5163); cursor: pointer; }
.editing .card .ed button:hover, .editing .ed-add:hover { border-color: var(--accent); color: var(--accent); }
.editing .card .ed button[data-act="drop"]:hover { border-color: #f56c6c; color: #f56c6c; }
.editing .ed-add { margin-left: 10px; border-style: dashed; color: var(--accent); }
.editing .group-head .n { margin-left: auto; }
.editing .group-head .ed-add { margin-left: 14px; }
.editing .grid { min-height: 72px; border-radius: 10px; }
.editing .grid:empty { border: 1.5px dashed var(--line-2, #d9dfec); display: flex; align-items: center; justify-content: center; }
.editing .grid:empty::before { content: "这个分组还没有网站：点右上角「添加网站」，或把别的分组里的卡片拖到这里"; color: var(--muted); font-size: 13px; }
.ed-flag { font-style: normal; font-size: 11px; padding: 2px 7px; border-radius: 10px; background: #fdf3e3; color: #c98a1b; align-self: center; }
.editing .card .ed-flag { position: absolute; left: 8px; bottom: 6px; }
.ed-ghost { opacity: .35; }
.ed-chosen { box-shadow: 0 14px 30px -10px rgba(0, 102, 255, .45); }
.editing .card { animation: none !important; }

/* ---------- 猜你喜欢 ---------- */
.suggest { margin-bottom: 44px; }
.suggest .group-head .no { color: #f5a524; }
.why { margin-top: 10px; padding-top: 9px; border-top: 1px dashed var(--line); font-size: 12px; color: var(--muted); display: flex; align-items: baseline; gap: 5px; position: relative; z-index: 1; }
.why i { font-style: normal; color: #f5a524; font-size: 11px; }

/* ---------- 前台原地编辑：工具条 / 分组操作 / 弹窗 ---------- */
#edBar { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 90; display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px); border: 1px solid var(--line-2, #d9dfec); border-radius: 14px; box-shadow: 0 16px 40px -14px rgba(20, 40, 90, .35); max-width: calc(100vw - 24px); }
#edBar b { font-size: 13px; color: var(--accent); white-space: nowrap; }
#edBar select { font: inherit; font-size: 13px; padding: 6px 26px 6px 10px; border: 1px solid var(--line-2, #d9dfec); border-radius: 8px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='%238a93a8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 9px center; -webkit-appearance: none; appearance: none; field-sizing: content; max-width: 220px; }
#edBar .ed-tip { font-size: 12px; color: var(--muted); white-space: nowrap; }
@media (max-width: 900px) { #edBar .ed-tip { display: none; } }
.ed-btn { font: inherit; font-size: 13px; line-height: 1; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line-2, #d9dfec); background: #fff; color: var(--text-2, #4a5163); cursor: pointer; white-space: nowrap; }
.ed-btn:hover { border-color: var(--accent); color: var(--accent); }
.ed-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.ed-btn.primary:hover { filter: brightness(1.08); color: #fff; }
.ed-btn.danger { background: #f56c6c; border-color: #f56c6c; color: #fff; }
.editing .gh-drag { cursor: grab; color: var(--hint, #aab1c3); font-size: 16px; letter-spacing: -1px; user-select: none; align-self: center; margin-right: -4px; }
.editing .gh-ops { display: none; gap: 6px; align-self: center; }
.editing .group-head:hover .gh-ops { display: inline-flex; }
.editing .gh-ops button { font: inherit; font-size: 12px; line-height: 1; padding: 4px 9px; border-radius: 6px; border: 1px solid var(--line-2, #d9dfec); background: #fff; color: var(--text-2, #4a5163); cursor: pointer; }
.editing .gh-ops button:hover { border-color: var(--accent); color: var(--accent); }
.editing .gh-ops button[data-act="g-del"]:hover { border-color: #f56c6c; color: #f56c6c; }
.editing .layout { padding-bottom: 90px; }
#edToast { position: fixed; left: 50%; top: 18px; transform: translate(-50%, -12px); z-index: 120; padding: 9px 16px; border-radius: 10px; background: #1f2a44; color: #fff; font-size: 13px; opacity: 0; pointer-events: none; transition: .25s; }
#edToast.show { opacity: 1; transform: translate(-50%, 0); }
#edToast.bad { background: #d9534f; }
.ed-mask { position: fixed; inset: 0; z-index: 110; background: rgba(20, 30, 55, .42); display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 16px; }
.ed-dlg { width: min(440px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; background: #fff; border-radius: 14px; box-shadow: 0 24px 60px -20px rgba(10, 20, 50, .5); }
.ed-dlg.wide { width: min(640px, 100%); }
.ed-dlg-h { display: flex; align-items: center; padding: 16px 18px 6px; font-size: 16px; font-weight: 700; color: var(--ink); }
.ed-x { margin-left: auto; border: 0; background: none; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; }
.ed-dlg-b { padding: 10px 18px; overflow: auto; }
.ed-dlg-f { display: flex; align-items: center; gap: 10px; padding: 12px 18px 16px; }
.ed-dlg-f .sp { flex: 1; }
.ed-f { display: block; margin-bottom: 12px; }
.ed-f > span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 5px; }
.ed-f input, .ed-f textarea, .ed-search { width: 100%; font: inherit; font-size: 14px; padding: 9px 11px; border: 1px solid var(--line-2, #d9dfec); border-radius: 8px; background: #fff; color: var(--ink); resize: vertical; }
.ed-f input:focus, .ed-f textarea:focus, .ed-search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0, 102, 255, .12); }
.ed-p { margin: 4px 0 8px; font-size: 14px; line-height: 1.6; color: var(--text-2, #4a5163); }
.ed-hint { margin: 0; font-size: 12px; color: var(--muted); }
.ed-err { margin: 8px 0 0; font-size: 13px; color: #d9534f; }
.ed-list { margin-top: 10px; max-height: 46vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.ed-row { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.ed-row:last-child { border-bottom: 0; }
.ed-row:hover { background: #f6f8fd; }
.ed-row .icon { width: 34px; height: 34px; border-radius: 9px; }
.ed-row-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.4; }
.ed-row-t b { font-size: 14px; }
.ed-row-t small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-empty { padding: 26px; text-align: center; color: var(--muted); font-size: 13px; }

/* ---------- 头部皮肤（按部门）：只换配色，画面由 hero.js 在画布上绘制 ---------- */
#heroSub { transition: opacity .35s ease, transform .35s ease; }
#heroSub.swap { opacity: 0; transform: translateY(6px); }

/* 换肤按钮与面板 */
.skin-wrap { position: relative; }
.skin-btn { font: inherit; font-size: 13px; color: var(--muted, #6b7280); background: none; border: 0; border-bottom: 1px solid transparent; cursor: pointer; gap: 6px; }
.skin-btn:hover { color: var(--ink); }
.skin-btn i { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); display: inline-block; }
.skin-pop { position: absolute; right: -8px; top: 30px; z-index: 20; width: max-content; min-width: 214px; padding: 8px; background: rgba(255, 255, 255, .96); border: 1px solid rgba(20, 40, 90, .08); border-radius: 12px; box-shadow: 0 14px 40px rgba(20, 50, 120, .16); backdrop-filter: blur(10px); animation: fade .2s both; }
.skin-pop[hidden] { display: none; }
.skin-pop button { white-space: nowrap; display: flex; align-items: center; gap: 9px; width: 100%; font: inherit; font-size: 13px; color: var(--ink); background: none; border: 0; padding: 7px 8px; border-radius: 8px; cursor: pointer; text-align: left; }
.skin-pop button:hover { background: rgba(0, 0, 0, .04); }
.skin-pop button.on { background: rgba(var(--h-a, 0, 102, 255), .1); font-weight: 600; }
.skin-pop button i { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.skin-pop button em { font-style: normal; font-size: 11.5px; color: #8a90a1; margin-left: auto; padding-left: 14px; }
.skin-pop hr { border: 0; border-top: 1px solid rgba(0, 0, 0, .06); margin: 5px 4px; }
#edBar .ed-btn[hidden] { display: none; }

/* 右上角三个入口（换肤 / 编辑 / 后台管理）统一盒模型，垂直居中对齐 */
.topbar-right { align-items: center; }
.topbar-right .admin-link, .topbar-right .skin-btn { display: inline-flex; align-items: center; box-sizing: border-box; height: 30px; padding: 0 2px; line-height: 1; margin: 0; vertical-align: middle; }
.topbar-right .admin-link[hidden] { display: none; }
.skin-wrap { display: flex; align-items: center; }

/* 换肤菜单皮肤多了：两列排布，避免被头部裁切；窄屏单列可滚动 */
.skin-pop { min-width: 232px; }
.skin-pop button { padding: 6px 8px; }
.skin-pop button em { font-size: 11px; }

.menu button.sg .no { color: #f59e0b; font-style: normal; }

/* ---- 右上角整理：团队切换（自绘下拉）| 换肤 | 编辑 | 用户菜单（后台管理 / 退出收进去） ---- */
.topbar-right { gap: 14px; }
.who { gap: 0; }
.dd, .userbox { position: relative; }
.userbox[hidden] { display: none; }
.dd-btn, .ub-btn { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); background: rgba(255, 255, 255, .72); border: 1px solid rgba(20, 40, 90, .1); border-radius: 999px; cursor: pointer; backdrop-filter: blur(6px); transition: border-color .2s, box-shadow .2s, background .2s; }
.dd-btn:hover, .ub-btn:hover, .dd-btn[aria-expanded="true"], .ub-btn[aria-expanded="true"] { border-color: rgba(var(--h-a, 0, 102, 255), .55); background: #fff; box-shadow: 0 2px 10px rgba(20, 50, 120, .1); }
.dd-ico { color: var(--accent); flex: none; }
.dd-caret { color: #8a90a1; flex: none; transition: transform .2s; }
[aria-expanded="true"] > .dd-caret { transform: rotate(180deg); }
.dd-btn span { max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ub-btn { padding: 0 10px 0 4px; font-weight: 500; }
.ub-av { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; background: var(--accent); }
.dd-pop { position: absolute; top: 38px; left: 0; z-index: 30; min-width: 100%; width: max-content; max-width: 260px; padding: 6px; background: rgba(255, 255, 255, .97); border: 1px solid rgba(20, 40, 90, .08); border-radius: 12px; box-shadow: 0 14px 40px rgba(20, 50, 120, .16); backdrop-filter: blur(10px); animation: fade .18s both; }
.dd-pop[hidden] { display: none; }
.ub-pop { left: auto; right: 0; min-width: 130px; }
.dd-pop > button { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; padding: 8px 10px; font: inherit; font-size: 13px; color: var(--ink); background: none; border: 0; border-radius: 8px; cursor: pointer; text-align: left; }
.dd-pop > button:hover { background: rgba(0, 0, 0, .04); }
.dd-pop > button.on { color: var(--accent); font-weight: 600; background: rgba(var(--h-a, 0, 102, 255), .08); }
.dd-pop > button svg { opacity: 0; flex: none; } .dd-pop > button.on svg { opacity: 1; }
.ub-item, .ub-pop .admin-link { display: block; box-sizing: border-box; width: 100%; height: auto; padding: 8px 10px; font-size: 13px; color: var(--ink); border: 0; border-radius: 8px; text-align: left; }
.ub-item:hover, .ub-pop .admin-link:hover { background: rgba(0, 0, 0, .04); color: var(--ink); }
.ub-pop .admin-link[hidden] { display: none; }
.ub-slot:empty, .ub-slot:not(:has(.admin-link:not([hidden]))) { display: none; }
.who-team { display: inline-flex; align-items: center; gap: 6px; }
/* 「编辑」做成醒目的小按钮，与换肤拉开层次 */
.topbar-right #editLink { height: 32px; padding: 0 14px; border: 1px solid rgba(var(--h-a, 0, 102, 255), .35); border-radius: 999px; background: rgba(var(--h-a, 0, 102, 255), .08); font-weight: 600; }
.topbar-right #editLink:hover { background: rgba(var(--h-a, 0, 102, 255), .16); border-color: rgba(var(--h-a, 0, 102, 255), .6); color: var(--accent); }
.topbar-right .skin-btn { height: 32px; padding: 0 4px; }
@media (max-width: 640px) { .topbar-right { gap: 8px; } .ub-btn .who-name { display: none; } .ub-btn { padding: 0 8px 0 4px; } .dd-btn span { max-width: 5em; } }

/* ---- 右上角再整理：团队切换 + 编辑 放左边（Logo 旁），换肤（带图标）/ 用户在右边；所有按钮默认无边框无底色，鼠标移入才显示 ---- */
.topbar-l { display: flex; align-items: center; gap: 22px; min-width: 0; }
.topbar-left { display: flex; align-items: center; gap: 6px; }
.topbar-left .who { gap: 0; }
.dd-btn, .ub-btn, .topbar #editLink, .topbar .skin-btn { background: transparent; border: 1px solid transparent; box-shadow: none; backdrop-filter: none; font-weight: 500; transition: background .18s, border-color .18s, box-shadow .18s, color .18s; }
.dd-btn:hover, .ub-btn:hover, .dd-btn[aria-expanded="true"], .ub-btn[aria-expanded="true"],
.topbar #editLink:hover, .topbar .skin-btn:hover { background: rgba(128, 128, 128, .13); border-color: rgba(128, 128, 128, .34); box-shadow: 0 2px 10px rgba(20, 50, 120, .08); }
.topbar #editLink { display: inline-flex; align-items: center; box-sizing: border-box; height: 32px; padding: 0 12px; border-radius: 999px; color: var(--accent); font-weight: 600; }
.topbar #editLink:hover { color: var(--accent); }
.topbar .skin-btn { display: inline-flex; align-items: center; gap: 6px; box-sizing: border-box; height: 32px; padding: 0 12px; border-radius: 999px; }
.sk-ico { flex: none; color: var(--accent); }
.dd-pop, .dd-pop > button, .ub-item, .ub-pop .admin-link { color: #14213d; }
@media (max-width: 760px) { .topbar-l { gap: 8px; } .brand span { display: none; } .dd-btn span { max-width: 5em; } }

/* 空团队缺省页：隐藏左侧目录占位，整页居中，用吉祥物小驹 */
.layout.layout-empty { grid-template-columns: minmax(0, 1fr); }
.layout.layout-empty .side { display: none; }
.empty-team { display: flex; flex-direction: column; align-items: center; padding: 56px 0 72px; }
.empty-team img { width: 230px; max-width: 60vw; height: auto; margin-bottom: 14px; filter: drop-shadow(0 14px 16px rgba(0, 60, 160, .18)); animation: em-float 4.2s ease-in-out infinite; user-select: none; }
.empty-team b { font-size: 19px; margin-bottom: 8px; }
.empty-team span { font-size: 14px; color: var(--muted); }
@keyframes em-float { 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .empty-team img { animation: none; } }

/* ---- 顶栏与下方内容区左右对齐（内容区最大 1476px）；顶部操作区默认隐藏，鼠标移入顶栏才显示 ---- */
.topbar { box-sizing: border-box; width: min(1476px, 100vw); margin-left: 50%; transform: translateX(-50%); padding: 0 32px; }
@media (max-width: 1100px) { .topbar { padding: 0 16px; } }
.topbar-left, .topbar-right { opacity: 0; transition: opacity .22s ease; }
.topbar:hover .topbar-left, .topbar:hover .topbar-right, .topbar:focus-within .topbar-left, .topbar:focus-within .topbar-right,
.topbar:has([aria-expanded="true"]) .topbar-left, .topbar:has([aria-expanded="true"]) .topbar-right, .topbar:has(.skin-pop:not([hidden])) .topbar-right { opacity: 1; }
@media (hover: none) { .topbar-left, .topbar-right { opacity: 1; } }
/* 空团队缺省页：去掉按钮；此时隐藏头部小驹，避免同屏两只大图 */
.hero.team-empty .bd-m, .hero.team-empty .bd-sp { display: none; }
/* 与「白驹科技」文字垂直对齐：品牌文字为光学对齐下移了 4px，左侧按钮组同步下移 */
.topbar-left { position: relative; top: 4px; }
/* 手机：品牌文字已隐藏，不需要下移；前台不提供编辑；左右按钮统一高度、垂直居中 */
@media (max-width: 760px) { .topbar-left { top: 0; } #editLink { display: none !important; } .topbar-l, .topbar-left, .topbar-right { align-items: center; } .topbar-right { gap: 6px; } }
/* ---- 层级整理：头部下拉（团队 / 换肤 / 用户）要盖住头部装饰、标题、搜索框和下方内容，且不被头部裁掉 ---- */
.hero { z-index: 2; overflow-x: clip; overflow-y: visible; clip-path: inset(0 0 -800px 0); }   /* 只裁左右和上方（光晕），向下不裁，下拉可以伸出头部 */
.topbar { position: relative; z-index: 40; }
.hero-inner { z-index: auto; }   /* 不再单独成层，让顶栏（z-index 40）能盖过 z-index 2 的头部装饰卡片 */

.ub-login { display: inline-flex; align-items: center; height: 30px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(var(--h-a, 0, 102, 255), .35); color: var(--accent); font-size: 13px; font-weight: 600; background: rgba(255, 255, 255, .7); transition: .2s; }
.ub-login:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.quick { overflow: hidden; padding: 8px 10px 14px; margin: 10px auto -4px; }   /* overflow 要留着裁掉过长的胶囊；上下留白给悬停上移和光晕，不被裁掉 */ .qk { flex: 0 1 auto; min-width: 0; } .qk-l { flex: none; white-space: nowrap; }
@media (max-width: 640px) { .qk-l { display: none; } .qk { max-width: none; flex: 1 1 0; } }   /* 手机上不换行：标签隐藏，三个入口平分一行 */

.footer-admin { display: block; margin-top: 8px; font-size: 12px; color: var(--hint); opacity: .7; transition: .2s; } .footer-admin:hover { opacity: 1; color: var(--accent); }   /* 超管用账号密码登录后台的入口（前台只有飞书登录）；团队管理员可用飞书登录 */

/* 首次来访：邀请登录 */
.li-mask { position: fixed; inset: 0; z-index: 3000; background: rgba(15, 23, 42, .38); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 16px; }
.li-card { width: 100%; max-width: 420px; background: #fff; border-radius: 16px; padding: 26px 26px 22px; box-shadow: 0 20px 60px rgba(15, 23, 42, .25); color: #1f2a44; }
.li-card h3 { margin: 0 0 10px; font-size: 20px; }
.li-why { margin: 0 0 12px; font-size: 14px; line-height: 1.7; }
.li-skip { font-size: 13px; line-height: 1.7; color: #5b6578; background: #f4f6fb; border-radius: 10px; padding: 10px 12px; }
.li-act { display: flex; gap: 10px; margin-top: 18px; }
.li-go { flex: 1; text-align: center; background: #1a64ff; color: #fff; border-radius: 10px; padding: 10px 0; font-size: 14px; text-decoration: none; }
.li-no { flex: 1; background: #fff; border: 1px solid #d5dbe8; color: #5b6578; border-radius: 10px; padding: 10px 0; font-size: 14px; cursor: pointer; }
