/* Eden AI 管理密钥查询台 —— 样式（大字号 / 大控件 / 面向普通用户） */
:root {
  --bg: #f4f6fa;
  --bg-2: #e9edf3;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --border: #e1e6ee;
  --border-strong: #c9d2df;
  --text: #0f172a;
  --text-2: #475569;
  --muted: #7b8798;
  --accent: #0f9d78;
  --accent-2: #0b7f8f;
  --accent-soft: rgba(15, 157, 120, .12);
  --accent-grad: linear-gradient(135deg, #10b981 0%, #0891b2 100%);
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, .10);
  --warn: #d97706;
  --warn-soft: rgba(217, 119, 6, .12);
  --ok: #16a34a;
  --ok-soft: rgba(22, 163, 74, .12);
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 28px -10px rgba(15, 23, 42, .14);
  --shadow-lg: 0 24px 70px -24px rgba(15, 23, 42, .4);
  --radius: 18px;
  --radius-sm: 12px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0a0f1c;
  --bg-2: #101728;
  --surface: #131b2e;
  --surface-2: #182136;
  --border: #212c44;
  --border-strong: #2f3d5c;
  --text: #e8edf6;
  --text-2: #aeb9cc;
  --muted: #7a879f;
  --accent: #34d399;
  --accent-2: #22d3ee;
  --accent-soft: rgba(52, 211, 153, .14);
  --accent-grad: linear-gradient(135deg, #34d399 0%, #22d3ee 100%);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, .14);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, .14);
  --ok: #4ade80;
  --ok-soft: rgba(74, 222, 128, .14);
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 10px 34px -12px rgba(0, 0, 0, .65);
  --shadow-lg: 0 34px 90px -24px rgba(0, 0, 0, .85);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { font-size: 16px; }
html, body { height: 100%; }
body {
  margin: 0; font-family: var(--sans); font-size: 1rem; line-height: 1.6;
  color: var(--text); background: var(--bg);
  background-image: radial-gradient(1400px 700px at 8% -10%, var(--accent-soft), transparent 60%), radial-gradient(1000px 600px at 110% 5%, rgba(14, 165, 233, .10), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased; transition: background-color .25s, color .25s;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: var(--mono); font-size: .92em; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.xs { font-size: .8rem; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.flex { display: flex; align-items: center; gap: 10px; }
.grow { flex: 1; }
.wrap { flex-wrap: wrap; }
.mt { margin-top: 18px; }
.mb { margin-bottom: 18px; }
.mt-sm { margin-top: 10px; }
b, strong { font-weight: 650; }

/* ---------- 按钮 / 表单 ---------- */
button, .btn {
  font: inherit; font-size: .95rem; cursor: pointer; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  padding: 10px 18px; min-height: 44px; border-radius: var(--radius-sm); transition: all .15s; display: inline-flex; align-items: center; justify-content: center; gap: 8px; line-height: 1.2; font-weight: 500;
}
button:hover, .btn:hover { border-color: var(--accent); color: var(--accent); }
button:disabled { opacity: .55; cursor: not-allowed; }
button.primary { background: var(--accent-grad); border-color: transparent; color: #fff; font-weight: 650; box-shadow: 0 8px 22px -10px rgba(16, 185, 129, .8); }
button.primary:hover { filter: brightness(1.06); color: #fff; }
button.xl { font-size: 1.15rem; padding: 16px 34px; min-height: 60px; border-radius: 16px; letter-spacing: .01em; }
button.xl svg { width: 22px; height: 22px; }
button.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
button.ghost:hover { background: var(--accent-soft); color: var(--accent); }
button.danger { color: var(--danger); border-color: rgba(220, 38, 38, .4); background: transparent; }
button.danger:hover { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
button.sm { padding: 6px 12px; min-height: 36px; font-size: .875rem; border-radius: 10px; }
button.icon { padding: 0; width: 44px; height: 44px; min-height: 44px; border-radius: 12px; }
button.icon.sm { width: 36px; height: 36px; min-height: 36px; }
input, select, textarea {
  font: inherit; font-size: .97rem; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 10px 14px; min-height: 44px; outline: none; transition: border-color .15s, box-shadow .15s; min-width: 0;
}
textarea { line-height: 1.55; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
input::placeholder, textarea::placeholder { color: var(--muted); }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; color: var(--text-2); font-weight: 500; }
.form-row { display: flex; flex-wrap: wrap; gap: 14px 16px; align-items: flex-end; }
.form-row label.field { flex: 1 1 170px; max-width: 280px; }
.form-row .actions { display: flex; gap: 10px; align-items: center; }
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.seg button { border: 0; border-radius: 0; padding: 9px 18px; min-height: 44px; background: transparent; }
.seg button + button { border-left: 1px solid var(--border); }
.seg button.active { background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.seg.lg button { padding: 12px 22px; min-height: 52px; font-size: 1rem; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.check input { width: 20px; height: 20px; min-height: 0; padding: 0; accent-color: var(--accent); }

/* ---------- 卡片 ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px 26px; }
.card + .card { margin-top: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head h2 { margin: 0; font-size: 1.2rem; font-weight: 700; letter-spacing: -.005em; display: flex; align-items: center; gap: 10px; }
.card-head .sub { color: var(--muted); font-size: .9rem; }
.card-head .step { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-grad); color: #fff; display: inline-grid; place-items: center; font-size: 1rem; font-weight: 700; }
.grid { display: grid; gap: 18px; }
.grid.kpi { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); }
.kpi-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.kpi-card::after { content: ""; position: absolute; inset: auto -34px -34px auto; width: 110px; height: 110px; border-radius: 50%; background: var(--accent-soft); }
.kpi-card .k { color: var(--muted); font-size: .9rem; letter-spacing: .02em; }
.kpi-card .v { font-size: 2rem; font-weight: 750; margin-top: 6px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.kpi-card .d { color: var(--text-2); font-size: .9rem; margin-top: 4px; }
.kpi-card.danger::after { background: var(--danger-soft); }
.kpi-card.ok::after { background: var(--ok-soft); }

/* ---------- 徽标 ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: .82rem; font-weight: 650; line-height: 1.5; background: var(--bg-2); color: var(--text-2); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.accent { background: var(--accent-soft); color: var(--accent); }
.badge.lg { font-size: .95rem; padding: 6px 14px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; flex: none; }

/* ---------- 表格 ---------- */
.table-wrap { overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
thead th { text-align: left; font-weight: 650; color: var(--text-2); font-size: .85rem; letter-spacing: .02em; background: var(--surface-2); padding: 12px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
tbody td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--accent-soft); }
tbody tr.clickable { cursor: pointer; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--accent); }
th.sortable .arrow { opacity: .5; font-size: .7rem; margin-left: 4px; }
.empty { padding: 34px; text-align: center; color: var(--muted); font-size: 1rem; }
.money { font-variant-numeric: tabular-nums; font-weight: 650; }

/* ---------- 提示 ---------- */
.alert { border-radius: var(--radius-sm); padding: 14px 16px; border: 1px solid; display: flex; gap: 12px; align-items: flex-start; font-size: .95rem; }
.alert svg { flex: none; margin-top: 2px; }
.alert.danger { background: var(--danger-soft); border-color: rgba(220, 38, 38, .35); color: var(--danger); }
.alert.warn { background: var(--warn-soft); border-color: rgba(217, 119, 6, .35); color: var(--warn); }
.alert.info { background: var(--accent-soft); border-color: rgba(15, 157, 120, .35); color: var(--accent); }
.alert b { font-weight: 700; }
.alert .body { flex: 1; color: var(--text); }
.alert .body .detail { margin-top: 4px; color: var(--text-2); word-break: break-word; }
.alert .body code { background: rgba(0, 0, 0, .06); padding: 2px 6px; border-radius: 6px; }
[data-theme="dark"] .alert .body code { background: rgba(255, 255, 255, .08); }

/* ---------- 布局 ---------- */
#app { min-height: 100%; display: flex; flex-direction: column; }
header.top { position: sticky; top: 0; z-index: 20; backdrop-filter: saturate(160%) blur(12px); background: color-mix(in srgb, var(--surface) 82%, transparent); border-bottom: 1px solid var(--border); }
header.top .inner { display: flex; align-items: center; gap: 16px; padding: 12px 28px; max-width: 1240px; margin: 0 auto; min-height: 68px; }
.logo { display: flex; align-items: center; gap: 12px; font-weight: 750; font-size: 1.2rem; letter-spacing: -.01em; white-space: nowrap; }
.logo .mark { width: 38px; height: 38px; border-radius: 11px; background: var(--accent-grad); display: grid; place-items: center; color: #fff; box-shadow: 0 8px 18px -6px rgba(16, 185, 129, .8); flex: none; }
.logo .mark svg { width: 22px; height: 22px; }
.logo .sub { font-weight: 500; color: var(--muted); font-size: .9rem; margin-left: 4px; }
.shell { flex: 1; max-width: 1240px; margin: 0 auto; width: 100%; padding: 26px 28px 60px; }
.page-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin: 0 0 18px; flex-wrap: wrap; }
.page-title h1 { margin: 0; font-size: 1.7rem; font-weight: 750; letter-spacing: -.015em; line-height: 1.25; }
.page-title p { margin: 6px 0 0; color: var(--text-2); font-size: 1rem; }

/* 二级页 tabs */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 20px; background: var(--surface); border: 1px solid var(--border); padding: 6px; border-radius: 14px; box-shadow: var(--shadow); }
.tabs button { border: 0; background: transparent; color: var(--text-2); padding: 10px 18px; border-radius: 10px; font-weight: 550; min-height: 44px; }
.tabs button svg { width: 18px; height: 18px; opacity: .85; }
.tabs button:hover { background: var(--accent-soft); color: var(--accent); }
.tabs button.active { background: var(--accent-grad); color: #fff; box-shadow: 0 6px 16px -8px rgba(16, 185, 129, .8); }
.backbar { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.backbar .who { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 1rem; }
.backbar .who .mono { color: var(--muted); }

/* ---------- 登录 ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: 100%; max-width: 480px; background: var(--surface); border: 1px solid var(--border); border-radius: 24px; box-shadow: var(--shadow-lg); padding: 40px 38px 32px; position: relative; overflow: hidden; }
.login-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--accent-grad); }
.login-card .logo { margin-bottom: 22px; }
.login-card .logo .mark { width: 46px; height: 46px; border-radius: 14px; }
.login-card .logo .mark svg { width: 26px; height: 26px; }
.login-card h1 { font-size: 1.5rem; margin: 0 0 8px; }
.login-card p.lead { color: var(--text-2); margin: 0 0 24px; font-size: .97rem; }
.pw { position: relative; }
.pw input { width: 100%; padding-right: 50px; font-family: var(--mono); font-size: 1rem; letter-spacing: .02em; min-height: 52px; }
.pw button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; padding: 8px; color: var(--muted); min-height: 0; }
.login-card button.primary { width: 100%; justify-content: center; padding: 14px; margin-top: 16px; font-size: 1.05rem; min-height: 54px; }
.login-card .foot { margin-top: 22px; color: var(--muted); font-size: .85rem; text-align: center; }
.login-theme { position: fixed; top: 18px; right: 20px; }

/* ---------- 首页：密钥列表 ---------- */
.paste { width: 100%; min-height: 128px; font-family: var(--mono); font-size: .95rem; padding: 14px 16px; }
.paste-hint { color: var(--muted); font-size: .9rem; margin-top: 8px; line-height: 1.6; }
.paste-hint code { background: var(--bg-2); padding: 1px 6px; border-radius: 6px; }
.keylist { display: flex; flex-direction: column; gap: 10px; }
.keyrow { display: grid; grid-template-columns: 14px minmax(140px, 220px) minmax(200px, 1fr) auto auto; gap: 14px; align-items: center; padding: 12px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); transition: border-color .15s, box-shadow .15s; }
.keyrow:hover { border-color: var(--border-strong); }
.keyrow.st-ok { border-left: 4px solid var(--ok); }
.keyrow.st-bad { border-left: 4px solid var(--danger); }
.keyrow.st-warn { border-left: 4px solid var(--warn); }
.keyrow.st-busy { border-left: 4px solid var(--accent); }
.keyrow .idx { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.keyrow input.label { min-height: 40px; padding: 7px 12px; font-size: .95rem; background: var(--surface); }
.keyrow .key { font-family: var(--mono); font-size: .92rem; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 10px; }
.keyrow .key .tag { font-family: var(--sans); font-size: .78rem; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 1px 8px; font-weight: 650; }
.keyrow .res { font-size: .9rem; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.keyrow .ops { display: flex; gap: 4px; }
.keyrow .ops button { color: var(--muted); }
.keyrow .ops button:hover { color: var(--danger); background: var(--danger-soft); }
.list-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 14px; color: var(--text-2); font-size: .95rem; }

/* 查询操作区 */
.action-bar { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: space-between; }
.action-bar .opts { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.action-bar .opts .lab { color: var(--text-2); font-size: .95rem; }
.progress { height: 10px; border-radius: 999px; background: var(--bg-2); overflow: hidden; margin-top: 16px; }
.progress .bar { height: 100%; background: var(--accent-grad); transition: width .25s; border-radius: 999px; }
.progress-text { display: flex; justify-content: space-between; color: var(--text-2); font-size: .9rem; margin-top: 8px; }

/* 结果卡 */
.results { display: flex; flex-direction: column; gap: 16px; }
.rcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px 22px 26px; position: relative; overflow: hidden; }
.rcard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--muted); }
.rcard.ok::before { background: var(--ok); }
.rcard.bad::before { background: var(--danger); }
.rcard.warn::before { background: var(--warn); }
.rcard.busy::before { background: var(--accent-grad); }
.rcard .rhead { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.rcard .rhead .title { font-size: 1.15rem; font-weight: 750; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rcard .rhead .mono { color: var(--muted); font-size: .9rem; }
.rcard .stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-top: 18px; }
.rcard .stat { background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 12px 16px; }
.rcard .stat .k { color: var(--muted); font-size: .85rem; }
.rcard .stat .v { font-size: 1.45rem; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.01em; line-height: 1.2; margin-top: 2px; }
.rcard .stat .d { color: var(--text-2); font-size: .85rem; margin-top: 2px; }
.rcard .keys-mini { margin-top: 16px; }
.rcard .rfoot { display: flex; align-items: center; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.rcard .explain { margin-top: 14px; }

/* ---------- 图表 ---------- */
.chart { width: 100%; height: 260px; display: block; }
.chart text { font-family: var(--sans); font-size: 12px; fill: var(--muted); }
.chart .grid line { stroke: var(--border); stroke-dasharray: 3 4; }
.chart rect.bar { transition: opacity .15s; }
.chart rect.bar:hover { opacity: .8; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 10px; font-size: .9rem; color: var(--text-2); }
.legend .sw { width: 12px; height: 12px; border-radius: 4px; display: inline-block; margin-right: 6px; vertical-align: -1px; }
.hbar { display: grid; grid-template-columns: minmax(100px, 180px) 1fr auto; gap: 8px 14px; align-items: center; font-size: .95rem; }
.hbar .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .track { height: 12px; border-radius: 999px; background: var(--bg-2); overflow: hidden; }
.hbar .fill { height: 100%; border-radius: 999px; background: var(--accent-grad); }
.hbar .val { font-variant-numeric: tabular-nums; color: var(--text-2); white-space: nowrap; }
.tooltip { position: fixed; z-index: 50; pointer-events: none; background: var(--text); color: var(--bg); padding: 8px 11px; border-radius: 8px; font-size: .875rem; box-shadow: var(--shadow); white-space: nowrap; transform: translate(-50%, calc(-100% - 12px)); }

/* ---------- 抽屉 / 弹窗 ---------- */
.overlay { position: fixed; inset: 0; background: rgba(2, 6, 23, .5); z-index: 40; display: flex; justify-content: flex-end; backdrop-filter: blur(2px); }
.drawer { width: min(960px, 100%); background: var(--bg); height: 100%; overflow: auto; box-shadow: var(--shadow-lg); padding: 24px 26px 50px; animation: slide .2s ease-out; }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.overlay.center { justify-content: center; align-items: center; }
.modal { width: min(560px, 100%); background: var(--surface); border-radius: 22px; border: 1px solid var(--border); box-shadow: var(--shadow-lg); padding: 28px; animation: pop .18s ease-out; }
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.modal h3 { margin: 0 0 8px; font-size: 1.3rem; }
.modal p { color: var(--text-2); margin: 0 0 18px; font-size: .97rem; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; font-size: .97rem; }
.kv .k { color: var(--muted); }
.kv .v { word-break: break-all; }
pre.json { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; overflow: auto; font-size: .85rem; line-height: 1.55; max-height: 560px; margin: 0; font-family: var(--mono); }
pre.json .s { color: #0f766e; } pre.json .n { color: #b45309; } pre.json .b { color: #7c3aed; } pre.json .k { color: #1d4ed8; } pre.json .z { color: var(--muted); }
[data-theme="dark"] pre.json .s { color: #5eead4; } [data-theme="dark"] pre.json .n { color: #fcd34d; } [data-theme="dark"] pre.json .b { color: #c4b5fd; } [data-theme="dark"] pre.json .k { color: #93c5fd; }

/* ---------- 吐司 / 骨架 ---------- */
#toasts { position: fixed; bottom: 24px; right: 24px; display: flex; flex-direction: column; gap: 10px; z-index: 60; }
.toast { background: var(--text); color: var(--bg); padding: 12px 16px; border-radius: 12px; font-size: .95rem; box-shadow: var(--shadow-lg); max-width: 420px; animation: pop .18s ease-out; }
.toast.danger { background: var(--danger); color: #fff; }
.toast.ok { background: var(--ok); color: #fff; }
.skel { background: linear-gradient(90deg, var(--bg-2) 25%, var(--surface-2) 50%, var(--bg-2) 75%); background-size: 400% 100%; animation: shimmer 1.4s infinite; border-radius: 8px; height: 16px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.spinner { width: 18px; height: 18px; border: 2.5px solid var(--border-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-row { display: flex; align-items: center; gap: 12px; color: var(--muted); padding: 22px; justify-content: center; font-size: 1rem; }

/* ---------- 参数编辑 ---------- */
.params { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: center; }
.params input { font-family: var(--mono); font-size: .9rem; }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  html { font-size: 15px; }
  .shell { padding: 16px 14px 40px; }
  header.top .inner { padding: 10px 14px; gap: 10px; }
  .logo .sub { display: none; }
  .card { padding: 18px 16px; }
  .keyrow { grid-template-columns: 1fr auto; grid-template-rows: auto auto; }
  .keyrow .idx { display: none; }
  .keyrow input.label { grid-column: 1; }
  .keyrow .ops { grid-column: 2; grid-row: 1; }
  .keyrow .key { grid-column: 1 / -1; }
  .keyrow .res { grid-column: 1 / -1; white-space: normal; }
  .drawer { width: 100%; padding: 16px 14px 40px; }
  button.xl { width: 100%; }
  .action-bar { flex-direction: column; align-items: stretch; }
}
