/* ============================================================================
   tools.susudo.top · 暖象牙白 × 香槟金 高定纯前端仪器台样式系统
   ============================================================================ */
:root {
  --bg: #FAF8F4;
  --bg-soft: #F3EFE7;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-solid: #FFFFFF;
  --ink: #181615;
  --ink-sub: #57514A;
  --ink-muted: #8B8379;
  --gold: #B08954;
  --gold-soft: rgba(176, 137, 84, 0.12);
  --gold-border: rgba(176, 137, 84, 0.34);
  --emerald: #2D8A6B;
  --emerald-soft: rgba(45, 138, 107, 0.11);
  --rose: #C87B8D;
  --rose-soft: rgba(200, 123, 141, 0.12);
  --line: rgba(24, 22, 21, 0.085);
  --line-strong: rgba(24, 22, 21, 0.16);
  --shadow-sm: 0 8px 24px -16px rgba(24, 22, 21, 0.14);
  --shadow-md: 0 22px 54px -26px rgba(24, 22, 21, 0.2);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-serif: "Noto Serif SC", "Cormorant Garamond", Georgia, serif;
  --font-sans: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.65;
}
.mono { font-family: var(--font-mono); }
.serif { font-family: var(--font-serif); }

/* 柔和画廊光晕与瑞士建筑网格 */
.atelier-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(640px 420px at 10% 4%, rgba(176, 137, 84, 0.12), transparent 68%),
    radial-gradient(540px 400px at 92% 16%, rgba(45, 138, 107, 0.07), transparent 66%),
    radial-gradient(580px 440px at 78% 88%, rgba(200, 123, 141, 0.08), transparent 68%);
}
.atelier-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(24, 22, 21, 0.028) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(24, 22, 21, 0.028) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 86% 74% at 50% 24%, #000 35%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 86% 74% at 50% 24%, #000 35%, transparent 100%);
}

/* ==================== 悬浮磨砂顶栏 ==================== */
.top-bar-wrap {
  position: sticky;
  top: 12px;
  z-index: 40;
  max-width: 1320px;
  margin: 12px auto 0;
  padding: 0 18px;
}
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 32px -20px rgba(24, 22, 21, 0.18), inset 0 0 0 1px var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
  flex-shrink: 0;
}
.brand-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--emerald));
  box-shadow: 0 0 0 4px var(--gold-soft);
}
.brand-title {
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.14em;
}
.cmdk-trigger {
  flex: 0 1 320px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink-muted);
  font-family: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.cmdk-trigger:hover {
  border-color: var(--gold-border);
  background: #FFFFFF;
  color: var(--ink);
}
.cmdk-placeholder {
  flex: 1;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cmdk-trigger kbd {
  font-size: 0.66rem;
  padding: 1px 6px;
  border-radius: 6px;
  background: #FFFFFF;
  border: 1px solid var(--line);
  color: var(--ink-sub);
}
.top-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.local-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--emerald-soft);
  color: var(--emerald);
  font-size: 0.7rem;
  font-weight: 500;
  white-space: nowrap;
}
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 3px rgba(45, 138, 107, 0.22);
  animation: pulseDot 2.4s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.22); opacity: 0.72; }
}
.ext-pill {
  text-decoration: none;
  font-size: 0.72rem;
  color: var(--ink);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 4px 11px;
  border-radius: 999px;
  white-space: nowrap;
  transition: all 0.22s var(--ease);
}
.ext-pill:hover {
  background: var(--ink);
  color: #FAF8F4;
  border-color: var(--ink);
}

/* ==================== 移动端横向胶囊快捷栏 ==================== */
.mobile-rail {
  display: none;
}

/* ==================== 主双栏仪器布局 ==================== */
.deck-shell {
  max-width: 1320px;
  margin: 22px auto 0;
  padding: 0 18px 48px;
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.side-nav {
  position: sticky;
  top: 76px;
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 14px 12px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.nav-group-label {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  color: var(--ink-muted);
  padding: 0 10px 4px;
}
.nav-group-items {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.side-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-sub);
  font-family: inherit;
  font-size: 0.82rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.22s var(--ease);
}
.side-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--ink-muted);
  transition: color 0.2s ease;
}
.side-btn:hover {
  background: rgba(24, 22, 21, 0.04);
  color: var(--ink);
}
.side-btn:hover svg { color: var(--gold); }
.side-btn.is-active {
  background: var(--ink);
  color: #FAF8F4;
  box-shadow: 0 10px 22px -14px rgba(24, 22, 21, 0.55);
}
.side-btn.is-active svg { color: #E2BE85; }

/* 工作区切场过渡 */
.workspace {
  min-width: 0;
  transition: opacity 0.2s var(--ease), transform 0.24s var(--ease), filter 0.2s ease;
}
.workspace.is-swapping {
  opacity: 0;
  transform: translateY(8px);
  filter: blur(3px);
}

/* ==================== 概览首页 Dashboard ==================== */
.dash-hero {
  position: relative;
  overflow: hidden;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 32px 34px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.dash-hero-svg {
  position: absolute;
  right: -24px;
  top: -16px;
  width: 340px;
  height: 220px;
  pointer-events: none;
  opacity: 0.85;
}
.dash-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  color: var(--gold);
  margin-bottom: 10px;
}
.dash-title {
  font-family: var(--font-serif);
  font-size: clamp(1.55rem, 2.6vw, 2.2rem);
  font-weight: 600;
  line-height: 1.28;
  margin-bottom: 10px;
  max-width: 620px;
}
.dash-sub {
  font-size: 0.88rem;
  color: var(--ink-sub);
  max-width: 640px;
}
.dash-section {
  margin-bottom: 26px;
}
.dash-sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding: 0 2px;
}
.dash-sec-title {
  font-family: var(--font-serif);
  font-size: 1.08rem;
  font-weight: 600;
}
.dash-sec-meta {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
}
.tool-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.tool-card {
  position: relative;
  width: 100%;
  text-align: left;
  font-family: inherit;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), border-color 0.25s ease, box-shadow 0.3s var(--ease);
  animation: cardIn 0.45s var(--ease) both;
}
.tool-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold-border);
  box-shadow: var(--shadow-md);
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.tc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.tc-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  transition: all 0.25s var(--ease);
}
.tc-icon svg { width: 19px; height: 19px; }
.tool-card:hover .tc-icon {
  background: var(--ink);
  color: #E3C28E;
  border-color: var(--ink);
  transform: rotate(-5deg) scale(1.05);
}
.tc-badge {
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  color: var(--gold);
  background: var(--gold-soft);
  padding: 2px 8px;
  border-radius: 999px;
}
.tc-name {
  font-family: var(--font-serif);
  font-size: 1.04rem;
  font-weight: 600;
  color: var(--ink);
}
.tc-desc {
  font-size: 0.8rem;
  color: var(--ink-sub);
  line-height: 1.55;
}

/* ==================== 单个工具工作区通用框架 ==================== */
.tool-header {
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 20px 24px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  box-shadow: var(--shadow-sm);
}
.th-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.th-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--ink);
  color: #E3C28E;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.th-icon svg { width: 22px; height: 22px; }
.th-title {
  font-family: var(--font-serif);
  font-size: 1.32rem;
  font-weight: 600;
  line-height: 1.25;
}
.th-sub {
  font-size: 0.8rem;
  color: var(--ink-sub);
  margin-top: 2px;
}

.panel-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}
.panel-grid-asym {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 18px;
  align-items: start;
}
.card {
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.card-title {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink-sub);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* 拖拽上传区 */
.dropzone {
  position: relative;
  border: 1.5px dashed var(--gold-border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(250, 248, 244, 0.9), rgba(243, 239, 231, 0.55));
  padding: 26px 18px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}
.dropzone:hover, .dropzone.is-drag {
  border-color: var(--gold);
  background: rgba(176, 137, 84, 0.08);
  transform: translateY(-1px);
}
.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.dz-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  margin-top: 8px;
}
.dz-sub {
  font-size: 0.75rem;
  color: var(--ink-muted);
  margin-top: 4px;
}

/* 表单与按钮控件 */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.field-label { font-size: 0.76rem; color: var(--ink-sub); font-weight: 500; }
.ivory-input, .ivory-select, .ivory-textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.86rem;
  padding: 9px 12px;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.ivory-input:focus, .ivory-select:focus, .ivory-textarea:focus {
  border-color: var(--gold);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px var(--gold-soft);
}
.ivory-textarea {
  resize: vertical;
  min-height: 180px;
  line-height: 1.55;
}
.ivory-range {
  width: 100%;
  accent-color: var(--gold);
  cursor: pointer;
}

.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: #FFFFFF;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.22s var(--ease);
}
.btn:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-1px); }
.btn-primary {
  background: var(--ink);
  color: #FAF8F4;
  border-color: var(--ink);
}
.btn-primary:hover { background: #2D2926; color: #FAF8F4; border-color: #2D2926; }
.btn-gold {
  background: var(--gold);
  color: #FFFFFF;
  border-color: var(--gold);
}
.btn-gold:hover { background: #9B7542; color: #FFFFFF; border-color: #9B7542; }
.btn-sm { height: 30px; padding: 0 11px; font-size: 0.74rem; }

.sub-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  margin-bottom: 16px;
}
.sub-tab {
  height: 30px;
  padding: 0 13px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--ink-sub);
  font-family: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.sub-tab.is-active {
  background: var(--ink);
  color: #FAF8F4;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.stat-box {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}
.stat-k { font-size: 0.68rem; color: var(--ink-muted); }
.stat-v { font-family: var(--font-mono); font-size: 1rem; font-weight: 600; color: var(--ink); margin-top: 2px; }
.stat-v.is-good { color: var(--emerald); }
.stat-v.is-gold { color: var(--gold); }

/* 图片前后对比滑块 */
.compare-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: repeating-conic-gradient(#EFECE5 0% 25%, #FAF8F4 0% 50%) 50% / 18px 18px;
  border: 1px solid var(--line);
  user-select: none;
}
.compare-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}
.compare-after-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  clip-path: inset(0 0 0 50%);
}
.compare-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: var(--gold);
  box-shadow: 0 0 10px rgba(24, 22, 21, 0.35);
  pointer-events: none;
}
.compare-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 2px solid var(--gold);
  color: var(--ink);
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(24, 22, 21, 0.25);
}
.compare-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
  z-index: 3;
}
.compare-tag {
  position: absolute;
  top: 10px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(24, 22, 21, 0.72);
  color: #FAF8F4;
  font-size: 0.68rem;
  z-index: 2;
  pointer-events: none;
}
.compare-tag.left { left: 10px; }
.compare-tag.right { right: 10px; }

/* 队列与预览列表 */
.file-queue { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; max-height: 280px; overflow-y: auto; }
.fq-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: border-color 0.2s ease;
}
.fq-row.is-active { border-color: var(--gold); background: #FFFFFF; }
.fq-name { font-size: 0.8rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.fq-meta { font-size: 0.72rem; color: var(--ink-muted); }

/* 样机预览画布 */
.canvas-stage {
  width: 100%;
  min-height: 280px;
  border-radius: var(--radius-md);
  background: repeating-conic-gradient(#EFECE5 0% 25%, #FAF8F4 0% 50%) 50% / 16px 16px;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  overflow: hidden;
}
.canvas-stage canvas, .canvas-stage img {
  max-width: 100%;
  max-height: 460px;
  height: auto;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

/* 调色板色卡 */
.swatch-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.swatch-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #FFFFFF;
  cursor: pointer;
  transition: transform 0.22s var(--ease), box-shadow 0.22s ease;
}
.swatch-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.swatch-color { height: 74px; width: 100%; }
.swatch-info { padding: 8px 10px; font-size: 0.74rem; }

/* 代码与 JSON 高亮 */
.code-view {
  background: #1C1A18;
  color: #F4EFE7;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.6;
  overflow: auto;
  max-height: 420px;
  white-space: pre;
}
.jk { color: #E2BE85; }
.js { color: #8ED4B5; }
.jn { color: #E8A6B8; }
.jb { color: #9CC7F5; }
.jnull { color: #A69D94; }

.err-banner {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--rose-soft);
  border: 1px solid rgba(200, 123, 141, 0.35);
  color: #8E374B;
  font-size: 0.8rem;
  margin-top: 10px;
}

/* 二维码预览框 */
.qr-preview-box {
  width: 100%;
  max-width: 310px;
  margin: 0 auto 14px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: #FFFFFF;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.qr-preview-box svg { width: 100%; height: auto; display: block; border-radius: 10px; }

/* 硬件色环电阻 & 32 位寄存器 */
.resistor-stage {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  text-align: center;
  margin-bottom: 16px;
}
.resistor-svg { width: 100%; max-width: 440px; height: auto; display: block; margin: 0 auto; }
.resistor-readout {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--ink);
  margin-top: 8px;
}
.band-selectors {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}
.bit-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}
.bit-cell {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg);
  padding: 6px 2px;
  text-align: center;
  cursor: pointer;
  transition: all 0.16s ease;
}
.bit-cell.is-on {
  background: var(--ink);
  border-color: var(--ink);
  color: #E3C28E;
}
.bit-idx { font-size: 0.58rem; opacity: 0.65; display: block; }
.bit-val { font-size: 0.85rem; font-weight: 600; }

.hash-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--line);
  margin-bottom: 8px;
}
.hash-val {
  font-size: 0.76rem;
  word-break: break-all;
  color: var(--ink);
}

/* ==================== ⌘K 命令面板 ==================== */
.cmdk-mask {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(24, 22, 21, 0.36);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 16px 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.24s var(--ease), visibility 0.24s var(--ease);
}
.cmdk-mask.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
.cmdk-dialog {
  width: 100%;
  max-width: 560px;
  background: #FAF8F4;
  border: 1px solid #FFFFFF;
  border-radius: var(--radius-xl);
  box-shadow: 0 30px 70px -22px rgba(24, 22, 21, 0.35);
  overflow: hidden;
  transform: translateY(-10px) scale(0.97);
  transition: transform 0.28s var(--ease);
}
.cmdk-mask.is-open .cmdk-dialog { transform: translateY(0) scale(1); }
.cmdk-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: #FFFFFF;
  border-bottom: 1px solid var(--line);
  color: var(--ink-muted);
}
.cmdk-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--ink);
}
.cmdk-esc {
  font-size: 0.66rem;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink-sub);
  cursor: pointer;
}
.cmdk-list { max-height: 360px; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.cmdk-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: none;
  background: transparent;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.16s ease;
}
.cmdk-item:hover, .cmdk-item.is-selected { background: rgba(176, 137, 84, 0.12); }
.cmdk-item-l { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cmdk-item-l svg { width: 17px; height: 17px; color: var(--gold); flex-shrink: 0; }
.cmdk-item-name { font-size: 0.86rem; font-weight: 500; color: var(--ink); }
.cmdk-item-desc { font-size: 0.72rem; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 310px; }

/* 页脚与 Toast */
.site-footer {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 18px 28px;
}
.footer-inner {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.76rem;
  color: var(--ink-muted);
}
.footer-links { display: inline-flex; align-items: center; gap: 8px; }
.footer-links a { color: var(--ink-sub); text-decoration: none; }
.footer-links a:hover { color: var(--gold); }

.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  z-index: 120;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: #FAF8F4;
  font-size: 0.8rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.26s var(--ease);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ==================== 响应式双端深度适配 ==================== */
@media (max-width: 980px) {
  .deck-shell { grid-template-columns: 1fr; padding: 0 14px 40px; }
  .side-nav { display: none; }
  .mobile-rail {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 12px 14px 2px;
    max-width: 100%;
  }
  .mobile-rail::-webkit-scrollbar { display: none; }
  .rail-pill {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #FFFFFF;
    color: var(--ink-sub);
    font-family: inherit;
    font-size: 0.76rem;
    cursor: pointer;
    white-space: nowrap;
  }
  .rail-pill svg { width: 14px; height: 14px; }
  .rail-pill.is-active { background: var(--ink); color: #FAF8F4; border-color: var(--ink); }
  .rail-pill.is-active svg { color: #E3C28E; }
  .panel-grid-2, .panel-grid-asym { grid-template-columns: 1fr; }
}

@media (max-width: 768px), (hover: none) and (pointer: coarse) {
  .ivory-input, .ivory-select, .ivory-textarea, .cmdk-input { font-size: 16px; }
}

@media (max-width: 680px) {
  .top-bar-wrap { padding: 0 12px; }
  .top-bar { padding: 8px 12px; gap: 8px; }
  .brand-title { font-size: 0.68rem; letter-spacing: 0.09em; }
  .local-pill, .cmdk-trigger kbd { display: none; }
  .cmdk-trigger { flex: 1; min-width: 0; padding: 0 10px; }
  .ext-pill { font-size: 0.68rem; padding: 4px 9px; }
  .dash-hero { padding: 22px 18px; }
  .dash-hero-svg { opacity: 0.35; width: 220px; }
  .tool-cards-grid { grid-template-columns: 1fr; }
  .tool-header { padding: 16px; }
  .card { padding: 16px; }
  .stat-strip { grid-template-columns: 1fr; }
  .swatch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bit-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 480px) {
  .cmdk-trigger { flex: 0 0 34px; width: 34px; padding: 0; justify-content: center; }
  .cmdk-placeholder { display: none; }
}
