/* cockpit-detail.css —— 详情整屏面板（ORD-20261031-225547-9c6bed）。独立文件，不覆盖 cockpit.css。
   手机优先：正文 16px，路径等宽 13px 且只在自身容器里横滑，绝不撑破面板宽度；iPhone 安全区上下都留。 */
.detail {
  position: fixed; inset: 0; z-index: 60;
  background: var(--bg, #0f1115);
  display: flex; flex-direction: column;
  overscroll-behavior: contain;
}
.detail.hidden { display: none !important; }
body.detail-open { overflow: hidden; }

.detail .d-bar {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; gap: 10px;
  padding: calc(8px + env(safe-area-inset-top)) 12px 8px;
  background: var(--bg, #0f1115);
  border-bottom: 1px solid var(--line, #232733);
}
.detail .d-bar button {
  background: none; border: 1px solid var(--line, #232733); color: var(--dim, #9aa1ad);
  font-family: inherit; font-size: 15px; padding: 6px 12px; border-radius: 999px;
}
.detail .d-bar .d-back { color: var(--text, #e6e8ec); }
.detail .d-title { flex: 1; text-align: center; font-size: 15px; font-weight: 600; color: var(--text, #e6e8ec); }

.detail .d-body {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 12px 12px calc(28px + env(safe-area-inset-bottom));
}
.detail .d-block {
  background: var(--card, #171a21); border: 1px solid var(--line, #232733);
  border-radius: 14px; padding: 12px 14px; margin-bottom: 10px;
  max-width: 100%; overflow: hidden;
}
.detail .d-block h3 {
  margin: 0 0 6px; font-size: 13px; font-weight: 600; letter-spacing: .04em;
  color: var(--faint, #6b7280);
}
.detail .d-text {
  font-size: 16px; line-height: 1.6; color: var(--text, #e6e8ec);
  white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere;
}
.detail .d-empty { font-size: 15px; color: var(--faint, #6b7280); }
.detail .d-err {
  font-size: 16px; color: var(--bad, #f85149);
  background: var(--card, #171a21); border: 1px solid var(--line, #232733);
  border-radius: 14px; padding: 14px;
}
.detail .d-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px; color: var(--dim, #9aa1ad); word-break: break-all;
}
.detail .d-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 10px; }
.detail .d-tag {
  font-size: 13px; padding: 2px 9px; border-radius: 999px;
  border: 1px solid var(--line, #232733); color: var(--dim, #9aa1ad);
}
.detail .d-tag.ok { color: var(--ok, #3fb950); border-color: rgba(63,185,80,.4); }
.detail .d-tag.warn { color: var(--warn, #d29922); border-color: rgba(210,153,34,.4); }
.detail .d-tag.bad { color: var(--bad, #f85149); border-color: rgba(248,81,73,.4); }

.detail .d-kv { display: flex; gap: 10px; font-size: 15px; margin-top: 4px; }
.detail .d-k { flex: none; min-width: 4.2em; color: var(--faint, #6b7280); font-size: 14px; }
.detail .d-v { color: var(--text, #e6e8ec); word-break: break-word; overflow-wrap: anywhere; }

/* 路径与单号：等宽小字，横向滑动只在自己这条里，不撑破卡片 */
.detail .d-scroll {
  max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}
.detail .d-mono {
  margin: 0; display: block; white-space: pre;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px; line-height: 1.5; color: var(--dim, #9aa1ad);
}
.detail .d-path { display: inline-block; padding: 3px 0; }

.detail .d-log + .d-log { margin-top: 10px; }
.detail .d-log-meta { font-size: 14px; color: var(--text, #e6e8ec); margin: 2px 0 2px; }
.detail .d-stale { color: var(--warn, #d29922); }

.detail .d-hist {
  border-top: 1px solid var(--line, #232733); padding-top: 8px; margin-top: 8px;
}
.detail .d-hist:first-of-type { border-top: 0; padding-top: 2px; margin-top: 0; }
.detail .d-hist-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.detail .d-hist-head .d-tag { flex: none; }
.detail .d-time { font-size: 13px; color: var(--faint, #6b7280); font-variant-numeric: tabular-nums; }
.detail .d-by { font-size: 12px; color: var(--faint, #6b7280); }
.detail .d-hist-line { display: flex; gap: 8px; font-size: 15px; margin-top: 4px; }
.detail .d-hist-line .d-k { min-width: 3.2em; }
.detail .d-hist-line .d-v { word-break: break-word; overflow-wrap: anywhere; white-space: pre-wrap; }
/* 能点开的行给个右箭头，不然本人不知道能点 */
ul.list li.tappable .right::after { content: ' ›'; color: var(--faint, #6b7280); }
