/* ============================================================
   COLDEN TOOLS —— v5 「深空工坊」
   设计语言移植自 3D MAKE：深色优先 · 青色电光 · 极细线 · 等宽小标
   ============================================================ */

:root, html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #06070A;
  --bg-rgb: 6, 7, 10;
  --ink: #E8EBF2;
  --ink-rgb: 232, 235, 242;
  --soft: #B0B5C0;
  --muted: #727783;
  --faint: #565B66;
  --line: #1A1D24;
  --line-2: #0F1116;
  --accent: #5DE4EF;
  --accent-rgb: 93, 228, 239;
  --on-accent: #04171A;
  --ok: #7E9B82;
  --add: #7E9B82;
  --add-bg: rgba(126, 155, 130, .12);
  --del: #E07A5F;
  --del-bg: rgba(224, 122, 95, .12);
  --panel: #0A0C10;
  --wash: #0A0C10;
  --header-bg: rgba(6, 7, 10, .72);
  --grid-dot: rgba(232, 235, 242, .06);
  --slash: #3A3F49;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --sans: "Space Grotesk", "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", Consolas, "Courier New", monospace;
  --serif: Georgia, "Times New Roman", "Songti SC", SimSun, serif;
  --max: 1120px;
  --gut: 44px;
  --r: 4px;
}
html[data-theme="light"] {
  color-scheme: light;
  --bg: #F3F6F8;
  --bg-rgb: 243, 246, 248;
  --ink: #111820;
  --ink-rgb: 17, 24, 32;
  --soft: #3E4954;
  --muted: #66717C;
  --faint: #8B959F;
  --line: #C9D3DA;
  --line-2: #DFE6EA;
  --accent: #00727D;
  --accent-rgb: 0, 114, 125;
  --on-accent: #FFFFFF;
  --ok: #4D7356;
  --add: #4D7356;
  --add-bg: rgba(77, 115, 86, .12);
  --del: #B23A1F;
  --del-bg: rgba(178, 58, 31, .1);
  --panel: #EAF0F3;
  --wash: #FFFFFF;
  --header-bg: rgba(243, 246, 248, .82);
  --grid-dot: rgba(17, 24, 32, .12);
  --slash: #A5B1B8;
}

/* ------------------------------------------------------------ 基础 */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; overflow-x: hidden; background: var(--bg); }
body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  padding-bottom: 34px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.9;
  transition: background-color .45s var(--ease), color .45s var(--ease);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: rgba(var(--accent-rgb), .22); }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
button:focus-visible, a:focus-visible, canvas:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }
svg { display: block; }
h1, h2, h3 { text-wrap: balance; }
.mono { font-family: var(--mono); text-transform: uppercase; letter-spacing: .2em; }
.acc { color: var(--accent); }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.hero-reveal { animation: rise .9s var(--ease-out) both; }
.hero-copy .hero-reveal:nth-child(1) { animation-delay: .05s; }
.hero-copy .hero-reveal:nth-child(2) { animation-delay: .13s; }
.hero-copy .hero-reveal:nth-child(3) { animation-delay: .21s; }
.hero-copy .hero-reveal:nth-child(4) { animation-delay: .29s; }
.hero-copy .hero-reveal:nth-child(5) { animation-delay: .37s; }

/* ------------------------------------------------------------ 背景层 */
.grid-bg { position: fixed; inset: 0; z-index: -4; pointer-events: none;
  background-image: radial-gradient(var(--grid-dot) 1px, transparent 1px);
  background-size: 26px 26px; opacity: .45;
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 0%, transparent 78%);
  mask-image: radial-gradient(ellipse at 50% 30%, #000 0%, transparent 78%); }
.ambient-glow { position: fixed; top: 0; right: 0; width: 52vw; max-width: 760px; aspect-ratio: 1; z-index: -3; pointer-events: none;
  background: radial-gradient(circle at 70% 40%, rgba(var(--accent-rgb), .09), transparent 62%); }

/* ------------------------------------------------------------ 顶栏 */
.hd { position: fixed; top: 0; left: 0; right: 0; z-index: 40; height: 64px;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line); }
.hd-in { height: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gut);
  display: flex; align-items: center; gap: 26px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none;
  font-size: 17px; font-weight: 600; letter-spacing: -.02em; white-space: nowrap; }
.brand-mark { width: 21px; height: 21px; flex: none; }
.brand-mark path { stroke: var(--accent); }
.brand-mark circle { fill: var(--ink); }
.brand-mark circle:nth-of-type(2) { fill: var(--accent); }
.brand-serif { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--soft); }
.brand-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.nav { display: flex; align-items: center; gap: 20px; margin-left: 8px; overflow-x: auto; scrollbar-width: none;
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--muted); padding: 6px 0; position: relative; transition: color .3s var(--ease); }
.nav a:hover { color: var(--ink); }
.nav a.on { color: var(--accent); }
.nav a.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--accent); }
.hd-ops { display: flex; align-items: center; gap: 10px; margin-left: auto; flex: none; }
.searchbtn { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 3px;
  color: var(--muted); font-size: 12px; transition: border-color .3s var(--ease), color .3s var(--ease); }
.searchbtn:hover { border-color: var(--soft); color: var(--ink); }
.searchbtn kbd { font-family: var(--mono); font-size: 10px; color: var(--faint);
  border: 1px solid var(--line); border-radius: 2px; padding: 1px 5px; line-height: 1.5; }
.iconbtn { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 3px;
  color: var(--muted); transition: border-color .3s var(--ease), color .3s var(--ease); }
.iconbtn:hover { border-color: var(--accent); color: var(--accent); }
.lang-switch { display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; }
.lang-btn { min-height: 36px; padding: 0 4px; color: var(--muted); transition: color .3s var(--ease); }
.lang-btn:hover { color: var(--ink); }
.lang-btn.active { color: var(--accent); }
.lang-sep { color: var(--slash); }

/* ------------------------------------------------------------ 主区 */
main { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gut) 120px; flex: 1 0 auto; }

/* ------------------------------------------------------------ 首页 HERO */
.hero { position: relative; min-height: min(86vh, 780px); display: flex; align-items: center;
  padding: 132px 0 96px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 48px; width: 100%; }
.hero-copy { position: relative; z-index: 2; min-width: 0; }
.hero-status { display: flex; align-items: center; gap: 11px; margin-bottom: 24px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.live-dot { position: relative; display: inline-block; width: 6px; height: 6px; flex: none; border-radius: 50%; background: var(--accent); }
.live-dot::after { content: ""; position: absolute; inset: -4px; border: 1px solid rgba(var(--accent-rgb), .45); border-radius: 50%;
  animation: pulse 2.2s var(--ease-out) infinite; }
@keyframes pulse { 0% { transform: scale(.55); opacity: 0; } 30% { opacity: 1; } 100% { transform: scale(1.65); opacity: 0; } }
.hero-title { max-width: 13em; font-size: clamp(38px, 5.6vw, 74px); font-weight: 600; line-height: 1.08; letter-spacing: -.015em; }
.hero-subtitle { max-width: 34em; margin-top: 24px; color: var(--soft); font-size: 16px; font-weight: 400; line-height: 1.95; }
.hero-subtitle b { color: var(--ink); font-weight: 500; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 34px; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 28px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.hero-meta .online { color: var(--ok); }
.hero-meta .slash { color: var(--slash); padding: 0 3px; }
.hero-meta a { color: var(--muted); border-bottom: 1px solid var(--slash); }
.hero-meta a:hover { color: var(--accent); border-color: var(--accent); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 0 24px; border-radius: 3px;
  font-size: 14px; font-weight: 600; line-height: 1.2; letter-spacing: .01em;
  background: var(--accent); color: var(--on-accent); border: 1px solid var(--accent); cursor: pointer;
  transition: background-color .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease), transform .3s var(--ease); }
.btn:hover { transform: translate(2px, -2px); color: var(--on-accent); }
html[data-theme="dark"] .btn:hover { background: #8BEDF5; border-color: #8BEDF5; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--soft); background: rgba(var(--bg-rgb), .4); color: var(--ink); }
.btn svg { width: 14px; height: 14px; }
a.btn, a.btn:visited, a.btn:hover { color: var(--on-accent); }
.findbox { display: flex; gap: 10px; margin-top: 30px; max-width: 560px; }
.findbox input { flex: 1; min-width: 0; min-height: 50px; padding: 0 18px;
  border: 1px solid var(--line); border-radius: 3px; outline: none;
  background: var(--panel); color: var(--ink); font-size: 14.5px;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease); }
.findbox input::placeholder { color: var(--faint); }
.findbox input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .13); }
.findbox .btn { min-height: 50px; padding: 0 22px; flex: none; }

.hero-visual { min-width: 0; justify-self: end; width: 100%; max-width: 520px;
  animation: rise 1s var(--ease-out) .28s both; }
.scene-shell { position: relative; width: 100%; aspect-ratio: 1; touch-action: none; isolation: isolate; }
.scene-shell::before { content: ""; position: absolute; inset: 14%; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, rgba(var(--accent-rgb), .055), transparent 68%); }
#particle-canvas { display: block; width: 100%; height: 100%; cursor: grab; outline-offset: -4px; }
#particle-canvas.dragging { cursor: grabbing; }
.orbit { position: absolute; border-radius: 50%; pointer-events: none; }
.orbit-solid { inset: 6%; border: 1px solid rgba(var(--accent-rgb), .18); animation: orbit-spin 80s linear infinite; }
.orbit-solid::before { content: ""; position: absolute; width: 4px; height: 4px; border-radius: 50%; top: 12%; right: 16%; background: var(--accent); opacity: .5; }
.orbit-dashed { inset: -7%; border: 1px dashed rgba(var(--accent-rgb), .16); }
@keyframes orbit-spin { to { transform: rotate(360deg); } }
.scene-hud { position: absolute; z-index: 2; pointer-events: none; white-space: nowrap;
  font-family: var(--mono); font-size: 8.5px; line-height: 1.4; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.scene-hud span { color: var(--accent); }
.hud-tl { top: 0; left: 0; } .hud-tr { top: 0; right: 0; } .hud-bl { bottom: 0; left: 0; } .hud-br { bottom: 0; right: 0; }
.shape-controls { display: flex; align-items: center; justify-content: center; gap: 22px; margin-top: 16px; }
.shape-btn { position: relative; min-height: 40px; padding: 0 6px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  transition: color .3s var(--ease); }
.shape-btn::after { content: ""; position: absolute; width: 14px; height: 2px; left: 50%; bottom: 4px;
  background: var(--accent); transform: translateX(-50%) scaleX(0); transition: transform .3s var(--ease); }
.shape-btn:hover { color: var(--ink); }
.shape-btn.active { color: var(--accent); }
.shape-btn.active::after { transform: translateX(-50%) scaleX(1); }
.drag-hint { margin-top: 2px; text-align: center; font-family: var(--mono); font-size: 8.5px; letter-spacing: .2em; color: var(--muted); }

/* ------------------------------------------------------------ 数据条 */
.stats-strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: rgba(var(--ink-rgb), .012); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); }
.stat { position: relative; padding: 32px 18px 28px 0; }
.stat:not(:last-child) { border-right: 1px solid var(--line-2); }
.stat:not(:first-child) { padding-left: 26px; }
.stat-number { font-size: clamp(30px, 4.2vw, 48px); font-weight: 700; line-height: 1; letter-spacing: -.02em; color: var(--ink); }
.stat-label { margin-top: 12px; font-family: var(--mono); font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.stats-strip-in { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
main .stats-strip { margin-left: calc(-1 * var(--gut)); margin-right: calc(-1 * var(--gut)); margin-bottom: 0; padding: 0; }
main .stats-grid { padding-left: var(--gut); padding-right: var(--gut); }

/* ------------------------------------------------------------ 分类区块 */
.sec { padding-top: 96px; border-top: 1px solid var(--line); margin-top: 96px; }
.sec:first-of-type { margin-top: 60px; }
.sec-hd { display: flex; align-items: baseline; gap: 16px; padding-bottom: 14px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.sec-idx { font-family: var(--mono); font-size: 11px; letter-spacing: .2em; color: var(--accent); flex: none; }
.sec-hd h2 { font-size: 21px; font-weight: 600; letter-spacing: -.01em; margin: 0; flex: none; }
.sec-note { color: var(--muted); font-size: 12.5px; margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sec-hd .cnt { flex: none; font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; color: var(--muted);
  border: 1px solid var(--line); border-radius: 2px; padding: 3px 9px; }
.tlist { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; border: 1px solid var(--line-2); background: var(--line-2); }
.titem { background: var(--bg); padding: 20px 22px 22px; transition: background-color .3s var(--ease); min-width: 0; }
.titem:hover { background: var(--panel); }
.titem a { display: inline-flex; align-items: baseline; gap: 8px; font-size: 15.5px; font-weight: 600; color: var(--ink); letter-spacing: -.01em; }
.titem a::after { content: "↗"; font-family: var(--mono); font-size: 12px; color: var(--faint); opacity: 0; transform: translate(-3px, 3px); transition: all .3s var(--ease); }
.titem:hover a::after { opacity: 1; transform: none; color: var(--accent); }
.titem:hover a { color: var(--accent); }
.titem p { margin: 6px 0 0; color: var(--soft); font-size: 13px; line-height: 1.7; }

/* ------------------------------------------------------------ 跑马灯 */
.tech-marquee { overflow: hidden; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); padding: 12px 0; margin-top: 96px;
  margin-left: calc(-1 * var(--gut)); margin-right: calc(-1 * var(--gut)); }
.marquee-track { display: flex; width: max-content; animation: marquee 34s linear infinite; }
.tech-marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-group { display: flex; align-items: center; flex: none; }
.marquee-item { display: flex; align-items: center; gap: 26px; padding-right: 26px; white-space: nowrap;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.marquee-item::after { content: ""; width: 1px; height: 11px; background: var(--line); }
.marquee-item .key { color: var(--accent); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ------------------------------------------------------------ 构建日志 */
.build-list { margin-top: 20px; }
.build-row { display: grid; grid-template-columns: 44px 96px 1fr; gap: 26px; align-items: baseline; padding: 26px 12px 26px 0;
  border-bottom: 1px solid var(--line-2); transition: background-color .3s var(--ease); }
.build-row:hover { background: rgba(var(--accent-rgb), .04); }
.build-number { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: .12em; }
.build-status { display: flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); }
.status-dot { width: 6px; height: 6px; flex: none; border-radius: 50%; background: var(--muted); position: relative; }
.build-row.done .status-dot { background: var(--ok); }
.build-row.now .status-dot { background: var(--accent); }
.build-row.now .status-dot::after { content: ""; position: absolute; inset: -4px; border: 1px solid rgba(var(--accent-rgb), .5); border-radius: 50%; animation: pulse 2.2s var(--ease-out) infinite; }
.build-row.now .build-status { color: var(--accent); }
.build-title { font-size: clamp(19px, 2.4vw, 24px); font-weight: 600; line-height: 1.35; letter-spacing: -.02em; }
.build-desc { margin-top: 8px; max-width: 46em; color: var(--soft); font-size: 14px; line-height: 1.85; }

/* ------------------------------------------------------------ 结尾 */
.closing { padding: 110px 0 30px; }
.closing-title { max-width: 22em; font-size: clamp(28px, 4.2vw, 44px); font-weight: 600; line-height: 1.35; letter-spacing: -.02em; }
.closing-title span { color: var(--accent); }
.contact-line { margin-top: 24px; color: var(--soft); font-size: 15px; }
.contact-line a { color: var(--ink); margin: 0 5px; position: relative; }
.contact-line a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: var(--accent); transform: scaleX(1); transform-origin: left; transition: transform .3s var(--ease); }
.contact-line a:hover::after { transform: scaleX(.35); }
.closing-note { margin-top: 16px; font-family: var(--mono); font-size: 10px; letter-spacing: .15em; color: var(--muted); }

/* ------------------------------------------------------------ 页脚 */
.ft { border-top: 1px solid var(--line); margin-top: 40px;
  margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
.ft-in { max-width: var(--max); margin: 0 auto; padding: 52px var(--gut) 0;
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 44px; }
.ft b { font-size: 16px; font-weight: 600; }
.ft p { margin-top: 16px; color: var(--muted); font-size: 12.5px; line-height: 1.9; max-width: 40em; }
.ft-links { display: flex; flex-direction: column; align-items: flex-end; gap: 9px; }
.ft-links a { color: var(--muted); font-size: 13px; transition: color .3s var(--ease); }
.ft-links a:hover { color: var(--accent); }
.ft-meta { max-width: var(--max); margin: 0 auto; padding: 16px var(--gut) 18px; border-top: 1px solid var(--line-2); margin-top: 44px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  font-family: var(--mono); font-size: 9px; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); }

/* ------------------------------------------------------------ 系统条 */
.sysbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: 34px;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); }
.sysbar-in { height: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gut);
  display: flex; align-items: center; gap: 22px; white-space: nowrap;
  font-family: var(--mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.sys-ready { display: flex; align-items: center; gap: 7px; color: var(--soft); }
.sys-ready::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--ok); }
.sys-version { margin-left: auto; color: var(--soft); }

/* ------------------------------------------------------------ 面包屑 / 工具页头 */
.crumb { margin: 96px 0 0; font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  display: flex; flex-wrap: wrap; gap: 10px; }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--accent); }
.crumb span { color: var(--slash); }
.tool-hd { margin: 26px 0 30px; }
.kicker { display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.kicker i { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--accent); }
.kicker a { color: var(--muted); }
.kicker a:hover { color: var(--accent); }
.tool-hd h1 { font-size: clamp(26px, 3.6vw, 40px); font-weight: 600; line-height: 1.2; letter-spacing: -.015em; }
.tool-hd p { margin-top: 10px; color: var(--soft); font-size: 14.5px; line-height: 1.85; max-width: 52em; }
.note { margin-top: 22px; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--panel); color: var(--soft); font-size: 13px; line-height: 1.8; }
.note a { color: var(--accent); }
.xref { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 36px 0 0; }
.xref span { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; color: var(--muted); margin-right: 6px; }
.xref a { border: 1px solid var(--line); border-radius: 2px; padding: 5px 12px; color: var(--soft); font-size: 12.5px;
  transition: border-color .3s var(--ease), color .3s var(--ease); }
.xref a:hover { border-color: var(--accent); color: var(--accent); }
.backline { margin: 22px 0 0; font-size: 13px; }
.backline a { color: var(--muted); }
.backline a:hover { color: var(--accent); }

/* ------------------------------------------------------------ 面板 */
.pane { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); overflow: hidden; margin-top: 16px; }
.pane-hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.pane-t { font-family: var(--mono); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.pane-ops { display: flex; gap: 6px; }
.op { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 2px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; color: var(--muted);
  transition: color .25s var(--ease), background-color .25s var(--ease); }
.op:hover { color: var(--accent); background: rgba(var(--accent-rgb), .08); }
.pane-bd { padding: 0; }

/* 输入 */
.ta { display: block; width: 100%; min-height: 92px; padding: 14px 16px; border: 0; outline: none; resize: vertical;
  background: transparent; color: var(--ink);
  font-family: var(--mono); font-size: 13.5px; line-height: 1.75; }
.pane-bd .ta { border: 0; }
.field .ta, .findbox textarea, textarea.standalone { border: 1px solid var(--line); border-radius: 3px; background: var(--wash); }
.field .ta:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .13); }
.ta::placeholder, .inp::placeholder { color: var(--faint); }
.inp { display: block; width: 100%; min-height: 40px; padding: 8px 12px; outline: none;
  border: 1px solid var(--line); border-radius: 3px; background: var(--wash); color: var(--ink);
  font-family: var(--mono); font-size: 13.5px; transition: border-color .25s var(--ease), box-shadow .25s var(--ease); }
.inp:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .13); }
select.inp { cursor: pointer; }
.sel { min-height: 40px; }

/* 操作条 */
.bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 18px 0 4px; }
.hintmsg { color: var(--muted); font-size: 12.5px; }
.hintmsg:empty { display: none; }

/* 输出 */
.out { padding: 14px 16px; min-height: 48px;
  font-family: var(--mono); font-size: 13px; line-height: 1.75; white-space: pre-wrap; word-break: break-word; color: var(--ink); }
.out:empty::before { content: "—"; color: var(--faint); }
pre.out { overflow: auto; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* 表单 */
.formgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field.wide { grid-column: 1 / -1; }
.lb { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.chk { display: flex; align-items: center; gap: 8px; min-height: 40px; font-size: 14px; color: var(--soft); cursor: pointer; }
.chk input { accent-color: var(--accent); width: 16px; height: 16px; }

/* 拖放 */
.drop { border: 1.5px dashed var(--line); border-radius: var(--r); padding: 34px 20px; margin-top: 16px; cursor: pointer;
  transition: border-color .3s var(--ease), background-color .3s var(--ease); background: rgba(var(--ink-rgb), .015); }
.drop:hover, .drop.over { border-color: var(--accent); background: rgba(var(--accent-rgb), .05); }
.drop-in { text-align: center; }
.drop-in b { display: block; font-size: 15px; font-weight: 600; color: var(--ink); }
.drop-in span { display: block; margin-top: 6px; color: var(--muted); font-size: 12.5px; }

/* KV 表 */
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 7px 18px; padding: 14px 16px; margin: 0; }
dl.kv dt { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); align-self: baseline; }
dl.kv dd { margin: 0; color: var(--ink); font-family: var(--mono); font-size: 13px; word-break: break-all; }

/* 指标格 */
.statgrid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px 20px; margin: 16px 0 8px; }
.statgrid .num { font-family: var(--mono); font-size: 18px; line-height: 1.35; color: var(--ink); }
.statgrid .lb { margin-bottom: 2px; }

/* diff */
.diff { font-family: var(--mono); font-size: 12.5px; line-height: 1.7; }
.diff div { padding: 1.5px 16px; white-space: pre-wrap; word-break: break-all; }
.diff .add { background: var(--add-bg); color: var(--add); }
.diff .del { background: var(--del-bg); color: var(--del); text-decoration: line-through; text-decoration-color: rgba(224, 122, 95, .55); }

/* markdown 预览 */
.md-out { padding: 16px 20px; font-size: 14.5px; line-height: 1.9; color: var(--ink); }
.md-out h1, .md-out h2, .md-out h3, .md-out h4 { margin: 18px 0 8px; line-height: 1.4; font-weight: 600; }
.md-out h1 { font-size: 22px; } .md-out h2 { font-size: 19px; } .md-out h3 { font-size: 16.5px; }
.md-out p { margin: 8px 0; }
.md-out ul, .md-out ol { margin: 8px 0 8px 22px; }
.md-out code { font-family: var(--mono); font-size: 12.5px; background: rgba(var(--ink-rgb), .07); border-radius: 2px; padding: 1px 6px; }
.md-out pre { background: rgba(var(--ink-rgb), .05); border: 1px solid var(--line); border-radius: 3px; padding: 12px 14px; overflow: auto; margin: 10px 0; }
.md-out pre code { background: none; padding: 0; }
.md-out blockquote { border-left: 2px solid var(--accent); padding: 2px 0 2px 14px; margin: 10px 0; color: var(--soft); }
.md-out a { color: var(--accent); border-bottom: 1px solid rgba(var(--accent-rgb), .4); }
.md-out hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.md-out img { max-width: 100%; }
.md-out table { border-collapse: collapse; margin: 10px 0; width: 100%; }
.md-out th, .md-out td { border: 1px solid var(--line); padding: 7px 12px; text-align: left; font-size: 13px; }
.md-out th { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: rgba(var(--ink-rgb), .03); }

/* 缩略图 / 进度 / 表格 */
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; padding: 14px 16px; }
.thumb { position: relative; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; background: var(--panel); }
.thumb img { width: 100%; display: block; }
.thumb b { position: absolute; left: 6px; bottom: 6px; font-family: var(--mono); font-size: 9.5px; font-weight: 400;
  background: rgba(var(--bg-rgb), .8); color: var(--ink); padding: 2px 6px; border-radius: 2px; }
.prog { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; margin: 12px 16px; }
.prog i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .25s var(--ease); }
.tblwrap { overflow-x: auto; margin: 10px 0; }
.tblwrap table { border-collapse: collapse; width: 100%; font-size: 13px; }
.tblwrap th, .tblwrap td { border: 1px solid var(--line); padding: 7px 12px; text-align: left; }
.tblwrap th { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 400; }

/* ------------------------------------------------------------ 搜索弹层 */
.modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-start; justify-content: center;
  padding: 14vh 20px 20px; background: rgba(var(--bg-rgb), .72);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.modal[hidden] { display: none; }
.modal-box { width: 100%; max-width: 560px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .5); overflow: hidden; }
#modalq { display: block; width: 100%; border: 0; outline: none; padding: 18px 20px;
  background: transparent; color: var(--ink); font-size: 16px; border-bottom: 1px solid var(--line); }
#modalq::placeholder { color: var(--faint); }
.modal-list { max-height: 46vh; overflow-y: auto; padding: 6px; }
.modal-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%;
  padding: 11px 14px; border-radius: 3px; text-align: left; color: var(--soft); border-left: 2px solid transparent;
  transition: background-color .15s var(--ease), color .15s var(--ease); }
.modal-item span { font-size: 14.5px; color: var(--ink); }
.modal-item i { font-style: normal; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); flex: none; }
.modal-item.on, .modal-item:hover { background: rgba(var(--accent-rgb), .08); color: var(--accent); border-left-color: var(--accent); }
.modal-empty { padding: 26px 20px; color: var(--muted); font-size: 13.5px; text-align: center; }
.modal-tip { padding: 10px 16px; border-top: 1px solid var(--line); color: var(--faint);
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; }

/* ------------------------------------------------------------ Toast */
.toast { position: fixed; left: 50%; bottom: 54px; z-index: 70; transform: translateX(-50%) translateY(16px);
  max-width: 86vw; padding: 10px 20px; border-radius: 3px; border: 1px solid var(--line); background: var(--panel);
  color: var(--ink); font-size: 13.5px; opacity: 0; pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease); white-space: nowrap; }
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { border-color: var(--del); color: var(--del); }

/* ------------------------------------------------------------ 动效进场 */
[data-reveal] { opacity: 0; }
[data-reveal].in { animation: rise .95s var(--ease-out) both; }

/* ------------------------------------------------------------ 响应式 */
@media (max-width: 1050px) {
  .hero-grid { gap: 34px; }
  .hd-in { gap: 16px; }
  .nav { gap: 14px; }
}
@media (max-width: 900px) {
  :root { --gut: 22px; }
  .hd-in { gap: 12px; }
  .brand small { display: none; }
  .nav { margin-left: 0; }
  .searchbtn span, .searchbtn kbd { display: none; }
  .searchbtn { width: 36px; justify-content: center; padding: 0; }
  .hero { padding: 112px 0 72px; min-height: 0; }
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero-visual { order: -1; justify-self: center; max-width: 300px; }
  .scroll-cue { display: none; }
  .tlist { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line-2); }
  .stat:nth-child(3) { padding-left: 0; }
  .sys-secondary { display: none; }
  .sysbar-in { gap: 14px; font-size: 8.5px; }
  .ft-in { grid-template-columns: 1fr; gap: 28px; }
  .ft-links { align-items: flex-start; }
  .ft-meta { flex-direction: column; align-items: flex-start; gap: 6px; }
}
@media (max-width: 640px) {
  .sec { padding-top: 72px; margin-top: 72px; }
  .sec-hd { flex-wrap: wrap; gap: 8px; }
  .sec-note { white-space: normal; flex-basis: 100%; order: 3; }
  .build-row { grid-template-columns: 1fr; gap: 8px; }
  .cols { grid-template-columns: 1fr; }
  .formgrid { grid-template-columns: 1fr; }
  .statgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .findbox { flex-direction: row; }
  .hero-actions .btn { flex: 1; min-width: 140px; }
  .lang-switch { display: none; }
}
@media (max-width: 430px) {
  .hero-title { font-size: 38px; }
  .hero-status { font-size: 9px; letter-spacing: .12em; margin-bottom: 18px; }
  .hero-subtitle { font-size: 14.5px; margin-top: 18px; }
  .scene-hud { font-size: 7.5px; letter-spacing: .12em; }
  .brand { font-size: 15px; gap: 8px; }
  .hd-ops { gap: 8px; }
}

/* ------------------------------------------------------------ 降级 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-reveal], [data-reveal].in, .hero-reveal, .hero-visual { opacity: 1 !important; transform: none !important; animation: none !important; }
}
