/* ============================================================
   202 空投助手 —— V3 机甲风 × V2 配色（定版 · 设计规范速查）
   ============================================================
   【色彩 token（只用这些，不引第三色）】
     --bg #050505 页面底 | --panel #0c0c0c 面板 | --line #2a2a2a 常规边
     白 #ffffff = 唯一强调色：主按钮 / 选中态 / 关键数字 / h2 编号块
     --muted #8f8f8f 次要文字 | --dim #3c3c3c 弱化/占位
     语义色一律黑白表达：危险 = 白底黑字(.alert-danger)或粗白框脉冲(.btn-danger)
   【新增组件照此风格】
     · 切角：clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px)
     · 面板：background var(--panel) + border 2px var(--line) + border-top 2px #fff
     · 选中 = 反白（白底黑字），hover = border 提亮到 --muted
     · 数字/地址/哈希一律 font-family var(--mono)
     · 大数字 = var(--mono) font-weight 900 + letter-spacing -.05em
   【动效（配 fx.js，零依赖）】
     · 入场：.fx-enter + .fx-in（JS 挂）；滚入：.card 自动（fx.js 的 IO）
     · 所有 transition 用 cubic-bezier(.2,.8,.2,1)，时长 .12s~.55s
     · prefers-reduced-motion 下全站动效自动关闭——新组件无需单独处理
   ============================================================ */
:root {
  --bg: #050505;
  --panel: #0c0c0c;
  --line: #2a2a2a;
  --text: #ffffff;
  --muted: #8f8f8f;
  --dim: #3c3c3c;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Courier New", monospace;
  --green: #3fa46a;          /* 毛笔绿：仅点缀——hero 一划 + 成功语义，别到处用 */
  --red:   #c2453f;          /* 错误语义：仅用于"确实出错"，不要拿它做装饰 */
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

/* V2 斜纹暗底 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: repeating-linear-gradient(-45deg, rgba(255,255,255,.022) 0 2px, transparent 2px 14px);
}
/* V2 顶部白光 */
body::after {
  content: "";
  position: fixed;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 120%;
  height: 55%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(ellipse at center, rgba(255,255,255,.055), transparent 65%);
}

main, header.top, footer.foot { position: relative; z-index: 1; }

/* ============ 顶部（V3 粗白底线） ============ */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  padding-top: calc(12px + env(safe-area-inset-top));
  background: rgba(5, 5, 5, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid #fff;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 900;
  letter-spacing: 2px;
  font-size: 14px;
}
.brand-mark {
  width: 38px;
  height: 38px;
  background: #fff;
  border-bottom: 3px solid var(--green);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-weight: 900;
  font-size: 13px;
  flex: none;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.brand small { color: var(--dim); font-weight: 400; font-size: 11px; letter-spacing: 1px; }

main { padding: 0 16px 40px; display: flex; flex-direction: column; gap: 16px; max-width: 720px; margin: 0 auto; }

/* ============ HERO（V3 立体大数字 + 铭牌 + 警示条纹） ============ */
.hero { padding: 36px 2px 0; }
.hero-202 {
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(88px, 21vw, 176px);
  font-weight: 900;
  line-height: .84;
  letter-spacing: -.05em;
  color: #fff;
  position: relative;
  display: inline-block;
  user-select: none;
}
/* 毛笔绿：一划横过 202 下缘（起笔重、收笔飞白的墨迹），内嵌 SVG 零依赖 */
.hero-202::before {
  content: "";
  position: absolute;
  left: -4%;
  bottom: -8%;
  width: 108%;
  height: 26%;
  z-index: -2;
  transform: rotate(-1.6deg);
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 40' preserveAspectRatio='none'><path d='M4 24 C36 10 88 6 150 13 C212 20 258 10 296 17 C270 24 224 29 168 27 C118 25 66 31 24 30 C12 29 5 27 4 24 Z' fill='%233fa46a' fill-opacity='0.85'/><path d='M60 30 C110 33 190 32 250 27' stroke='%233fa46a' stroke-opacity='0.4' stroke-width='1.4' fill='none'/></svg>") no-repeat center / 100% 100%;
  opacity: .9;
}
.hero-202::after {
  content: "202";
  position: absolute;
  left: 5px;
  top: 5px;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,.25);
  z-index: -1;
}
.hero-plate {
  margin-top: 14px;
  display: inline-block;
  background: #fff;
  color: #000;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 3px;
  padding: 8px 16px;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.hero-plate small { font-weight: 400; letter-spacing: 1px; opacity: .55; font-family: var(--mono); }
.hero-meta {
  margin-top: 12px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 1px;
}
.hero-meta span::before { content: "▸ "; color: #fff; }
.stripe {
  height: 9px;
  margin-top: 18px;
  background: repeating-linear-gradient(-45deg, #fff 0 12px, transparent 12px 24px);
}

/* ============ 卡片（V3 硬甲板 + 白角标） ============ */
.card {
  background: var(--panel);
  border: 2px solid var(--line);
  border-top: 2px solid #fff;
  border-radius: 0;
  padding: 20px 16px;
  position: relative;
}
.card::before {
  content: "";
  position: absolute;
  top: -2px;
  right: -2px;
  width: 0;
  height: 0;
  border-top: 16px solid #fff;
  border-left: 16px solid transparent;
}
.card h2 {
  margin: 0 0 16px;
  font-size: 13.5px;
  font-weight: 900;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.card h2 .no {
  background: #fff;
  color: #000;
  font-family: var(--mono);
  font-weight: 900;
  padding: 3px 8px;
  font-size: 11.5px;
  flex: none;
}
.card h2:only-child { margin-bottom: 0; }

.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.row-between h2 { margin: 0; }

/* ============ 表单 ============ */
.field { display: block; margin-bottom: 17px; }
.field:last-child { margin-bottom: 0; }
.field .label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 2px;
  font-weight: 700;
  margin-bottom: 8px;
}
.field-row { display: flex; gap: 9px; align-items: flex-end; }
.field-row .grow { flex: 1; margin-bottom: 0; }

input[type="text"], input[type="number"], textarea {
  width: 100%;
  background: #000;
  border: 2px solid var(--line);
  border-radius: 0;
  color: #fff;
  padding: 13px;
  font-size: 15px;
  font-family: var(--mono);
  font-weight: 700;
  outline: none;
  appearance: none;
  transition: border-color .12s;
}
input:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 1px var(--green), 0 0 14px rgba(63,164,106,.18); }
textarea { resize: vertical; font-size: 12.5px; font-weight: 400; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--dim); font-weight: 400; }

/* ============ 代币输入框 + 下拉（V3 切角块） ============ */
.combo { position: relative; display: flex; gap: 0; }

.combo input {
  flex: 1;
  border-right: 0;
  border-radius: 0;
  clip-path: polygon(8px 0, 100% 0, 100% 100%, 0 100%, 0 8px);
}

.combo-btn {
  flex: none;
  width: 46px;
  background: #000;
  border: 2px solid var(--line);
  border-left: 0;
  border-radius: 0;
  color: var(--muted);
  font-size: 15px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  appearance: none;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
  transition: .1s;
}
.combo-btn:hover { color: #fff; border-color: var(--muted); }
/* 「查持仓」按钮比原来的 ▾ 宽一些，要放得下中文 */
.combo-btn-wide {
  width: auto;
  padding: 0 13px;
  font-size: 12.5px;
  letter-spacing: .5px;
  white-space: nowrap;
}
.combo-btn:disabled { opacity: .5; cursor: wait; }

/* 代币选择弹窗里的列表 */
.pick-list {
  display: flex;
  flex-direction: column;
  max-height: 320px;
  overflow-y: auto;
  border: 2px solid var(--line);
  margin: 4px 0 14px;
}
.pick-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  background: #000;
  border: 0;
  border-bottom: 1px solid #161616;
  color: #fff;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  width: 100%;
}
.pick-item:last-child { border-bottom: 0; }
.pick-item:hover { background: #fff; }
.pick-item:hover .pick-sym,
.pick-item:hover .pick-name,
.pick-item:hover .pick-bal { color: #000; }
.pick-sym { font-size: 13.5px; font-weight: 800; flex: none; }
.pick-name {
  font-size: 11px; color: var(--dim); flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pick-bal { font-size: 13px; font-weight: 700; font-family: var(--mono); flex: none; }

/* 已选代币信息条 */
.token-meta {
  margin: -4px 0 14px;
  padding: 11px 12px;
  border: 2px solid var(--line);
  background: #000;
  display: flex;
  flex-direction: column;
  gap: 7px;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.token-meta .tm-row { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; }
.token-meta .tm-k { color: var(--muted); flex: none; letter-spacing: .5px; }
.token-meta .tm-v { color: #fff; font-family: var(--mono); font-weight: 700; text-align: right; word-break: break-all; }
.token-meta .tm-v.mono-sm { font-size: 10.5px; color: var(--dim); font-weight: 400; }
.token-meta.err { border-color: var(--line); border-left: 4px solid var(--red); }
.token-meta.err .tm-k { color: var(--muted); }
.token-meta.err .tm-v { color: var(--red); }

/* ============ 可验证清单（Merkle） ============ */
.mf-root {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  word-break: break-all;
  padding: 9px 12px;
  background: #000;
  border: 2px solid var(--line);
  border-left: 4px solid var(--green);
  margin-top: 10px;
}
.mf-root .k { color: var(--dim); display: block; font-size: 10px; letter-spacing: 1px; margin-bottom: 4px; text-transform: uppercase; }
.mf-root .v { color: #fff; font-weight: 700; }

.mf-actions { display: flex; gap: 8px; margin-top: 10px; }
.mf-actions .btn { flex: 1; }

/* ============ 私募名单统计（V3 切角块 · 绿=正确 红=错误） ============ */
/* 复用 .summary 展示大数字统计，这里只加"问题清单"与"预览"两块 */

/* 状态条：解析结果一行摘要 */
.ps-status {
  margin-top: 12px;
  padding: 12px 13px;
  border: 2px solid var(--line);
  border-left: 4px solid var(--dim);
  background: #000;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.ps-status.ok   { border-left-color: var(--green); }
.ps-status.ok   .ps-status-t { color: var(--green); }
.ps-status.bad  { border-left-color: var(--red); }
.ps-status.bad  .ps-status-t { color: var(--red); }
.ps-status-t { display: flex; align-items: center; gap: 7px; }
.ps-status-d { font-size: 11.5px; color: var(--muted); font-weight: 400; }

.ps-issues {
  margin-top: 10px;
  border: 2px solid var(--line);
  border-left: 4px solid var(--red);
  background: #000;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.ps-issues > summary {
  cursor: pointer;
  list-style: none;
  user-select: none;
  padding: 11px 13px;
  font-size: 12.5px;
  color: var(--red);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-weight: 700;
}
.ps-issues > summary::-webkit-details-marker { display: none; }
.ps-issues > summary::before { content: "▸ "; }
.ps-issues[open] > summary::before { content: "▾ "; }

.ps-issues .ps-body { padding: 0 13px 12px; }

.ps-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.ps-table th, .ps-table td { padding: 6px 6px; text-align: left; border-bottom: 2px solid #161616; }
.ps-table th { color: var(--dim); font-weight: 700; font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; }
.ps-table td { color: var(--muted); }
.ps-table td.ln { color: var(--red); font-family: var(--mono); width: 52px; font-weight: 800; }
.ps-table td.val { font-family: var(--mono); word-break: break-all; max-width: 190px; }
.ps-table td.reason { color: #d88; font-family: inherit; }
.ps-table tr:last-child td { border-bottom: 0; }

.ps-preview {
  margin-top: 12px;
  border: 2px solid var(--line);
  background: #000;
  max-height: 190px;
  overflow-y: auto;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.ps-preview-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 12px;
  border-bottom: 2px solid #111;
  font-size: 11.5px;
  font-family: var(--mono);
}
.ps-preview-row:last-child { border-bottom: 0; }
.ps-preview-row .a { color: var(--muted); }
.ps-preview-row .n { color: #fff; font-weight: 800; flex: none; }
.ps-preview-more { padding: 8px 12px; font-size: 11px; color: var(--dim); text-align: center; }

/* 分段控件（V3 切角块） */
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg-item {
  flex: 1 1 0;
  min-width: 66px;
  padding: 12px 4px;
  background: #000;
  border: 2px solid var(--line);
  border-radius: 0;
  color: var(--muted);
  font-size: 13px;
  font-family: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: .1s;
  appearance: none;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.seg-item:hover { border-color: var(--muted); color: #ddd; }
.seg-item.active { background: #fff; color: #000; border-color: #fff; }

/* 单选行（V3 甲板块） */
.radio-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  margin: 0 0 8px;
  font-size: 13.5px;
  cursor: pointer;
  border: 2px solid var(--line);
  background: #000;
  transition: .1s;
  font-weight: 600;
}
.radio-row:last-of-type { margin-bottom: 0; }
.radio-row input { width: 15px; height: 15px; accent-color: #fff; flex: none; margin: 0; }
.radio-row:has(input:checked) { background: #fff; color: #000; border-color: #fff; font-weight: 800; }
.radio-row:has(input:checked) input { accent-color: var(--green); }

/* ============ 按钮（V3 切角 + ▶） ============ */
.btn {
  background: #000;
  border: 2px solid #fff;
  color: #fff;
  border-radius: 0;
  padding: 12px 16px;
  font-size: 13px;
  font-family: inherit;
  font-weight: 800;
  letter-spacing: 2px;
  cursor: pointer;
  transition: .12s;
  white-space: nowrap;
  appearance: none;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.btn:hover:not(:disabled) { background: #fff; color: #000; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .35; cursor: not-allowed; }
/* 置灰按钮旁边/下方的小字说明，用来解释"为什么不能点" */
.dim-text { color: var(--muted); font-size: 12px; }
#liveBox .btn + .btn { margin-top: 10px; }
#btnForce {
  background: transparent;
  color: var(--red);
  border: 2px dashed var(--red);
  font-size: 13px;
}
#btnForce:hover:not(:disabled) { background: var(--red); color: #000; }
.btn-primary {
  background: #fff;
  color: #000;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 3px;
}
.btn-primary:hover:not(:disabled) { background: #e8e8e8; color: #000; }
.btn-primary::before { content: "▶ "; font-size: 11px; }
.btn-danger {
  background: #000;
  border-color: #fff;
  color: #fff;
  font-weight: 900;
  animation: dangerPulse 1.6s ease-in-out infinite;
}
@keyframes dangerPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,.4); }
  50%      { box-shadow: 0 0 0 5px rgba(255,255,255,0); }
}
.btn-connect {
  background: #fff;
  color: #000;
  padding: 9px 14px;
  font-size: 12.5px;
  font-weight: 900;
}
.btn-connect:hover:not(:disabled) { background: #e8e8e8; color: #000; }
.btn-sm { padding: 10px 12px; font-size: 12px; }
.btn-tiny { padding: 5px 10px; font-size: 11px; letter-spacing: 1px; }
.btn-block { width: 100%; display: block; margin-top: 10px; }
.btn-block:first-child { margin-top: 0; }

/* ============ 徽章 ============ */
.badge {
  font-size: 10.5px;
  padding: 4px 10px;
  border-radius: 0;
  font-weight: 900;
  letter-spacing: 1px;
  font-family: var(--mono);
  border: 2px solid #fff;
}
.badge-off { background: transparent; border-color: var(--line); color: var(--muted); }
.badge-on  { background: var(--green); border-color: var(--green); color: #fff; }

.hint { font-size: 12px; color: var(--muted); margin: -4px 0 14px; line-height: 1.6; }
.muted { color: var(--muted); }

/* ============ 提示条 ============ */
.alert {
  border-radius: 0;
  padding: 12px 13px;
  margin: 12px 0;
  font-size: 12.5px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  align-items: flex-start;
  border: 2px solid var(--line);
  border-left: 4px solid #fff;
}
.alert-warn   { background: #101010; color: #ddd; }
.alert-danger { background: #fff; border-color: #fff; border-left-color: #000; color: #000; font-weight: 800; }
.alert-ok     { background: #0d0d0d; border-left-color: var(--green); color: #fff; }
.alert-danger .btn { border-color: #000; background: #000; color: #fff; clip-path: none; }

/* ============ 键值列表 ============ */
.kv-list { font-size: 13px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 2px solid #161616; }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--muted); flex: none; font-weight: 700; font-size: 12.5px; }
.kv .v { text-align: right; word-break: break-all; font-family: var(--mono); font-size: 12.5px; font-weight: 700; color: #fff; }
.kv .v.big { font-size: 16px; }
.kv .v.ok-text  { color: var(--green); }
.kv .v.err-text { color: var(--red); }

.summary {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
  margin: 12px 0 0;
  font-size: 12px;
  border: 2px solid var(--line);
  font-weight: 800;
}
.summary > div { flex: 1 1 0; padding: 10px 12px; border-right: 2px solid var(--line); min-width: 80px; color: var(--muted); }
.summary > div:last-child { border-right: 0; }
.summary b { display: block; font-family: var(--mono); font-size: 20px; color: #fff; margin-top: 2px; }

/* ============ 地址列表 ============ */
.addr-list {
  margin-top: 12px;
  max-height: 220px;
  overflow-y: auto;
  background: #000;
  border: 2px solid var(--line);
  border-left: 4px solid #fff;
  border-radius: 0;
  padding: 10px 12px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.8;
}

/* ============ 日志（V2 终端风） ============ */
.log {
  margin: 0;
  max-height: 260px;
  overflow-y: auto;
  background: #030303;
  border: 2px solid var(--line);
  border-radius: 0;
  padding: 12px;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--muted);
  white-space: pre-wrap;
  word-break: break-all;
}
.log .ok   { color: var(--green); font-weight: 700; }
.log .err  { color: #fff; background: #1e1e1e; display: inline-block; padding: 0 4px; text-decoration: underline; }
.log .warn { color: #ccc; font-style: italic; }
.log .info { color: var(--muted); }
.log .info::before { content: "▸ "; color: var(--green); }

/* ============ 表格 ============ */
table.tbl { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 10px; }
table.tbl th, table.tbl td { padding: 8px 7px; text-align: left; border-bottom: 2px solid var(--line); }
table.tbl th { color: #000; background: #fff; font-weight: 900; font-size: 10.5px; letter-spacing: 1px; }
table.tbl td.mono { font-family: var(--mono); font-size: 11px; word-break: break-all; color: #ddd; }

.foot {
  text-align: center;
  padding: 26px 14px calc(28px + env(safe-area-inset-bottom));
  color: var(--dim);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 4px;
  font-family: var(--mono);
}

.hidden { display: none !important; }

/* ============ 进度条 ============ */
.progress {
  height: 10px;
  background: #0d0d0d;
  border: 2px solid var(--line);
  border-radius: 0;
  overflow: hidden;
  margin: 12px 0 7px;
}
.progress > i {
  display: block;
  height: 100%;
  width: 0;
  transition: width .25s;
  background: repeating-linear-gradient(-45deg, var(--green) 0 8px, #1d3a2a 8px 16px);
}

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #050505; }
::-webkit-scrollbar-thumb { background: var(--dim); border: 2px solid #050505; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ============ 大屏 ============ */
@media (min-width: 640px) {
  main { padding: 0 20px 50px; gap: 18px; }
  .card { padding: 22px 20px; }
  .hero { padding: 44px 2px 0; }
}

/* ============ 桌面双列（≥1024px） ============ */
@media (min-width: 1024px) {
  main {
    max-width: 1080px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    align-items: start;
  }
  .hero { grid-column: 1 / -1; }
  #resultCard, #logCard { grid-column: 1 / -1; }
  #walletCard, #setupCard { grid-column: 1; }
  #addrCard { grid-column: 2; }
  .card { padding: 24px 22px; }
}

/* 减少动效 */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ============================================================
   动效层（fx.js 配套）
   ============================================================ */

/* ---- hero 入场：下移淡入 + 条纹横扫 ---- */
.fx-enter { opacity: 0; transform: translateY(18px); transition: opacity .5s ease, transform .55s cubic-bezier(.2,.8,.2,1); }
.fx-enter.fx-in { opacity: 1; transform: none; }
.stripe.fx-enter { transform: scaleX(0); transform-origin: left; transition: opacity .4s, transform .7s cubic-bezier(.2,.8,.2,1); }
.stripe.fx-enter.fx-in { transform: scaleX(1); }

/* ---- hero 大数字微呼吸（光晕） ---- */
.hero-202 { animation: heroBreath 4.5s ease-in-out infinite 1.2s; }
@keyframes heroBreath {
  0%, 100% { text-shadow: 0 0 0 rgba(255,255,255,0); }
  50%      { text-shadow: 0 0 26px rgba(255,255,255,.22); }
}

/* ---- 卡片滚入 ---- */
.card.fx-wait { opacity: 0; transform: translateY(22px); }
.card.fx-wait.fx-in { opacity: 1; transform: none; transition: opacity .45s ease, transform .5s cubic-bezier(.2,.8,.2,1); }

/* ---- 卡片悬停：光斑跟随 + 角标放大 ---- */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s;
  background: radial-gradient(340px circle at var(--gx, 50%) var(--gy, 50%), rgba(255,255,255,.055), transparent 60%);
}
.card.fx-hover::after { opacity: 1; }
.card.fx-hover::before { border-top-width: 22px; border-left-width: 22px; }
.card::before { transition: border-width .2s ease; }

/* ---- 按钮扫光 ---- */
.btn { position: relative; overflow: hidden; }
.fx-sweep {
  position: absolute;
  width: 8px;
  height: 200%;
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent);
  animation: fxSweep .6s ease-out forwards;
  mix-blend-mode: screen;
}
@keyframes fxSweep {
  from { left: -10%; opacity: 1; }
  to   { left: 115%; opacity: 0; }
}
.btn-primary .fx-sweep, .btn-connect .fx-sweep { background: linear-gradient(90deg, transparent, rgba(0,0,0,.28), transparent); mix-blend-mode: multiply; }

/* ---- 按钮磁吸的平滑回弹 ---- */
.btn-primary, .btn-connect, .btn-danger { transition: transform .18s cubic-bezier(.2,.8,.2,1), background .15s, border-color .15s; }
.btn-primary:active, .btn-connect:active, .btn-danger:active { transform: scale(.97) !important; }

/* ---- 分段按钮按压 ---- */
.seg-item { transition: .12s cubic-bezier(.2,.8,.2,1); }
.seg-item:active { transform: scale(.94); }

/* ---- 日志新行淡入 ---- */
@keyframes fxLineIn { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }

/* ---- 数字更新闪白 ---- */
.fx-flash { animation: fxFlash .5s ease; }
@keyframes fxFlash {
  0%   { color: #fff; text-shadow: 0 0 12px rgba(255,255,255,.9); }
  100% { text-shadow: 0 0 0 rgba(255,255,255,0); }
}

/* ---- 背景光缓慢漂移 ---- */
body::after { animation: fxDrift 14s ease-in-out infinite alternate; }
@keyframes fxDrift {
  from { transform: translateX(-56%); }
  to   { transform: translateX(-44%); }
}

/* ---- 进度条流动 ---- */
.progress > i { background-size: 24px 24px; animation: fxFlow 1s linear infinite; }
@keyframes fxFlow { to { background-position: 24px 0; } }

/* ============================================================
   弹窗（modal.js 配套）—— 机甲风：切角面板 + 铭牌 + 白色主键
   ============================================================ */
.ui-modal-back {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity .18s ease;
}
.ui-modal-back.ui-open { opacity: 1; }

.ui-modal {
  width: 100%;
  max-width: 420px;
  background: var(--panel);
  border: 2px solid #fff;
  border-top: 3px solid #fff;
  padding: 22px 20px 20px;
  position: relative;
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
  transform: translateY(16px) scale(.97);
  transition: transform .2s cubic-bezier(.2,.8,.2,1);
}
.ui-modal-back.ui-open .ui-modal { transform: none; }
/* 右上白角标（与卡片同款） */
.ui-modal::before {
  content: "";
  position: absolute;
  top: -2px;
  right: -2px;
  width: 0;
  height: 0;
  border-top: 16px solid #fff;
  border-left: 16px solid transparent;
}

.ui-modal-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 3px;
  color: #000;
  background: #fff;
  display: inline-block;
  padding: 2px 8px;
  margin-bottom: 14px;
  font-weight: 900;
}
.ui-modal-msg {
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-line;
  color: #fff;
  word-break: break-all;
  margin-bottom: 20px;
}
.ui-modal-btns {
  display: flex;
  gap: 10px;
}
.ui-modal-btns .btn { flex: 1; padding: 12px 10px; }
.ui-modal-btns .ui-m-cancel { clip-path: none; }

/* 弹窗里的输入框（用于「危险操作二次确认」这类需要手打文字的场合） */
.ui-modal-input {
  width: 100%;
  background: #000;
  border: 2px solid var(--line);
  color: #fff;
  font-family: var(--mono);
  font-size: 14px;
  padding: 11px 12px;
  margin: -8px 0 18px;
  outline: none;
}
.ui-modal-input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 1px var(--red), 0 0 14px rgba(194, 69, 63, .18);
}
.ui-modal-input::placeholder { color: var(--dim); }
