:root {
  color-scheme: light;
  --ink: #202630;
  --muted: #576575;
  --line: #d7dfe5;
  --paper: #fff;
  --base: #f6f8f9;
  --brand: #a92940;
  --mint: #167455;
  --soft: #edf2f4;
  font: 100%/1.5 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--base);
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
}
button:focus-visible,
input:focus-visible {
  outline: 3px solid #307ea4;
  outline-offset: 3px;
}
button:disabled {
  cursor: wait;
  opacity: 0.65;
}
.wrap {
  width: min(1140px, 100% - 3rem);
  margin: auto;
}
.top {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.mast,
.brand,
.top-actions,
.tabs,
.card-head,
.card-foot,
.detail-head,
.row,
.meta {
  display: flex;
  align-items: center;
}
.mast {
  justify-content: space-between;
  min-height: 68px;
  gap: 1rem;
}
.brand {
  gap: 0.7rem;
  font-weight: 690;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.brand img {
  width: 34px;
  height: 34px;
}
.top-actions {
  gap: 1.2rem;
  font-size: 0.875rem;
}
.text {
  background: none;
  border: 0;
  color: var(--muted);
  padding: 0.4rem 0;
}
.text:hover {
  color: var(--brand);
  text-decoration: underline;
}
#connection {
  color: var(--muted);
}
#connection.online::before {
  content: "";
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--mint);
  margin-right: 0.4rem;
}
main.wrap {
  padding: clamp(1.7rem, 4vw, 3.5rem) 0 4rem;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(2rem, 4vw, 3.15rem);
  letter-spacing: -0.05em;
  line-height: 1.15;
}
h2 {
  font-size: 1.27rem;
  line-height: 1.3;
  letter-spacing: -0.025em;
}
h3 {
  font-size: 1.05rem;
  line-height: 1.35;
  letter-spacing: -0.012em;
}
.sub,
.when,
.msg,
.caption,
.eyebrow,
.empty {
  color: var(--muted);
}
.tabs {
  gap: 1.4rem;
  border-bottom: 1px solid var(--line);
  margin: 1.6rem 0;
}
.tabs button {
  border: 0;
  background: none;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  padding: 0.75rem 0.1rem;
  font-weight: 620;
}
.tabs button[aria-pressed="true"] {
  color: var(--ink);
  border-color: var(--brand);
}
.count {
  font: 600 0.78rem/1.6 ui-monospace, monospace;
  background: var(--soft);
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  margin-left: 0.25rem;
}
.windows {
  display: grid;
  align-items: start;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 1rem;
}
.card,
.login,
.rows {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.card {
  min-width: 0;
  overflow: hidden;
}
.card-head,
.card-foot,
.detail-head,
.row {
  justify-content: space-between;
  gap: 0.9rem;
}
.card-head {
  padding: 1rem 1.2rem;
}
.card-head h2,
.row-main strong {
  overflow-wrap: anywhere;
}
.card-head .when {
  font-size: 0.83rem;
  margin-top: 0.2rem;
}
.badge {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  font-size: 0.82rem;
  font-weight: 620;
  background: var(--soft);
  color: #43515e;
  border-radius: 5px;
  padding: 0.2rem 0.52rem;
}
.badge.working,
.badge.completed {
  color: #175f47;
  background: #e5f3ec;
}
.badge.failed,
.badge.rejected {
  background: #f9e8e9;
  color: #9a3247;
}
.badge.submitted,
.badge.input-required,
.badge.auth-required {
  background: #fff1d4;
  color: #73531f;
}
.screen {
  position: relative;
  background: #17222a;
  color: #e5eaf0;
  aspect-ratio: 16/9;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-block: 1px solid #131c23;
}
.screen img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  min-height: 0;
  grid-area: 1/1;
}
.screen .placeholder {
  grid-area: 1/1;
  display: grid;
  justify-items: center;
  gap: 0.8rem;
  color: #c1cdd6;
  text-align: center;
  max-width: 85%;
  font-size: 0.93rem;
}
.screen .placeholder:before {
  content: "";
  width: 30px;
  height: 19px;
  border: 2px solid #92a5b1;
  border-radius: 4px;
  box-shadow: 0 6px 0 -4px #92a5b1;
}
.screen .frame-label {
  position: absolute;
  bottom: 0.65rem;
  left: 0.75rem;
  font: 0.78rem/1.4 ui-monospace, monospace;
  background: #121d27e8;
  color: #e9f2f5;
  border: 1px solid #76869375;
  padding: 0.18rem 0.45rem;
  border-radius: 4px;
}
.external-panel {
  min-height: 8rem;
  display: grid;
  align-content: center;
  padding: 1.25rem;
  background: #f0f4f6;
  border-block: 1px solid var(--line);
  gap: 0.18rem;
}
.card-foot {
  padding: 0.8rem 1.2rem;
  align-items: flex-start;
}
.card-foot .msg {
  font-size: 0.9rem;
  align-self: center;
  overflow-wrap: anywhere;
}
.outline,
.primary {
  border: 1px solid #b8c4ca;
  border-radius: 6px;
  padding: 0.48rem 0.85rem;
  color: var(--ink);
  background: white;
  font-size: 0.88rem;
  line-height: 1.35;
  font-weight: 600;
  flex-shrink: 0;
}
.outline:hover {
  background: var(--soft);
}
.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: white;
  min-height: 42px;
}
.primary:hover {
  background: #882037;
}
.block-title {
  margin: 1.55rem 0 0.6rem;
}
.rows {
  overflow: hidden;
}
.row {
  width: 100%;
  text-align: left;
  padding: 0.9rem 1.1rem;
  background: white;
  color: var(--ink);
  border: 0;
  border-bottom: 1px solid var(--line);
}
.row:last-child {
  border-bottom: 0;
}
.row:hover {
  background: #f4f7f8;
}
.row-main {
  min-width: 0;
}
.row-main strong,
.row-main small {
  display: block;
}
.row-main small,
.when,
.caption {
  font-size: 0.86rem;
}
.row-main small {
  color: var(--muted);
  margin-top: 0.15rem;
}
.empty {
  padding: 1.45rem;
  border: 1px dashed #c7d0d7;
  border-radius: 8px;
}
.notice {
  padding: 0.75rem 1rem;
  border: 1px solid #e0b880;
  background: #fff4df;
  color: #643f0f;
  border-radius: 7px;
  margin-bottom: 1rem;
}
.login {
  max-width: 480px;
  margin: clamp(1rem, 6vh, 5rem) auto;
  padding: clamp(1.3rem, 4vw, 2.1rem);
}
.login h1 {
  font-size: 2rem;
}
.login .sub {
  margin: 0.7rem 0 1.6rem;
}
form {
  display: grid;
  gap: 0.6rem;
}
label {
  font-weight: 600;
}
input {
  width: 100%;
  border: 1px solid #aebbc5;
  border-radius: 6px;
  padding: 0.6rem 0.7rem;
}
.login button {
  margin-top: 0.45rem;
}
#more {
  margin: 1rem 0;
}
dialog {
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 0;
  width: min(880px, calc(100% - 2rem));
  max-height: 90dvh;
  border-radius: 12px;
  overscroll-behavior: contain;
}
dialog::backdrop {
  background: #121b25a8;
}
.dialog-shell {
  padding: clamp(1rem, 3vw, 1.6rem);
}
.detail-head {
  margin-bottom: 1rem;
}
.eyebrow,
.caption {
  font-size: 0.84rem;
}
.meta {
  gap: 0.5rem 1rem;
  flex-wrap: wrap;
  margin: 0.65rem 0 1rem;
}
.meta .when {
  font-variant-numeric: tabular-nums;
}
.dialog-shell .screen {
  border-radius: 6px;
}
.detail-msg,
.outcome {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  margin: 0.65rem 0;
}
.timeline {
  list-style: none;
  margin: 0.6rem 0;
  padding: 0;
}
.timeline li {
  border-left: 2px solid var(--line);
  padding: 0.3rem 0.85rem 0.9rem;
  margin-left: 0.35rem;
}
.timeline time {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}
.timeline p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.receipt {
  padding: 0.8rem 1rem;
  background: var(--soft);
  border-radius: 7px;
  margin: 0.65rem 0;
  overflow-wrap: anywhere;
}
.receipt code {
  font-size: 0.85rem;
}
.paused {
  color: #815215;
}
@media (max-width: 600px) {
  .wrap {
    width: calc(100% - 1.5rem);
  }
  .mast {
    min-height: 56px;
  }
  .brand {
    font-size: 0.95rem;
  }
  .top-actions {
    gap: 0.7rem;
  }
  .top-actions #connection {
    font-size: 0.8rem;
  }
  .card-head,
  .card-foot,
  .row {
    padding: 0.8rem;
  }
  .tabs {
    margin: 1rem 0;
  }
  dialog {
    width: calc(100% - 0.75rem);
    max-height: 96dvh;
  }
  .row {
    align-items: flex-start;
  }
  .detail-head {
    align-items: flex-start;
  }
}

.frame-expand {
  position: absolute;
  right: 0.75rem;
  top: 0.65rem;
  color: white;
  background: #15202be8;
  border: 1px solid #697a85;
  border-radius: 5px;
  padding: 0.28rem 0.6rem;
  font-size: 0.82rem;
}
.screen:fullscreen,
.screen.enlarged {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
}
.screen.enlarged {
  position: fixed;
  inset: 0;
  z-index: 30;
}
