/* ================= KK Build Dashboard (2026-10-23) ================= */
#root{position:relative;z-index:1}

.kkb-grid{display:grid;column-gap:16px;row-gap:8px;align-items:start;height:100%;min-height:0;overflow:auto;padding:2px 2px 24px}
.kkb-grid.kkb-wide{grid-template-columns:var(--kk-c1,600px) var(--kk-c2,420px) minmax(0,1fr)}
.kkb-grid.kkb-narrow{grid-template-columns:minmax(0,1fr) 360px}
.kkb-dc{display:contents!important}
.kkb-card{background:transparent!important;border:1px solid rgba(94,182,255,.28);border-radius:12px;padding:16px;min-width:0;backdrop-filter:none!important}
.kkb-form{grid-column:2;grid-row:1;max-height:none!important;overflow-y:auto!important;min-height:376px;padding:10px!important}
.kkb-form.space-y-4>*+*{margin-top:6px!important}
.kkb-form input,.kkb-form select{height:28px!important;padding-top:0!important;padding-bottom:0!important;font-size:12px!important}
.kkb-form .grid{gap:6px!important}

.kkb-preview{grid-column:1/span 2;grid-row:2;height:auto!important;min-height:0!important;overflow:visible;background:transparent!important;border:0!important;padding:0!important;box-shadow:none!important;backdrop-filter:none!important}
.kkb-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 0 4px;min-height:30px}
.kkb-toolbar>.kkb-icon-sec,.kkb-toolbar>.kkb-adapt-sec{display:flex;align-items:center;gap:8px;margin:0;min-width:0}
.kkb-toolbar>.kkb-icon-sec>p,.kkb-toolbar>.kkb-adapt-sec>p{display:none!important}
.kkb-toolbar>.kkb-icon-sec>div,.kkb-toolbar>.kkb-adapt-sec>div{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0}
.kkb-toolbar button:not(.relative){height:28px!important;padding:0 8px!important;font-size:12px!important}
.kkb-toolbar .kkb-icon-sec svg{width:14px!important;height:14px!important}
.kkb-preview>div.flex-1{padding-top:0!important;overflow:visible!important}
.kkb-preview>div.pt-1{display:block!important;padding-top:8px!important;position:relative!important;z-index:6!important}
.kkb-preview>div.pt-1 button{position:relative!important;z-index:7!important}
.kkb-preview>p{display:none!important}
html[data-kk-theme="dark"] .kkb-preview .bg-white{background:#fff!important}
.kkb-cdn{grid-column:1;grid-row:1}
.kkb-cdn{min-height:376px;padding:14px}
.kkb-cdn .kkb-bd{gap:4px;flex:none;justify-content:flex-start}
.kkb-auto{min-height:162px}
.kkb-cdn .kkb-grid2{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:4px}
.kkb-cdn .kkb-field{gap:2px}
.kkb-cdn .kkb-field label{font-size:14px;line-height:20px}
.kkb-cdn .kkb-field input,.kkb-cdn .kkb-field select{height:40px!important;padding:8px 10px!important;font-size:14px!important}
.kkb-cdn .kkb-actions{margin-top:2px;justify-content:center;gap:10px}

.kkb-auto{grid-column:1;grid-row:3}
.kkb-history{grid-column:3;grid-row:1/span 2;min-height:0;max-height:calc(100vh - 120px);overflow:hidden}
.kkb-grid.kkb-wide .kkb-history{height:auto!important;max-height:calc(100vh - 120px)!important;align-self:start!important;overflow:hidden!important}
.kkb-rail{display:flex;flex-direction:column;gap:16px;min-width:0}

.kkb-panel{background:transparent!important;border:1px solid rgba(94,182,255,.28);border-radius:12px;padding:8px 10px;display:flex;flex-direction:column;gap:6px;min-width:0;color:#c9d1d9;font:13px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;backdrop-filter:none!important}
.kkb-panel.in-rail{width:100%}
.kkb-hd{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.kkb-hd b{color:#e6edf3;font-size:12px}
.kkb-hd-r{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.kkb-bd{display:flex;flex-direction:column;gap:8px;min-height:0}
.kkb-panel{padding:8px 10px;gap:6px}
.kkb-bd{gap:2px}
.kkb-field{gap:0}
.kkb-field input,.kkb-field select{height:24px!important;padding:1px 6px!important;font-size:11px!important}

.kkb-field{display:flex;flex-direction:column;gap:0}
.kkb-field label{color:#8b949e;font-size:10px;line-height:1.1}
.kkb-field input,.kkb-field select{background:#0d1117;border:1px solid #30363d;border-radius:6px;color:#e6edf3;padding:1px 6px;font-size:11px;outline:none;min-width:0;height:24px!important}
.kkb-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:2px}
.kkb-btn{cursor:pointer;border:1px solid #30363d;background:#21262d;color:#c9d1d9;border-radius:8px;padding:5px 10px;font-size:12px;line-height:1.2}
.kkb-btn:hover{background:#30363d;color:#e6edf3}
.kkb-btn.primary{background:#1f6feb;border-color:#1f6feb;color:#fff}
.kkb-btn.primary:hover{background:#2a7bf0}
.kkb-btn.danger{background:rgba(248,81,73,.1);border-color:rgba(248,81,73,.25);color:#f85149}
.kkb-btn.danger:hover{background:rgba(248,81,73,.2)}
.kkb-btn.xs{padding:3px 8px;font-size:11px}
.kkb-pill{font-size:11px;padding:1px 8px;border-radius:999px;border:1px solid #30363d;color:#8b949e}
.kkb-pill.on{color:#3fb950;border-color:rgba(63,185,80,.35);background:rgba(63,185,80,.1)}
.kkb-msg{font-size:11px;color:#8b949e}
.kkb-row{display:flex;align-items:center;gap:8px}
.kkb-sub{color:#8b949e;font-size:12px}
.kkb-grow{flex:1;min-width:0;color:#e6edf3}
.kkb-num{width:84px;background:#0d1117;border:1px solid #30363d;border-radius:8px;color:#e6edf3;padding:4px 8px;font-size:12px}
.kkb-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px;flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;align-content:start;padding-right:2px}
.kkb-empty{color:#8b949e;font-size:12px;padding:10px 0}
.kkb-hcard{border:1px solid #21262d;background:rgba(13,20,32,.38);border-radius:10px;padding:10px;display:flex;flex-direction:column;gap:6px;min-width:0}
.kkb-hcard:hover{border-color:rgba(94,182,255,.35)}
.kkb-card-top{display:flex!important;align-items:center!important;gap:10px!important;justify-content:flex-start!important}
.kkb-top-meta{flex:1 1 auto;min-width:0}
.kkb-card-top>.kkb-badge{flex:none;margin-left:auto}
.kkb-ico{width:34px;height:34px;border-radius:8px;background:#161b22;display:flex;align-items:center;justify-content:center;overflow:hidden;color:#8b949e;font-weight:700}
.kkb-ico img{width:100%;height:100%;object-fit:cover}
.kkb-badge{font-size:11px;padding:1px 6px;border-radius:5px;border:1px solid transparent}
.kkb-badge.done{color:#3fb950;background:rgba(63,185,80,.1);border-color:rgba(63,185,80,.25)}
.kkb-badge.building{color:#fb923c;background:rgba(251,146,60,.1);border-color:rgba(251,146,60,.25)}
.kkb-badge.pending{color:#8b949e;background:rgba(139,148,158,.1);border-color:rgba(139,148,158,.25)}
.kkb-badge.failed{color:#f85149;background:rgba(248,81,73,.1);border-color:rgba(248,81,73,.25)}
.kkb-pkg{color:#e6edf3;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.kkb-meta{color:#8b949e;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.kkb-card-acts{display:grid!important;gap:6px!important;min-width:0}
.kkb-card-acts.cols2{grid-template-columns:repeat(2,minmax(0,1fr))!important}
.kkb-card-acts.cols3{grid-template-columns:repeat(3,minmax(0,1fr))!important}
.kkb-card-acts>.kkb-btn{width:100%!important;justify-content:center!important;white-space:nowrap}
.kkb-mask{position:fixed;inset:0;background:rgba(0,0,0,.55);z-index:100000;display:flex;align-items:center;justify-content:center}
.kkb-modal{width:min(680px,92vw);max-height:80vh;overflow:auto;background:#0d1522;border:1px solid #30363d;border-radius:12px;color:#c9d1d9;box-shadow:0 20px 60px rgba(0,0,0,.5)}
.kkb-modal-hd{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid #21262d;color:#e6edf3}
.kkb-modal-bd{padding:14px 16px;display:flex;flex-direction:column;gap:10px}
.kkb-x{cursor:pointer;background:transparent;border:0;color:#8b949e;font-size:16px}
.kkb-pre{white-space:pre-wrap;word-break:break-all;background:#0a101c;border:1px solid #21262d;border-radius:8px;padding:10px;font:12px/1.5 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:#c9d1d9;max-height:50vh;overflow:auto}
.kkb-log{border-bottom:1px solid #161b22;padding-bottom:8px}
.kkb-qr{text-align:center}
.kkb-qr img{max-width:260px;width:100%;border-radius:8px;background:#fff;padding:8px}

/* 白色主题适配 */
html[data-kk-theme="white"] .kkb-card,
html[data-kk-theme="white"] .kkb-panel,
html[data-kk-theme="white"] .kkb-hcard{background:rgba(255,255,255,.92);border-color:#d0d7de;color:#1f2328}
html[data-kk-theme="white"] .kkb-hd b,
html[data-kk-theme="white"] .kkb-pkg,
html[data-kk-theme="white"] .kkb-grow{color:#1f2328}
html[data-kk-theme="white"] .kkb-field label,
html[data-kk-theme="white"] .kkb-sub,
html[data-kk-theme="white"] .kkb-meta,
html[data-kk-theme="white"] .kkb-msg{color:#57606a}
html[data-kk-theme="white"] .kkb-field input,
html[data-kk-theme="white"] .kkb-field select,
html[data-kk-theme="white"] .kkb-num{background:#fff;border-color:#d0d7de;color:#1f2328}
html[data-kk-theme="white"] .kkb-btn{background:#f6f8fa;border-color:#d0d7de;color:#1f2328}
html[data-kk-theme="white"] .kkb-btn:hover{background:#eef1f4}
html[data-kk-theme="white"] .kkb-btn.primary{background:#1f6feb;border-color:#1f6feb;color:#fff}
html[data-kk-theme="white"] .kkb-hcard{border-color:#e1e4e8}
html[data-kk-theme="white"] .kkb-ico{background:#f6f8fa}
html[data-kk-theme="white"] .kkb-pill{border-color:#d0d7de;color:#57606a}
html[data-kk-theme="white"] .kkb-modal{background:#fff;border-color:#d0d7de;color:#1f2328}
html[data-kk-theme="white"] .kkb-modal-hd{color:#1f2328;border-color:#eaeef2}
html[data-kk-theme="white"] .kkb-pre{background:#f6f8fa;border-color:#e1e4e8;color:#1f2328}

/* 登录页：参考服星空风格（移除 KK 大图） */
.login-split{background-color:transparent!important;background-image:none!important}
.min-h-screen:has(.login-split){background:transparent!important}
.login-split > div:last-child{background:linear-gradient(90deg,transparent,rgba(8,20,48,.35) 18%,rgba(6,16,40,.72) 42%)!important}
html[data-kk-theme="white"] .login-split{background-color:#f3f6fb!important}
html[data-kk-theme="white"] .min-h-screen:has(.login-split){background:#f3f6fb!important}
html[data-kk-theme="white"] .login-split > div:last-child{background:linear-gradient(90deg,transparent,rgba(255,255,255,.55) 18%,rgba(255,255,255,.92) 42%)!important}

/* APK构建页：模块只用主背景，不要单独黑底 */
html[data-kk-theme="dark"] .kkb-grid .bg-\[\#161b22\]{background-color:transparent!important}

.kkb-hotmin{color:#5eb6ff!important;border-color:rgba(94,182,255,.35)!important}

.kkb-hint{color:#8b949e;font-size:12px;line-height:1.4;margin:2px 0 0}
.kkb-cdn .kkb-actions .kkb-btn{display:inline-flex;align-items:center;gap:5px}

/* 用户真实视口 2658×1437 / DPR 0.75：按参考服同尺寸 */
@media (min-width: 2000px) {
  .kkb-grid { row-gap: 16px; padding-top: 16px; padding-left: 16px; }
  .kkb-cdn { min-height: 428px; padding: 16px; }
  .kkb-cdn .kkb-bd { gap: 8px; flex: none; justify-content: flex-start; }
  .kkb-cdn .kkb-grid2 { gap: 8px; }
  .kkb-cdn .kkb-field { gap: 4px; }
  .kkb-cdn .kkb-field input, .kkb-cdn .kkb-field select { height: 44px !important; padding: 10px 12px !important; }
  .kkb-form { min-height: 388px; }
  .kkb-toolbar { min-height: 40px; margin-bottom: 31px; }
  .kkb-toolbar button:not(.relative) { height: 40px !important; padding: 0 10px !important; font-size: 14px !important; }
  .kkb-toolbar .kkb-icon-sec svg { width: 16px !important; height: 16px !important; }
  .kkb-toolbar .kkb-adapt-sec, .kkb-toolbar .kkb-adapt-sec span { font-size: 14px !important; }

}

/* 高频定时弹窗：对齐参考服 .kk-modal */
.kkb-modal-hot{width:560px!important;max-width:92vw!important;min-height:188px;max-height:none!important;overflow:visible!important;background:rgba(6,16,36,.94)!important;border:1px solid #30363d!important;border-radius:12px!important;padding:18px!important}
.kkb-modal-hot .kkb-modal-hd{padding:0!important;border:0!important;margin:0 0 2px!important}
.kkb-modal-hot .kkb-modal-hd b{font-size:16px;line-height:1.2;color:#e6edf3}
.kkb-modal-hot .kkb-x{display:none!important}
.kkb-modal-hot .kkb-modal-bd{padding:0!important;gap:8px!important;overflow:visible!important}
.kkb-modal-hot .kkb-desc{color:#8b949e;font-size:12px;line-height:1.4;margin:0}
.kkb-modal-hot .kkb-hm-label{display:block;color:#c9d1d9;font-size:13px;margin-top:6px}
.kkb-modal-hot .kkb-num{width:96px!important;height:32px!important;padding:5px 8px!important;font-size:13px!important;background:#0d1117!important;border:1px solid #30363d!important;border-radius:8px!important;color:#e6edf3}
.kkb-modal-hot .kkb-actions{justify-content:flex-end!important;gap:8px!important;margin-top:12px}
.kkb-modal-hot .kkb-btn{height:26px!important;padding:0 10px!important;font-size:12px!important;line-height:24px}
.kkb-modal-hot .kkb-btn.hot-save{background:#da3633!important;border-color:#da3633!important;color:#fff!important}
.kkb-modal-hot .kkb-btn.hot-save:hover{background:#e04845!important}
.kkb-modal-hot .kkb-msg{font-size:11px;color:#f85149;margin-right:auto}

/* 基础配置头部：包类型/单包/双包同一行 */
.kkb-form-hd{display:flex!important;align-items:center!important;gap:8px!important;justify-content:flex-start!important;min-height:30px}
.kkb-form-hd>p:first-child{margin-right:auto!important;margin-bottom:0!important;font-size:16px!important;line-height:1.2}
.kkb-form-hd .kkb-pkg-sec{display:flex!important;align-items:center!important;gap:6px!important;margin:0!important;min-width:0}
.kkb-form-hd .kkb-pkg-sec>p{margin:0!important;font-size:12px!important;color:#8b949e!important;white-space:nowrap}
.kkb-form-hd .kkb-pkg-sec>div{display:flex!important;align-items:center!important;gap:6px!important;flex-wrap:nowrap!important;margin:0!important}
.kkb-form-hd .kkb-pkg-sec button{height:28px!important;padding:0 10px!important;font-size:12px!important}
.kkb-form-hd>button{flex:none!important}

/* 基础配置头部：纯 CSS 网格，不搬 React 节点 */
.kkb-form{display:grid!important;grid-template-columns:minmax(0,1fr) auto auto;column-gap:8px;row-gap:6px;align-items:start}
.kkb-form>*{margin-top:0!important;grid-column:1/-1}
.kkb-form>:nth-child(1){display:contents!important}
.kkb-form>:nth-child(1)>p{grid-column:1;grid-row:1;margin:0!important;font-size:16px!important;line-height:1.2;align-self:center}
.kkb-form>:nth-child(1)>button{grid-column:3;grid-row:1;justify-self:end;align-self:center}
.kkb-form>:nth-child(2){grid-column:2;grid-row:1;display:flex!important;align-items:center!important;gap:6px!important;justify-self:end;margin:0!important}
.kkb-form>:nth-child(2)>p{margin:0!important;font-size:12px!important;color:#8b949e!important;white-space:nowrap}
.kkb-form>:nth-child(2)>div{display:flex!important;align-items:center!important;gap:6px!important;flex-wrap:nowrap!important;margin:0!important}
.kkb-form>:nth-child(2) button{height:28px!important;padding:0 10px!important;font-size:12px!important}

.kkb-prog{display:flex;align-items:center;gap:6px;font-size:11px;color:#8b949e}
.kkb-prog .kkb-bar{flex:1;height:6px;background:#30363d;border-radius:99px;overflow:hidden}
.kkb-prog .kkb-bar i{display:block;height:100%;background:linear-gradient(90deg,#1f6feb,#3fb950)}

/* ── 暗色主题：输入面统一为参考机的半透明深蓝，替代 codex 写死的纯黑 #0d1117 ──
   参考机实测取色 (9,20,41)/(8,19,38)，来自 kk-theme.css 的
   background-image: linear-gradient(180deg, rgba(14,36,78,.46), rgba(6,16,40,.22))
   这里把 CDN / 基础配置 / 数值输入一并补齐，白主题仍走上面的 #fff 规则。 */
html[data-kk-theme="dark"] .kkb-field input,
html[data-kk-theme="dark"] .kkb-field select,
html[data-kk-theme="dark"] .kkb-field textarea,
html[data-kk-theme="dark"] .kkb-num {
  background-color: transparent !important;
  background-image: linear-gradient(180deg, rgba(14, 36, 78, 0.46), rgba(6, 16, 40, 0.22)) !important;
  box-shadow: inset 0 1px 0 rgba(180, 220, 255, 0.10);
  border-color: #30363d;
  color: #e6edf3;
}
html[data-kk-theme="dark"] .kkb-field input:focus,
html[data-kk-theme="dark"] .kkb-field select:focus {
  background-image: linear-gradient(180deg, rgba(20, 52, 104, 0.52), rgba(8, 22, 52, 0.28)) !important;
  border-color: rgba(94, 182, 255, 0.55);
}
html[data-kk-theme="dark"] .kkb-field input::placeholder { color: #6e7d90; }

/* ── 卡片动作按钮按动作着色（暗色主题）─────────────────────────────
   目的：每个动作一眼可辨；高频免杀开启后由琥珀色变实心红，状态明确。 */
html[data-kk-theme="dark"] .kkb-card-acts>.kkb-btn[data-act="dl"]{
  background:rgba(31,111,235,.20);border-color:rgba(88,166,255,.45);color:#79c0ff}
html[data-kk-theme="dark"] .kkb-card-acts>.kkb-btn[data-act="dl"]:hover{
  background:rgba(31,111,235,.36);color:#cae8ff}

html[data-kk-theme="dark"] .kkb-card-acts>.kkb-btn[data-act="del"]{
  background:rgba(248,81,73,.16);border-color:rgba(248,81,73,.42);color:#ff7b72}
html[data-kk-theme="dark"] .kkb-card-acts>.kkb-btn[data-act="del"]:hover{
  background:rgba(248,81,73,.32);color:#fff}

html[data-kk-theme="dark"] .kkb-card-acts>.kkb-btn[data-act="qr"]{
  background:rgba(45,212,191,.16);border-color:rgba(45,212,191,.40);color:#56d4c4}
html[data-kk-theme="dark"] .kkb-card-acts>.kkb-btn[data-act="qr"]:hover{
  background:rgba(45,212,191,.30);color:#8ff0e4}

html[data-kk-theme="dark"] .kkb-card-acts>.kkb-btn[data-act="stats"]{
  background:rgba(163,113,247,.16);border-color:rgba(163,113,247,.40);color:#c297ff}
html[data-kk-theme="dark"] .kkb-card-acts>.kkb-btn[data-act="stats"]:hover{
  background:rgba(163,113,247,.30);color:#dcc4ff}

html[data-kk-theme="dark"] .kkb-card-acts>.kkb-btn[data-act="share"]{
  background:rgba(56,139,253,.14);border-color:rgba(56,139,253,.40);color:#7cc0ff}
html[data-kk-theme="dark"] .kkb-card-acts>.kkb-btn[data-act="share"]:hover{
  background:rgba(56,139,253,.28);color:#b3dcff}

/* 高频免杀：未开启=琥珀描边，已开启=实心红 + 白字 */
html[data-kk-theme="dark"] .kkb-card-acts>.kkb-btn[data-act="hot"]{
  background:rgba(251,146,60,.14);border-color:rgba(251,146,60,.42);color:#fbbf70;font-weight:600}
html[data-kk-theme="dark"] .kkb-card-acts>.kkb-btn[data-act="hot"]:hover{
  background:rgba(251,146,60,.28);color:#ffd9a8}
html[data-kk-theme="dark"] .kkb-card-acts>.kkb-btn[data-act="hot"].on{
  background:#da3633!important;border-color:#f85149!important;color:#fff!important;
  box-shadow:0 0 0 1px rgba(248,81,73,.35),0 0 12px rgba(218,54,51,.35)}
html[data-kk-theme="dark"] .kkb-card-acts>.kkb-btn[data-act="hot"].on:hover{
  background:#e04845!important}

/* ── 卡片加高：内边距 / 行距 / 图标 / 字号 / 按钮高度整体放大，缓解拥挤 ── */
.kkb-hcard{padding:14px!important;gap:10px!important;border-radius:12px!important}
.kkb-cards{gap:14px!important}
.kkb-ico{width:30px!important;height:30px!important;border-radius:9px!important;flex:none!important}
.kkb-card-top{gap:10px!important}
.kkb-pkg{font-size:13px!important}
.kkb-meta{font-size:12px!important;margin-top:2px}
.kkb-card-acts{gap:8px!important}
.kkb-card-acts>.kkb-btn{min-height:32px!important;padding:7px 10px!important;font-size:12px!important}

/* ── 基础配置卡片：删除右上角刷新按钮；标题与「包类型 单包/双包」同一行 ──
   前提：.kkb-form 的 display:grid 生效（此前被布局脚本误写 display:block 覆盖）。 */
.kkb-card.kkb-form{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;
  column-gap:8px!important;row-gap:6px!important;align-items:start!important}
.kkb-card.kkb-form>:nth-child(1){display:contents!important}
.kkb-card.kkb-form>:nth-child(1)>p{grid-column:1!important;grid-row:1!important;margin:0!important;
  font-size:16px!important;line-height:1.2!important;align-self:center!important}
.kkb-card.kkb-form>:nth-child(1)>button{display:none!important}          /* 刷新按钮：删除 */
.kkb-card.kkb-form>:nth-child(2){grid-column:2!important;grid-row:1!important;
  justify-self:end!important;align-self:center!important;display:flex!important;
  align-items:center!important;gap:6px!important;margin:0!important;padding:0!important}
.kkb-card.kkb-form>:nth-child(2)>p{margin:0!important;font-size:12px!important;
  color:#8b949e!important;white-space:nowrap}
.kkb-card.kkb-form>:nth-child(2)>div{display:flex!important;align-items:center!important;
  gap:6px!important;flex-wrap:nowrap!important;margin:0!important}
.kkb-card.kkb-form>:nth-child(2) button{height:28px!important;padding:0 10px!important;font-size:12px!important}

/* ── 预览块贴近两张卡的下边框（卡片本身尺寸保持原样，不做紧凑化、不裁内容）──
   1) CDN 拉伸到与「基础配置」同高 → 两卡底边对齐，左卡下方不再有空带；
   2) 行间距收紧，让工具栏直接贴住这条底边。
   注：上一版把表单压到 376 导致权限配置被藏进内部滚动，已撤销。 */
/* 两卡等高（CDN 拉伸到与基础配置同高），高度由内容决定，不强制 height:100% */
/* 行 1 高度写死：即使右侧「构建历史」很高、或内容变多，也无法把行撑高、
   工具栏位置因此恒定（= 376 + 4px 行距） */
.kkb-grid.kkb-wide{grid-template-rows:376px minmax(0,auto)!important;align-items:start!important}

/* 两卡固定同高，与行高一致，不随窗口变化 */
.kkb-grid.kkb-wide .kkb-cdn,
.kkb-grid.kkb-wide .kkb-card.kkb-form{
  height:376px!important;min-height:376px!important;max-height:376px!important}
.kkb-grid.kkb-wide .kkb-card.kkb-form{overflow-y:auto!important}

/* 宽屏（≥2000px）原本有一套放大规则，会把 CDN 卡撑到 428px、输入框 44px，
   造成两卡不等高、行高变大、工具栏被推低。这里统一压回与常规宽度一致。 */
@media (min-width:2000px){
  .kkb-cdn{min-height:0!important;padding:14px!important}
  .kkb-cdn .kkb-bd{gap:6px!important;flex:none!important}
  .kkb-cdn .kkb-grid2{gap:4px!important}
  .kkb-cdn .kkb-field{gap:2px!important}
  .kkb-cdn .kkb-field input,
  .kkb-cdn .kkb-field select{height:40px!important;padding:8px 10px!important}
  .kkb-form{min-height:0!important}
  .kkb-grid.kkb-wide{row-gap:4px!important}
}

/* 紧凑布局（恢复：卡片内边距、行距、输入框高度收紧） */
/* 只压缩「块与块之间的间距」来降外框高度；
   输入框高度、字号、内边距一律保持原样，不做缩放。 */
.kkb-card.kkb-form>*{margin-bottom:0!important}          /* Tailwind space-y-4 挂的是 mb:16px */
.kkb-form.space-y-4>*+*{margin-top:4px!important}         /* 原 6px */

/* 预览块贴住两卡底边 */
.kkb-grid.kkb-wide{row-gap:4px!important}
.kkb-grid.kkb-wide .kkb-preview{margin-top:0!important;padding-top:0!important}

/* ── 服务器地址遮蔽层：只挡显示，不改值 ── */
.kk-mask-server{
  position:absolute;left:0;right:0;bottom:0;
  align-items:center;padding-left:10px;
  font-size:14px;letter-spacing:2px;color:#e6edf3;
  pointer-events:none;user-select:none;background:transparent}
html[data-kk-theme="white"] .kk-mask-server{color:#1f2328}

/* ── 服务器地址口令解锁浮层 ── */
.kk-unlock{
  position:absolute;left:0;top:100%;margin-top:6px;z-index:60;
  display:flex;align-items:center;gap:6px;padding:8px;border-radius:8px;
  background:rgba(6,16,36,.96);border:1px solid rgba(94,182,255,.45);
  box-shadow:0 10px 26px rgba(0,0,0,.45)}
.kk-unlock input{
  width:120px;height:28px;padding:0 8px;border-radius:6px;
  border:1px solid #30363d;background:#0d1117;color:#e6edf3;font-size:13px}
.kk-unlock button{
  height:28px;padding:0 10px;border-radius:6px;border:1px solid #1f6feb;
  background:#1f6feb;color:#fff;font-size:12px;cursor:pointer}
.kk-unlock-msg{font-size:11px;color:#f85149}
