/* 验机工具群共享样式：hub、工具页骨架、全屏与降级模式 */
.dvt { padding: 26px 0 56px; }
.dvt-crumb { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; margin-bottom: 14px; }
.dvt-crumb a:hover { color: var(--brand-blue-strong); }

.dvt-hero { max-width: 720px; }
.dvt-eyebrow, .dvt-hub-hero .dvt-eyebrow { margin: 0 0 8px; color: var(--brand-blue-strong); font-size: 11px; font-weight: 780; letter-spacing: .14em; }
.dvt-hero h1 { margin: 0 0 12px; font-size: clamp(26px, 3.4vw, 40px); line-height: 1.12; }
.dvt-lead { margin: 0; color: var(--text); font-size: 15px; line-height: 1.7; }
.dvt-meta { margin: 10px 0 0; color: var(--muted); font-size: 11px; font-weight: 620; letter-spacing: .04em; }

.dvt-btn {
  min-height: 44px; padding: 0 22px; border: 1px solid var(--brand-blue); border-radius: 8px;
  background: var(--brand-blue); color: #fff; font-size: 14px; font-weight: 700; cursor: pointer;
}
.dvt-btn:hover { background: var(--brand-blue-strong); }
.dvt-btn-ghost { border-color: var(--line); background: var(--surface); color: var(--ink); }
.dvt-btn-ghost:hover { border-color: var(--brand-blue); color: var(--brand-blue-strong); background: var(--brand-blue-wash); }

/* hub */
.dvt-flow { margin: 30px 0 8px; }
.dvt-flow h2, .dvt-faq h2, .dvt-siblings h2, .dvt-tips h2 { margin: 0 0 14px; font-size: 19px; }
.dvt-flow ol { display: flex; flex-wrap: wrap; gap: 10px 26px; margin: 0; padding: 0; list-style: none; counter-reset: flow; }
.dvt-flow li { counter-increment: flow; display: flex; align-items: baseline; gap: 8px; font-size: 13px; }
.dvt-flow li::before { content: counter(flow); display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--brand-blue-soft); color: var(--brand-blue-strong); font-size: 11px; font-weight: 760; }
.dvt-flow a { color: var(--brand-blue-strong); border-bottom: 1px solid transparent; }
.dvt-flow a:hover { border-bottom-color: var(--brand-blue); }

.dvt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin: 22px 0 40px; }
.dvt-card { display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; gap: 4px 14px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); transition: border-color .15s ease, box-shadow .15s ease; }
.dvt-card:hover { border-color: var(--brand-blue); box-shadow: 0 10px 30px rgb(8 120 232 / .10); }
.dvt-card-icon { grid-row: span 2; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; background: var(--brand-blue-wash); color: var(--brand-blue-strong); }
.dvt-card-icon svg { width: 24px; height: 24px; }
.dvt-card-body b { display: block; font-size: 15px; }
.dvt-card-body span { display: block; margin-top: 3px; color: var(--text); font-size: 12px; line-height: 1.55; }
.dvt-card-tag { grid-column: 2; margin-top: 8px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .05em; }

/* FAQ + tips + 互链 */
.dvt-faq, .dvt-tips { max-width: 860px; margin-top: 38px; }
.dvt-tips ul { margin: 0; padding-left: 20px; color: var(--text); font-size: 13px; line-height: 1.75; }
.dvt-tips li + li { margin-top: 6px; }
.dvt-qa { border-bottom: 1px solid var(--line); }
.dvt-qa summary { cursor: pointer; padding: 13px 4px; font-size: 14px; font-weight: 650; list-style: none; }
.dvt-qa summary::-webkit-details-marker { display: none; }
.dvt-qa summary::after { content: "+"; float: right; color: var(--brand-blue); font-weight: 700; }
.dvt-qa[open] summary::after { content: "–"; }
.dvt-qa p { margin: 0 0 14px; padding: 0 4px; color: var(--text); font-size: 13px; line-height: 1.7; }

.dvt-siblings { margin-top: 38px; }
.dvt-siblings ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.dvt-siblings a { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; }
.dvt-siblings a:hover { border-color: var(--brand-blue); }
.dvt-siblings a span { color: var(--muted); font-size: 10px; white-space: nowrap; }

/* 全屏与 iOS 降级 */
.dvt-lock { overflow: hidden; }
.dvt-fs-fallback { position: fixed !important; inset: 0 !important; z-index: 300; width: 100vw !important; height: 100dvh !important; border-radius: 0 !important; }
.dpt-stage:fullscreen, .drr-stage:fullscreen { border-radius: 0; }

/* 坏点测试 */
.dpt-stage { position: relative; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--soft); }
.dpt-idle { display: grid; place-items: center; gap: 18px; min-height: 300px; padding: 40px 20px; }
.dpt-swatches { display: grid; grid-template-columns: repeat(8, 26px); gap: 6px; }
.dpt-swatches span { height: 26px; border-radius: 6px; }
.dpt-hint { margin: 0; color: var(--muted); font-size: 12px; text-align: center; }
.dpt-stage[data-run] .dpt-idle { display: none; }
.dpt-hud { position: absolute; left: 18px; bottom: 16px; display: flex; align-items: baseline; gap: 14px; padding: 8px 14px; border-radius: 9px; background: rgb(20 26 33 / .55); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); pointer-events: none; }
.dpt-hud-name { font-size: 15px; font-weight: 750; }
.dpt-hud-step { font-size: 11px; font-variant-numeric: tabular-nums; opacity: .85; }
.dpt-hud-keys { font-size: 10px; opacity: .8; }
.dpt-exit, .drr-exit { position: absolute; top: 16px; right: 16px; z-index: 2; min-height: 38px; padding: 0 16px; border: 0; border-radius: 9px; background: rgb(20 26 33 / .55); color: #fff; font-size: 12px; font-weight: 700; cursor: pointer; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }

/* 刷新率 */
.drr-panel { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-bottom: 16px; }
.drr-result { display: flex; align-items: baseline; gap: 10px; }
.drr-result b { font-size: 34px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.drr-conf { font-size: 11px; font-weight: 700; }
.drr-conf[data-level="high"] { color: var(--down); }
.drr-conf[data-level="mid"] { color: #b45309; }
.drr-conf[data-level="low"] { color: var(--up); }
.drr-note { margin: 0; color: var(--muted); font-size: 12px; }
.drr-stage { position: relative; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #10151b; }
.drr-canvas { display: block; width: 100%; height: 300px; }
.dvt-fs-fallback .drr-canvas, .drr-stage:fullscreen .drr-canvas { height: 100vh; height: 100dvh; }
.drr-actions { position: absolute; right: 14px; bottom: 14px; display: flex; gap: 10px; }
.drr-actions .dvt-btn { min-height: 36px; padding: 0 14px; font-size: 12px; }
.drr-hud { position: absolute; left: 14px; bottom: 14px; display: flex; align-items: baseline; gap: 12px; padding: 7px 12px; border-radius: 8px; background: rgb(255 255 255 / .12); color: #fff; font-size: 11px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); pointer-events: none; }

/* 键盘 */
.dkb-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 14px; }
.dkb-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.dkb-toggle button { min-height: 34px; padding: 0 14px; border: 0; background: var(--surface); font-size: 12px; font-weight: 680; cursor: pointer; }
.dkb-toggle button[aria-pressed="true"] { background: var(--brand-blue); color: #fff; }
.dkb-readout { display: flex; align-items: baseline; gap: 8px; margin-left: auto; }
.dkb-readout [data-dkb-count] { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.dkb-readout-label, .dkb-last { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.dkb-reset { min-height: 34px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 12px; font-weight: 680; cursor: pointer; }
.dkb-reset:hover { border-color: var(--brand-blue); color: var(--brand-blue-strong); }
.dkb-zone { position: relative; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--soft); overflow-x: auto; }
.dkb-zone[data-active] { border-color: var(--brand-blue); background: #fbfdff; }
.dkb-idle { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; border-radius: 13px; background: rgb(245 247 249 / .82); color: var(--text); font-size: 13px; font-weight: 650; cursor: pointer; backdrop-filter: blur(1.5px); -webkit-backdrop-filter: blur(1.5px); }
.dkb-board { min-width: 700px; }
.dkb-flex { display: flex; gap: 20px; align-items: flex-start; }
.dkb-flex > div:first-child { flex: 1 1 auto; }
.dkb-nav { flex: 0 0 auto; }
.dkb-numpad { flex: 0 0 auto; display: grid; grid-template-columns: repeat(4, minmax(38px, 1fr)); grid-auto-rows: 36px; gap: 4px; align-content: start; }
.dkb-empty { visibility: hidden; }
.dkb-row { display: flex; gap: 4px; margin-bottom: 4px; }
.dkb-gap { flex: 0 0 18px; }
.dkb-key { flex: 1 1 0; display: grid; place-items: center; min-height: 38px; padding: 0 2px; border: 1px solid #c6d0da; border-radius: 6px; background: var(--surface); color: var(--ink); font-size: 10.5px; font-weight: 640; text-align: center; line-height: 1.1; user-select: none; }
.dkb-key[data-w="15"] { flex-grow: 1.5; }
.dkb-key[data-w="175"] { flex-grow: 1.75; }
.dkb-key[data-w="2"] { flex-grow: 2; }
.dkb-key[data-w="225"] { flex-grow: 2.25; }
.dkb-key[data-w="275"] { flex-grow: 2.75; }
.dkb-key[data-w="625"] { flex-grow: 6.25; }
.dkb-key.is-tested { border-color: var(--brand-blue); background: var(--brand-blue-soft); }
.dkb-key.is-down { border-color: var(--brand-blue-strong); background: var(--brand-blue); color: #fff; }
.dkb-key.is-chatter { border-color: var(--up); background: #fdecef; }
.dkb-hint { color: var(--up); font-weight: 650; text-align: left; }

/* 鼠标 */
.dms-zone { display: grid; place-content: center; gap: 6px; min-height: 220px; padding: 24px; border: 1.5px dashed var(--line); border-radius: 14px; background: var(--soft); text-align: center; cursor: crosshair; user-select: none; }
.dms-zone p { margin: 0; font-size: 14px; font-weight: 650; }
.dms-zone-sub { color: var(--muted) !important; font-size: 12px !important; font-weight: 500 !important; }
.dms-stats { margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.dms-row { display: grid; grid-template-columns: 90px 1fr 1.2fr 1.2fr 1.4fr; align-items: center; gap: 8px; padding: 10px 16px; font-size: 12px; }
.dms-row + .dms-row { border-top: 1px solid var(--line); }
.dms-row b { font-size: 12.5px; }
.dms-row span, .dms-row em { color: var(--text); font-style: normal; font-variant-numeric: tabular-nums; }
.dms-row em { color: var(--up); font-size: 11px; font-weight: 700; }
.dms-actions { margin-top: 12px; }

/* 麦克风 */
.dmc-start { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.dmc-priv { margin: 0; color: var(--muted); font-size: 12px; }
.dmc-live { margin-top: 18px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; }
.dmc-meter { display: grid; grid-template-columns: 76px 1fr; align-items: center; gap: 12px; margin-bottom: 12px; }
.dmc-meter-label { color: var(--muted); font-size: 11px; font-weight: 700; }
.dmc-bar { height: 14px; border-radius: 7px; background: var(--soft); overflow: hidden; }
.dmc-bar i { display: block; width: 0; height: 100%; border-radius: 7px; background: linear-gradient(90deg, var(--brand-blue), #22c55e 60%, #f59e0b 85%, #ef4444); transition: width .06s linear; }
.dmc-wave { display: block; width: 100%; height: 96px; border-radius: 10px; background: #10151b; }
.dmc-rec { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.dmc-rectime { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.dmc-err { margin-top: 18px; padding: 16px 18px; border: 1px solid #f3c4cb; border-radius: 12px; background: #fdf3f4; }
.dmc-err b { font-size: 13.5px; }
.dmc-err ol { margin: 10px 0 14px; padding-left: 20px; color: var(--text); font-size: 12.5px; line-height: 1.7; }

/* 电源 */
.dpsu-form { display: grid; gap: 14px; }
.dpsu-field { display: grid; gap: 6px; max-width: 520px; }
.dpsu-field label { font-size: 12px; font-weight: 700; }
.dpsu-field input, .dpsu-grid input {
  min-height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--ink); font-size: 13px;
}
.dpsu-combo { position: relative; }
.dpsu-combo > input { width: 100%; padding-right: 30px; }
.dpsu-caret {
  position: absolute; top: 50%; right: 9px; width: 14px; height: 14px;
  transform: translateY(-50%); color: var(--muted); pointer-events: auto; cursor: pointer;
}
.dpsu-list {
  position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; right: 0;
  max-height: min(320px, 46vh); overflow-y: auto; overscroll-behavior: contain;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  box-shadow: 0 12px 32px rgba(15, 35, 60, .14);
}
.dpsu-group {
  padding: 8px 12px 4px; font-size: 10.5px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); position: sticky; top: 0; background: var(--surface);
}
.dpsu-opt {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 8px 12px; font-size: 13px; cursor: pointer;
}
.dpsu-opt-w { color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dpsu-opt.is-active { background: var(--brand-blue-wash); }
.dpsu-opt.is-selected { font-weight: 700; }
.dpsu-opt.is-selected::before { content: "✓"; margin-right: 6px; color: var(--brand-blue); }
.dpsu-custom { border-top: 1px solid var(--line); color: var(--brand-blue-strong); font-weight: 700; }
.dpsu-empty { padding: 12px; font-size: 12px; color: var(--muted); }
.dpsu-grid { display: grid; grid-template-columns: repeat(4, minmax(110px, 1fr)); gap: 12px; max-width: 640px; }
.dpsu-grid label { display: grid; gap: 6px; font-size: 12px; font-weight: 700; }
.dpsu-oc { display: flex !important; align-items: center; gap: 8px; align-self: end; min-height: 40px; }
.dpsu-oc input { min-height: 0; width: 16px; height: 16px; accent-color: var(--brand-blue); }
.dpsu-out { margin-top: 20px; }
.dpsu-table { width: 100%; max-width: 640px; border-collapse: collapse; font-size: 13px; }
.dpsu-table td, .dpsu-table th { padding: 8px 4px; border-bottom: 1px solid var(--line); text-align: left; font-weight: 500; }
.dpsu-table td:last-child, .dpsu-table th:last-child { text-align: right; }
.dpsu-table tfoot th, .dpsu-table tfoot td { border-bottom: 0; font-size: 14px; }
.dpsu-rec { display: flex; align-items: baseline; gap: 14px; margin-top: 16px; padding: 14px 18px; border: 1px solid var(--brand-blue); border-radius: 12px; background: var(--brand-blue-wash); max-width: 640px; }
.dpsu-rec p { margin: 0; font-size: 12px; font-weight: 700; color: var(--brand-blue-strong); }
.dpsu-rec b { font-size: 30px; font-variant-numeric: tabular-nums; }
.dpsu-recnote { color: var(--muted); font-size: 11px; }

@media (max-width: 700px) {
  .dvt { padding-top: 18px; }
  .dvt-grid { grid-template-columns: 1fr; }
  .dpsu-grid { grid-template-columns: repeat(2, 1fr); }
  .dms-row { grid-template-columns: 64px 1fr 1.1fr 1.1fr 1.3fr; padding: 9px 12px; }
  .dkb-readout { margin-left: 0; }
  .drr-canvas { height: 220px; }
}
