:root {
  --bg: #14090a;
  --panel: #1f1112;
  --line: #3a2224;
  --text: #f3e9e6;
  --muted: #a8918d;
  --accent: #e0a24a;
  --red: #c8352f;
  --ref: #7fb2ff;
  --hh: 56px; /* 顶栏高度 */
  --fh: 64px; /* 底栏高度 */
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: radial-gradient(ellipse at 50% 30%, #2a1214 0%, var(--bg) 70%);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  overflow: hidden;
}
a { color: var(--accent); }
header {
  position: fixed; top: 0; left: 0; right: 0; height: var(--hh);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; border-bottom: 1px solid var(--line);
  background: rgba(20, 9, 10, 0.85); z-index: 10;
}
header h1 { font-size: 17px; letter-spacing: 2px; color: var(--accent); white-space: nowrap; }
.tools { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--muted); white-space: nowrap; }
.tools b { color: var(--text); }
select, .btn-sm {
  background: var(--panel); color: var(--text); border: 1px solid var(--line);
  border-radius: 6px; padding: 6px 10px; font-size: 14px; font-family: inherit; cursor: pointer; text-decoration: none;
}
.btn-sm:hover, select:hover { border-color: var(--accent); }
.btn {
  margin-top: 22px; padding: 14px 46px; font-size: 20px; font-family: inherit; font-weight: 700;
  color: #fff; background: var(--red); border: none; border-radius: 40px; cursor: pointer;
  box-shadow: 0 6px 24px rgba(200, 53, 47, 0.35); transition: transform 0.15s;
}
.btn:hover { transform: translateY(-2px); }
.btn:disabled { opacity: 0.5; cursor: wait; transform: none; }
.btn.ghost { background: transparent; border: 1px solid var(--line); box-shadow: none; color: var(--text); }
.hidden { display: none !important; }
footer {
  position: fixed; left: 0; right: 0; bottom: 0; height: var(--fh);
  display: flex; align-items: center; justify-content: center; gap: 28px;
  border-top: 1px solid var(--line); font-size: 14px; color: var(--muted);
}
footer b { color: var(--text); font-size: 16px; }
@media (max-width: 720px) {
  :root { --hh: 92px; --fh: 44px; }
  /* 顶栏分两行：标题 + 可横向滑动的工具栏 */
  header { flex-direction: column; align-items: stretch; justify-content: center; gap: 6px; padding: 6px 10px; }
  header h1 { font-size: 15px; letter-spacing: 1px; }
  .tools { gap: 8px; font-size: 13px; overflow-x: auto; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
  .tools > * { flex-shrink: 0; }
  select, .btn-sm { font-size: 16px; padding: 5px 8px; } /* 16px 防止 iOS 聚焦时自动放大 */
  .btn { padding: 12px 28px; font-size: 17px; }
  footer { gap: 12px; font-size: 12px; }
  footer b { font-size: 14px; }
}
