.m-live { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px; border-radius: 999px;
  background: var(--t50); color: var(--t800); box-shadow: inset 0 0 0 1px var(--t200); font-size: 12px; font-weight: 500;
  white-space: nowrap; }
.m-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--t500); animation: m-pulse 2s ease-in-out infinite; }
.m-live .m-ago { color: var(--t700); font-weight: 400; font-variant-numeric: tabular-nums; }
@keyframes m-pulse { 50% { opacity: .3; } }
.work-sub .nb { white-space: nowrap; }
.work-sub b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.m-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.m-tools .seg button { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.m-n { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: rgba(14, 26, 43, 0.06); color: var(--muted); font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.m-tools .seg button[aria-pressed="true"] .m-n { background: var(--t50); color: var(--t800); }
.m-tools .lib-search { flex: 1 1 260px; max-width: 420px; }
.m-kbd { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); min-width: 20px; height: 20px; padding: 0 5px;
  display: grid; place-items: center; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--line); color: var(--dim);
  font-family: var(--font-mono); font-size: 11px; pointer-events: none; }
.m-card { margin-top: 14px; overflow: hidden; container: mtbl / inline-size; }
.m-tbl th, .m-tbl td { padding-left: 12px; padding-right: 12px; white-space: nowrap; }
.m-tbl td { vertical-align: middle; }
.m-tbl tbody tr { cursor: pointer; }
.m-tbl tbody tr:focus-visible { outline: 2px solid var(--text); outline-offset: -2px; }
.m-tbl tbody tr.is-open > td { background: var(--t50); }
.m-tbl tbody tr.is-gone { opacity: .45; }
.m-tbl th.sort { cursor: pointer; user-select: none; }
.m-tbl th.sort:hover { color: var(--text); }
.m-tbl th .m-arrow { display: inline-block; width: 10px; margin-left: 3px; color: var(--t700); }
.m-name { display: flex; align-items: center; gap: 11px; min-width: 0; }
.m-ico { flex: 0 0 auto; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px;
  background: var(--bg-soft); color: var(--muted); }
.m-ico svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.m-name b, .c-type b { display: block; font-weight: 600; font-size: 13.5px; }
.c-type b { font-weight: 500; font-size: 13px; }
.m-name small, .c-type small { display: block; margin-top: 2px; color: var(--dim); font-size: 12px; }
.m-x-type, .m-x-start, .m-x-gpu { display: none; }
.m-tbl td.c-name small { white-space: normal; }
.m-meter { display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.m-bar { position: relative; flex: 0 0 auto; width: 44px; height: 5px; border-radius: 3px; background: rgba(14, 26, 43, 0.08); overflow: hidden; }
.m-bar.gpu { width: 32px; }
.m-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 3px; background: var(--t500); transition: width .6s var(--ease-out); }
.m-bar.mem i { background: #5B86E5; }
.m-bar.gpu i { background: #8A6CD8; }
.m-of { color: var(--dim); }
.m-dash { color: var(--dim); }
.m-empty td { padding: 34px 16px; text-align: center; color: var(--dim); cursor: default; white-space: normal; }

@container mtbl (max-width: 899px) {
  .m-tbl .c-start { display: none; }
  .m-x-start { display: inline; }
  .m-bar.gpu { display: none; }
}
@container mtbl (max-width: 759px) {
  .m-tbl .c-type, .m-tbl .c-gpu { display: none; }
  .m-x-type, .m-x-gpu { display: inline; }
}
@container mtbl (max-width: 599px) {
  .m-tbl, .m-tbl tbody { display: block; }
  .m-tbl thead { display: none; }
  .m-tbl tbody tr { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "name name" "cpu mem"; gap: 10px 14px; padding: 13px 14px; border-bottom: 1px solid var(--line-soft); }
  .m-tbl tbody tr:last-child { border-bottom: 0; }
  .m-tbl td { display: block; padding: 0; border: 0; white-space: normal; }
  .m-tbl td.c-name { grid-area: name; min-width: 0; }
  .m-tbl td.c-state { position: absolute; top: 12px; right: 14px; }
  .m-tbl td.c-cpu { grid-area: cpu; }
  .m-tbl td.c-mem { grid-area: mem; justify-self: end; }
  .m-ico { display: none; }
  .m-name b { padding-right: 92px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .m-name > span { min-width: 0; }
  .m-bar { width: 40px; }
}
.m-scrim { position: fixed; inset: 0; z-index: 90; background: rgba(14, 26, 43, 0.16); animation: fade-in .2s ease-out both; }
.m-scrim[hidden], .m-drawer[hidden] { display: none; }
.m-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 91; display: flex; flex-direction: column;
  width: min(700px, calc(100vw / var(--ui-scale, 1))); background: var(--bg-raised);
  box-shadow: -1px 0 0 var(--line-soft), -28px 0 64px -32px rgba(14, 26, 43, 0.5); animation: m-in .3s var(--ease-out) both; }
@keyframes m-in { from { transform: translateX(28px); opacity: 0; } }
.d-head { padding: 20px 24px 0; }
.d-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.d-kind { font-size: 12px; font-weight: 500; color: var(--dim); }
.d-x { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--r-ctl);
  background: var(--bg-raised); color: var(--muted); font-size: 19px; line-height: 1; cursor: pointer; }
.d-x:hover { color: var(--text); background: #FBFCFC; }
.d-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 6px; }
.d-title h2 { margin: 0; font-family: var(--font-display); font-size: 21px; font-weight: 600; letter-spacing: -0.015em; }
.d-title .tag { font-variant-numeric: tabular-nums; }
.d-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.d-chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 7px;
  background: var(--bg-soft); color: var(--muted); font-size: 12px; white-space: nowrap; }
.d-chip.mono { font-family: var(--font-mono); font-size: 11.5px; }
a.d-chip { color: var(--t800); background: var(--t50); text-decoration: none; box-shadow: inset 0 0 0 1px var(--t200); }
a.d-chip:hover { background: var(--t100); }
.d-copy { border: 0; padding: 0; background: none; color: var(--dim); cursor: pointer; font-size: 11.5px; }
.d-copy:hover { color: var(--text); }
.d-tl { margin-top: 18px; padding: 16px 18px 14px; border-radius: var(--r-card); box-shadow: var(--sh-card); }
.d-tl-row { display: grid; grid-template-columns: 1fr 1fr minmax(0, 2.4fr); align-items: end; }
.d-step { position: relative; }
.d-step .k { font-size: 12px; color: var(--dim); }
.d-step .t { margin-top: 26px; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--muted); }
.d-track { position: absolute; left: 0; right: 0; top: 24px; height: 4px; border-radius: 2px; background: rgba(14, 26, 43, 0.08); }
.d-step::before { content: ""; position: absolute; left: 0; top: 18px; width: 2px; height: 16px; border-radius: 1px; background: var(--muted); z-index: 1; }
.d-step.is-wait::before { background: rgba(14, 26, 43, 0.25); }
.d-dur { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); padding: 0 6px; background: var(--bg-raised);
  font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; z-index: 1; white-space: nowrap; }
.d-run { position: relative; height: 60px; }
.d-run .d-track { background: linear-gradient(90deg, var(--t200), var(--t300)); }
.d-run.is-wait .d-track { background: repeating-linear-gradient(90deg, rgba(14, 26, 43, 0.14) 0 6px, transparent 6px 11px); }
.d-run.is-done .d-track { background: rgba(14, 26, 43, 0.16); }
.d-pill { position: absolute; right: 0; top: 13px; display: inline-flex; align-items: center; gap: 6px; height: 24px;
  padding: 0 10px; border-radius: 999px; background: var(--t50); color: var(--t800); box-shadow: inset 0 0 0 1px var(--t200);
  font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; z-index: 1; }
.d-run.is-wait .d-pill { background: var(--a50); color: var(--amber); box-shadow: inset 0 0 0 1px rgba(150, 101, 10, 0.2); }
.d-run.is-done .d-pill { background: var(--bg-soft); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-soft); }
.d-pill .spin { width: 10px; height: 10px; border-radius: 50%; border: 1.6px solid currentColor; border-right-color: transparent;
  animation: m-spin 1s linear infinite; }
.d-run.is-done .d-pill .spin { display: none; }
@keyframes m-spin { to { transform: rotate(360deg); } }
.d-tabs { margin: 18px 24px 0; }
.d-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 16px 24px 28px; }
.d-pane[hidden] { display: none; }
.d-pane[data-pane="logs"] .lv-scroll { max-height: min(calc(var(--vh, 1vh) * 0.52), 560px); }
.d-chart { margin-bottom: 18px; }
.d-chart-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.d-chart-h b { font-size: 13px; font-weight: 600; }
.d-chart-h span { font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; }
.d-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.d-chart .grid { stroke: rgba(14, 26, 43, 0.07); stroke-width: 1; }
.d-chart .lim { stroke: rgba(14, 26, 43, 0.4); stroke-width: 1; stroke-dasharray: 3 3; }
.d-chart .ax { fill: var(--dim); font-size: 10.5px; font-family: var(--font-ui); }
.d-chart .hover-l { stroke: rgba(14, 26, 43, 0.35); stroke-width: 1; }
.d-chart .tip { fill: var(--text); font-size: 11px; font-weight: 600; font-family: var(--font-ui); }
.d-note { margin: 0; font-size: 12.5px; color: var(--dim); }
.d-dl { margin: 0; display: grid; grid-template-columns: 180px minmax(0, 1fr); border-radius: var(--r-card); box-shadow: var(--sh-card); overflow: hidden; }
.d-dl dt, .d-dl dd { margin: 0; padding: 11px 16px; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.d-dl dt { color: var(--dim); }
.d-dl dd { font-variant-numeric: tabular-nums; }
.d-dl dd a { color: var(--t800); }
.d-dl dt:last-of-type, .d-dl dd:last-of-type { border-bottom: 0; }
.d-ev { list-style: none; margin: 0; padding: 0; border-radius: var(--r-card); box-shadow: var(--sh-card); overflow: hidden; }
.d-ev li { display: grid; grid-template-columns: 22px 92px minmax(0, 1fr); gap: 4px 10px; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.d-ev li:last-child { border-bottom: 0; }
.d-ev .dot { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--t500); }
.d-ev .dot.warn { background: #D4A133; }
.d-ev .dot.end { background: rgba(14, 26, 43, 0.35); }
.d-ev .t { color: var(--dim); font-variant-numeric: tabular-nums; }
.d-ev b { font-weight: 600; }
.d-ev p { margin: 2px 0 0; color: var(--muted); }

@media (max-width: 560px) {
  .d-tl { padding: 12px 14px; }
  .d-tl-row { grid-template-columns: 1fr; row-gap: 7px; }
  .d-step { display: flex; align-items: center; gap: 10px; min-height: 24px; }
  .d-step::before, .d-step .d-track, .d-dur { display: none; }
  .d-step .k { flex: 0 0 76px; }
  .d-step .t { margin-top: 0; order: 1; }
  .d-run { height: auto; }
  .d-pill { position: static; order: 2; margin-left: auto; }
  .d-head { padding: 16px 16px 0; }
  .d-tabs { margin: 16px 16px 0; }
  .d-body { padding: 14px 16px 24px; }
  .d-dl { grid-template-columns: 120px minmax(0, 1fr); }
}
