/* ==========================================================================
   NCP服务器 · 组件样式
   ========================================================================== */

/* ------------------------------------------------------------ 导航栏 */
/* 顶栏固定在顶部、永远盖在滚动内容上：这里用 backdrop-filter 会让浏览器每帧
   重新采样并模糊整条 1120×54 的背景，滚轮一滚就掉帧。改成高不透明度的纯色，
   视觉差别很小，滚动立刻顺滑。 */
.nav {
  position: sticky; top: 0; z-index: 60;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  border-bottom: 1px solid var(--line);
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), height 0.4s var(--spring);
}
.nav.is-scrolled { box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06); }
.nav-inner {
  max-width: var(--page-max); margin: 0 auto; height: 100%;
  padding: 0 22px; display: flex; align-items: center; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; letter-spacing: -0.02em; color: var(--text); }
.brand .logo {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 16px rgba(0, 113, 227, 0.32);
  transition: transform 0.5s var(--spring);
}
.brand:hover .logo { transform: rotate(-6deg) scale(1.06); }
.brand .logo svg { width: 17px; height: 17px; }
.brand .name { font-size: 16px; }
.brand .ver { font-size: 10px; color: var(--text-3); border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px; }

.nav-links { display: flex; align-items: center; gap: 2px; margin-left: 14px; }
.nav-link {
  position: relative; padding: 7px 12px; border-radius: 10px; font-size: 14px;
  color: var(--text-2); font-weight: 500; transition: color 0.24s var(--ease), background 0.24s var(--ease);
}
.nav-link:hover { color: var(--text); background: var(--surface-hover); }
.nav-link.active { color: var(--text); font-weight: 620; }
.nav-link.active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 1px; height: 2px;
  border-radius: 2px; background: var(--accent);
  animation: fadeIn 0.3s var(--ease) both;
}
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  color: var(--text-2); background: transparent; position: relative;
  transition: background 0.24s var(--ease), color 0.24s var(--ease), transform 0.24s var(--spring);
}
.icon-btn:hover { background: var(--surface-hover); color: var(--text); transform: translateY(-1px); }
.icon-btn svg { width: 18px; height: 18px; }
.menu-toggle { display: none; }

/* ------------------------------------------------------------ 通知中心 */
.notify-toggle { position: relative; }
.notify-badge {
  position: absolute; top: 0; right: -2px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 9px; background: var(--red); color: #fff; font-size: 10px; font-weight: 650;
  line-height: 16px; text-align: center; box-shadow: 0 0 0 2px var(--bg);
}
.notify-panel {
  position: fixed; z-index: 70; top: calc(var(--nav-h) + 8px);
  right: max(16px, calc((100vw - var(--page-max)) / 2 + 10px));
  width: min(368px, calc(100vw - 32px));
  max-height: min(70vh, 480px);
  display: flex; flex-direction: column;
  background: var(--surface-solid); border: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: var(--shadow-2); overflow: hidden;
  animation: notifyIn 0.2s var(--spring) both;
}
.notify-panel[hidden] { display: none; }
@keyframes notifyIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.notify-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px; border-bottom: 1px solid var(--line);
}
.notify-head b { font-size: 14px; }
.notify-head .tiny { border: 0; background: none; color: var(--accent); padding: 4px 6px; }
.notify-head .tiny[disabled] { color: var(--text-3); cursor: default; }
.notify-body { overflow: auto; padding: 6px; }
.notify-item {
  display: flex; gap: 10px; width: 100%; text-align: left; padding: 10px;
  border-radius: 10px; background: none; color: inherit; cursor: pointer;
}
.notify-item:hover { background: var(--surface-hover); }
.notify-item .ni {
  width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center;
  background: var(--accent-soft); flex: none; font-size: 14px;
}
.notify-item .nt { display: block; font-size: 13.5px; font-weight: 560; }
.notify-item .nb { display: block; font-size: 12.5px; color: var(--text-2); margin-top: 2px; line-height: 1.55; }
.notify-item .nm { display: block; font-size: 11px; color: var(--text-3); margin-top: 4px; }
.notify-item .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; margin-top: 7px; }
.notify-item.is-unread { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.notify-empty {
  padding: 30px 18px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-align: center; color: var(--text-2); font-size: 13px;
}
.notify-empty b { color: var(--text); }
.notify-empty span { font-size: 12.5px; max-width: 260px; line-height: 1.6; }
.nav-drawer {
  position: fixed; top: var(--nav-h); left: 0; right: 0; z-index: 59;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--line); padding: 10px 18px 18px;
  animation: drawerIn 0.34s var(--spring) both;
}
.nav-drawer a {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 12px;
  color: var(--text); font-size: 15px; opacity: 0;
  animation: fadeLeft 0.42s var(--spring) both; animation-delay: calc(var(--i, 0) * 34ms);
}
.nav-drawer a:hover { background: var(--surface-hover); }
.nav-drawer a.active { background: var(--accent-soft); color: var(--accent); }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .menu-toggle { display: grid; }
}

/* ------------------------------------------------------------ 按钮 */
.btn {
  --btn-bg: var(--surface-solid); --btn-fg: var(--text); --btn-line: var(--line);
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 17px; border-radius: var(--r-pill);
  background: var(--btn-bg); color: var(--btn-fg); border: 1px solid var(--btn-line);
  font-size: 14px; font-weight: 560; letter-spacing: -0.01em; white-space: nowrap;
  position: relative; overflow: hidden;
  transition: transform 0.22s var(--spring), background 0.24s var(--ease), box-shadow 0.3s var(--ease),
    border-color 0.24s var(--ease), opacity 0.2s var(--ease);
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-1); }
.btn:active { transform: translateY(0) scale(0.975); }
.btn svg { width: 16px; height: 16px; }
.btn[disabled], .btn.is-busy { opacity: 0.5; pointer-events: none; }
.btn-primary { --btn-bg: var(--accent); --btn-fg: #fff; --btn-line: transparent; box-shadow: 0 6px 18px rgba(0, 113, 227, 0.28); }
.btn-primary:hover { box-shadow: 0 10px 26px rgba(0, 113, 227, 0.34); }
.btn-tint { --btn-bg: var(--accent-soft); --btn-fg: var(--accent); --btn-line: transparent; }
.btn-ghost { --btn-bg: transparent; --btn-line: var(--line-strong); }
.btn-danger { --btn-bg: var(--red); --btn-fg: #fff; --btn-line: transparent; }
.btn-success { --btn-bg: var(--green); --btn-fg: #fff; --btn-line: transparent; }
.btn-lg { height: 46px; padding: 0 24px; font-size: 15.5px; }
.btn-sm { height: 31px; padding: 0 13px; font-size: 13px; }
.btn-block { width: 100%; }
.btn.is-busy::after {
  content: ""; width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid currentColor; border-top-color: transparent; animation: spin 0.7s linear infinite;
}

/* ------------------------------------------------------------ 卡片 */
.card {
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
  box-shadow: var(--shadow-1);
  position: relative;
  transition: transform 0.42s var(--spring), box-shadow 0.42s var(--spring), border-color 0.3s var(--ease);
}
.card.glass { background: var(--surface); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); }
.card.pad-lg { padding: 30px; }
.card.pad-sm { padding: 16px; }
.card.flat { box-shadow: none; }
.card.clickable { cursor: pointer; }
.card.clickable:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); border-color: var(--line-strong); }
.card.clickable:active { transform: translateY(-1px) scale(0.995); }
.card-title { font-size: 17px; font-weight: 620; letter-spacing: -0.02em; }
.card-sub { font-size: 13px; color: var(--text-2); margin-top: 3px; }
.card-highlight::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 0%), var(--accent-soft), transparent 42%);
  opacity: 0; transition: opacity 0.4s var(--ease);
}
.card-highlight:hover::before { opacity: 1; }

/* 统计块 */
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat .k { font-size: 12.5px; color: var(--text-3); letter-spacing: 0.01em; }
.stat .v { font-size: 30px; font-weight: 650; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat .u { font-size: 13px; font-weight: 500; color: var(--text-2); margin-left: 3px; }
.stat .d { font-size: 12px; color: var(--green); display: flex; align-items: center; gap: 4px; }
.stat .d.down { color: var(--red); }

/* ------------------------------------------------------------ 徽标 / 状态 */
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px;
  border-radius: var(--r-pill); font-size: 12px; font-weight: 560;
  background: var(--surface-hover); color: var(--text-2); border: 1px solid var(--line); white-space: nowrap;
}
.pill.blue { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.pill.green { background: rgba(52, 199, 89, 0.14); color: #1f9c46; border-color: transparent; }
.pill.orange { background: rgba(255, 149, 0, 0.15); color: #c97400; border-color: transparent; }
.pill.red { background: rgba(255, 59, 48, 0.13); color: #d92b21; border-color: transparent; }
.pill.purple { background: rgba(175, 82, 222, 0.14); color: #8f3fc0; border-color: transparent; }
.pill.gray { background: var(--surface-hover); color: var(--text-3); }
html[data-theme="dark"] .pill.green { color: #4cd964; }
html[data-theme="dark"] .pill.orange { color: #ffa83d; }
html[data-theme="dark"] .pill.red { color: #ff6a60; }
html[data-theme="dark"] .pill.purple { color: #c77dff; }

.tag {
  display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 8px;
  font-size: 11.5px; color: var(--text-2); background: var(--surface-hover); border: 1px solid var(--line);
}
.tag.on { color: var(--accent); background: var(--accent-soft); border-color: transparent; }

/* ------------------------------------------------------------ 头像 */
.avatar {
  position: relative; display: inline-grid; place-items: center; flex: none;
  width: 38px; height: 38px; border-radius: 50%; font-size: 17px; overflow: hidden;
  background: var(--surface-hover); border: 1px solid var(--line);
  transition: transform 0.4s var(--spring);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 28px; height: 28px; font-size: 13px; }
.avatar.lg { width: 56px; height: 56px; font-size: 24px; }
.avatar.xl { width: 92px; height: 92px; font-size: 40px; }
.avatar.ring { box-shadow: 0 0 0 2px var(--surface-solid), 0 0 0 4px var(--accent-soft); }
.avatar:hover { transform: scale(1.05) rotate(-2deg); }
.avatar-stack { display: flex; }
.avatar-stack .avatar { margin-left: -10px; border: 2px solid var(--surface-solid); }
.avatar-stack .avatar:first-child { margin-left: 0; }

.user-line { display: flex; align-items: center; gap: 10px; min-width: 0; }
.user-line .nm { font-weight: 580; font-size: 14px; }
.user-line .sb { font-size: 12px; color: var(--text-3); }

/* ------------------------------------------------------------ 表单 */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field > label { font-size: 13px; font-weight: 560; color: var(--text-2); }
.field .hint { font-size: 12px; color: var(--text-3); }
.field .err { font-size: 12.5px; color: var(--red); display: none; }
.field.has-err .err { display: block; animation: fadeDown 0.3s var(--spring) both; }
.field.has-err .input { border-color: var(--red); }

.input, .textarea, .select {
  width: 100%; height: 44px; padding: 0 14px; border-radius: var(--r-sm);
  background: var(--surface-solid); border: 1px solid var(--line);
  font-size: 15px; color: var(--text); outline: none;
  transition: border-color 0.24s var(--ease), box-shadow 0.3s var(--ease), background 0.24s var(--ease);
}
.textarea { height: auto; min-height: 110px; padding: 12px 14px; resize: vertical; line-height: 1.65; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2386868b' d='M1.4 0 6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--accent); box-shadow: var(--glow); }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input[disabled] { opacity: 0.6; }
.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1; }

.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 14px; color: var(--text-2); }
.check input { appearance: none; box-sizing: border-box; width: 20px; height: 20px; flex: none; margin-top: 1px; border-radius: 6px;
  border: 1.5px solid var(--line-strong); background: var(--surface-solid); transition: all 0.22s var(--spring); position: relative; }
.check input:checked { background: var(--accent); border-color: var(--accent); transform: scale(1.04); }
.check input:checked::after {
  content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px; box-sizing: border-box; box-sizing: border-box;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
  animation: none;
}

.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13.5px; color: var(--text-2); }
.switch input { appearance: none; width: 42px; height: 25px; border-radius: 99px; background: var(--line-strong);
  position: relative; transition: background 0.3s var(--ease); flex: none; }
.switch input::after {
  content: ""; position: absolute; top: 2.5px; left: 2.5px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform 0.32s var(--spring);
}
.switch input:checked { background: var(--green); }
.switch input:checked::after { transform: translateX(17px); }

/* 分段控件 */
.segmented {
  display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--r-pill);
  background: var(--surface-hover); border: 1px solid var(--line); position: relative; overflow-x: auto;
  scrollbar-width: none;
}
.segmented::-webkit-scrollbar { display: none; }
.segmented button {
  height: 32px; padding: 0 15px; border-radius: var(--r-pill); font-size: 13.5px; font-weight: 550;
  color: var(--text-2); white-space: nowrap; position: relative; z-index: 1;
  transition: color 0.24s var(--ease), transform 0.3s var(--spring);
}
.segmented button:hover { color: var(--text); }
.segmented button.active { color: var(--text); background: var(--surface-solid); box-shadow: var(--shadow-1); }
.segmented button.active .n { color: var(--accent); }
.segmented .n { font-size: 12px; margin-left: 5px; color: var(--text-3); }

/* ------------------------------------------------------------ 进度 */
.progress { height: 7px; border-radius: 99px; background: var(--surface-hover); overflow: hidden; position: relative; }
.progress > i {
  display: block; height: 100%; width: 0; border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 1.1s var(--spring);
}
.progress.thin { height: 4px; }
.progress.thick { height: 10px; }
.progress.green > i { background: linear-gradient(90deg, #34c759, #30d158); }
.progress.orange > i { background: linear-gradient(90deg, #ff9500, #ffcc00); }
.progress.red > i { background: linear-gradient(90deg, #ff3b30, #ff6961); }
.progress .sweep {
  position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  width: 40%; animation: progressSweep 2.4s var(--ease) infinite;
}

/* 环形进度 */
.ring-wrap { position: relative; display: inline-grid; place-items: center; }
.ring-wrap svg { transform: rotate(-90deg); }
.ring-wrap .ring-bg { stroke: var(--surface-hover); }
.ring-wrap .ring-fg { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset 1.2s var(--spring); }
.ring-wrap .ring-txt { position: absolute; font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; }

/* 迷你条形图 */

/* 折线图 */
.spark { width: 100%; height: 100%; overflow: visible; }
.spark .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: var(--len, 2000); stroke-dashoffset: var(--len, 2000); animation: dash 1.6s var(--spring) forwards; }
.spark .area { fill: url(#sparkGrad); opacity: 0; animation: fadeIn 1s var(--ease) 0.4s forwards; }
.spark .dot { fill: var(--accent); }

/* ------------------------------------------------------------ 列表 */
.list { display: flex; flex-direction: column; }
.list-item {
  display: flex; align-items: center; gap: 13px; padding: 13px 4px; border-bottom: 1px solid var(--line);
  transition: background 0.24s var(--ease), padding 0.3s var(--spring);
}
.list-item:last-child { border-bottom: none; }
.list-item:hover { background: var(--surface-hover); border-radius: 12px; padding-left: 10px; padding-right: 10px; }
.list-item .main { flex: 1; min-width: 0; }
.list-item .t { font-size: 14.5px; font-weight: 560; }
.list-item .s { font-size: 12.5px; color: var(--text-3); }

.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline .tl-item { position: relative; padding: 0 0 20px; }
.timeline .tl-item::before {
  content: ""; position: absolute; left: -24px; top: 5px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--surface-solid); border: 2px solid var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.timeline .tl-item.muted::before { border-color: var(--text-3); box-shadow: none; }
.timeline .tl-item .tt { font-size: 14px; font-weight: 560; }
.timeline .tl-item .td { font-size: 12px; color: var(--text-3); }

/* ------------------------------------------------------------ 表格 */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-3); text-transform: uppercase;
  letter-spacing: 0.06em; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr { transition: background 0.2s var(--ease); }
.table tbody tr:hover { background: var(--surface-hover); }
.table tbody tr:last-child td { border-bottom: none; }

/* ------------------------------------------------------------ 通知 Toast */
#toasts {
  position: fixed; top: 68px; left: 50%; transform: translateX(-50%); z-index: 120;
  display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; width: max-content;
  max-width: min(92vw, 460px);
}
.toast {
  display: flex; align-items: center; gap: 11px; padding: 11px 17px; border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--surface-solid) 88%, transparent);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-2); border: 1px solid var(--line);
  font-size: 14px; font-weight: 520; color: var(--text);
  animation: toastIn 0.46s var(--spring) both; pointer-events: auto;
}
.toast.out { animation: toastOut 0.28s var(--ease-in) both; }
.toast .ic { width: 21px; height: 21px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #fff; font-size: 12px; }
.toast.ok .ic { background: var(--green); }
.toast.err .ic { background: var(--red); }
.toast.info .ic { background: var(--accent); }
.toast.warn .ic { background: var(--orange); }
.toast .txt { min-width: 0; }
.toast .sub { font-size: 12.5px; color: var(--text-3); font-weight: 400; }

/* ------------------------------------------------------------ 模态框 */
.modal-back {
  position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; padding: 22px;
  background: rgba(0, 0, 0, 0.34); backdrop-filter: blur(9px); -webkit-backdrop-filter: blur(9px);
  animation: fadeIn 0.26s var(--ease) both; overflow-y: auto;
}
.modal {
  width: 100%; max-width: 560px; background: var(--surface-solid); border-radius: var(--r-xl);
  box-shadow: var(--shadow-3); border: 1px solid var(--line); overflow: hidden;
  animation: springUp 0.52s var(--spring) both; margin: auto;
}
.modal.wide { max-width: 800px; }
.modal.narrow { max-width: 420px; }
.modal-head { padding: 22px 26px 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.modal-head h3 { font-size: 21px; }
.modal-head .sub { font-size: 13.5px; color: var(--text-2); margin-top: 5px; }
.modal-body { padding: 20px 26px; max-height: min(64vh, 620px); overflow-y: auto; }
.modal-foot { padding: 0 26px 22px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.modal-back.closing { animation: fadeIn 0.22s var(--ease-in) reverse both; }
.modal-back.closing .modal { animation: pageLeave 0.22s var(--ease-in) both; }

/* ------------------------------------------------------------ 空状态 / 加载 */
.empty { text-align: center; padding: 52px 20px; color: var(--text-2); }
.empty .ic { font-size: 42px; margin-bottom: 12px; display: block; animation: floatY 4s var(--ease) infinite; }
.empty .t { font-size: 16px; font-weight: 600; color: var(--text); }
.empty .d { font-size: 13.5px; color: var(--text-3); margin-top: 6px; max-width: 42ch; margin-inline: auto; }

.loading-block { display: grid; place-items: center; padding: 60px; gap: 14px; color: var(--text-3); font-size: 13px; }

/* ------------------------------------------------------------ 页面级区块 */
.hero { padding: 68px 0 26px; position: relative; }
.hero h1 { font-size: clamp(38px, 6.4vw, 74px); letter-spacing: -0.035em; line-height: 1.04; }
.hero .sub { margin-top: 18px; font-size: clamp(16px, 1.7vw, 20px); color: var(--text-2); max-width: 56ch; }
.hero .cta { margin-top: 30px; display: flex; gap: 12px; flex-wrap: wrap; }

.hero-panel {
  border-radius: var(--r-xl); border: 1px solid var(--line); overflow: hidden;
  background: var(--surface-solid); box-shadow: var(--shadow-2);
}
.hero-panel .top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface-hover), transparent);
}

.kv { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.kv:last-child { border-bottom: none; }
.kv .k { font-size: 13px; color: var(--text-3); }
.kv .v { font-size: 14px; font-weight: 560; }

.code-block {
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.7; color: var(--text-2);
  background: var(--surface-hover); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px;
  white-space: pre-wrap; word-break: break-word; max-height: 340px; overflow: auto;
}

.notice {
  display: flex; gap: 11px; align-items: flex-start; padding: 13px 16px; border-radius: var(--r-md);
  background: var(--accent-soft); color: var(--text); font-size: 13.5px; border: 1px solid transparent;
}
.notice.warn { background: rgba(255, 149, 0, 0.13); }
.notice.err { background: rgba(255, 59, 48, 0.11); }
.notice.ok { background: rgba(52, 199, 89, 0.13); }
.notice .ic { flex: none; }

/* 页脚 */
.footer {
  border-top: 1px solid var(--line); padding: 34px 22px 40px; margin-top: 60px;
  color: var(--text-3); font-size: 12.5px;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
}
.footer-inner { max-width: var(--page-max); margin: 0 auto; display: flex; gap: 20px; justify-content: space-between; flex-wrap: wrap; }
.footer a { color: var(--text-2); }
.footer a:hover { color: var(--accent); }
.footer .cols { display: flex; gap: 34px; flex-wrap: wrap; }
.footer .cols > div { display: flex; flex-direction: column; gap: 7px; }
.footer .cols b { color: var(--text-2); font-size: 12.5px; font-weight: 600; }

/* 骨架卡片 */
.sk-card { height: 150px; border-radius: var(--r-lg); }

/* 逐帧像素画布 */


/* 回到顶部 */
.to-top {
  position: fixed; right: 26px; bottom: 26px; z-index: 50;
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, var(--surface-solid) 88%, transparent);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--line); box-shadow: var(--shadow-2); color: var(--text-2);
  opacity: 0; visibility: hidden; transform: translateY(14px) scale(0.9);
  transition: opacity 0.3s var(--ease), transform 0.4s var(--spring), visibility 0.3s, color 0.2s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { color: var(--accent); transform: translateY(-2px); }
.to-top svg { width: 18px; height: 18px; }
@media (max-width: 720px) { .to-top { right: 16px; bottom: 18px; width: 40px; height: 40px; } }
