/* Product canvas */

.zone {
  --z-bg: #f7f7f8;
  --z-card: #ffffff;
  --z-ink: #1d1d1f;
  --z-muted: #6b6b70;
  --z-faint: #8e8e93;
  --z-line: #e8e8ea;
  --z-line-2: #f0f0f2;
  --z-blue: #3d5afe;
  --z-blue-ink: #2f49d1;
  --z-green: #1f9d55;
  --z-track: #efeff1;
  --z-shadow: 0 1px 2px rgba(16, 16, 20, 0.04);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--z-ink);
  background: var(--z-bg);
  min-height: 100%;
  letter-spacing: -0.011em;
}
.zone * { box-sizing: border-box; }
.zone button, .zone input, .zone select, .zone textarea { font: inherit; color: inherit; }
.zone button { cursor: pointer; }
.zone a { color: var(--z-blue-ink); text-decoration: none; }
.zone a:hover { text-decoration: underline; }
.zone .mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; color: var(--z-ink); }

/* Frame chrome stays on the vision page; zone fills the rest */
.zone-home { display: grid; grid-template-columns: 1fr 320px; min-height: 100%; }
@media (max-width: 980px) { .zone-home { grid-template-columns: 1fr; } }

.zh-main { padding: 28px 28px 40px; }
.zh-rail {
  padding: 28px 20px 40px;
  border-left: 1px solid var(--z-line);
  background: #fbfbfc;
  position: sticky;
  top: 0;
  align-self: start;
  max-height: calc(100dvh - 52px);
  overflow: auto;
}

.zh-title {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  margin-bottom: 18px;
}
.zh-title h2 {
  font-family: Inter, -apple-system, sans-serif;
  font-size: 26px; font-weight: 650; letter-spacing: -0.04em; margin: 0; line-height: 1.15;
  color: var(--z-ink);
}
.zh-title p { margin: 4px 0 0; color: var(--z-muted); font-size: 13px; }
.zh-actions { display: flex; gap: 8px; align-items: center; }

.z-btn {
  border: 0; border-radius: 8px; padding: 7px 12px; font-size: 13px; font-weight: 550;
  background: var(--z-blue); color: #fff;
}
.z-btn:hover { filter: brightness(1.05); }
.z-btn.ghost {
  background: #fff; color: var(--z-ink); border: 1px solid var(--z-line);
}
.z-btn.sm { padding: 5px 10px; font-size: 12px; }
.z-btn.link { background: none; color: var(--z-blue-ink); padding: 0; border-radius: 0; }
.z-btn.danger { background: none; color: #d0342c; }

.zh-tools { display: flex; gap: 8px; margin-bottom: 12px; }
.zh-tools .search {
  flex: 1; display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--z-line); border-radius: 10px; padding: 0 12px;
}
.zh-tools .search input {
  flex: 1; border: 0; outline: none; background: transparent; padding: 9px 0; color: var(--z-ink);
}
.zh-tools select {
  background: #fff; border: 1px solid var(--z-line); border-radius: 10px; padding: 0 10px; height: 38px;
  color: var(--z-ink);
}

/* CF-style application card */
.z-app {
  background: var(--z-card);
  border: 1px solid var(--z-line);
  border-radius: 12px;
  margin-bottom: 10px;
  box-shadow: var(--z-shadow);
  overflow: hidden;
}
.z-app-top, .z-app-bot {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
}
.z-app-bot { border-top: 1px solid var(--z-line-2); color: var(--z-muted); }
.z-app:hover { border-color: #d9d9de; }
.z-ico {
  width: 28px; height: 28px; border-radius: 7px;
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 12px;
}
.z-name { font-weight: 620; font-size: 14px; letter-spacing: -0.02em; }
.z-sub { color: var(--z-muted); font-size: 12.5px; margin-top: 1px; }
.z-meta { display: flex; align-items: center; gap: 14px; color: var(--z-muted); font-size: 12.5px; }
.z-git { display: inline-flex; align-items: center; gap: 6px; }
.z-type {
  font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 999px; background: var(--z-track); color: #555;
}
.z-type.agent { background: #111; color: #f3ead2; }
.z-type.app { background: #e8eeff; color: #2f49d1; }
.z-type.desk { background: #f6e7c6; color: #6a4b12; }
.z-type.storage { background: #f3ead2; color: #6a4b12; }
.z-commit { display: flex; align-items: center; gap: 8px; min-width: 0; }
.z-commit span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Rail */
.zr h3 { margin: 0 0 12px; font-size: 16px; letter-spacing: -0.03em; }
.zr-card {
  background: #fff; border: 1px solid var(--z-line); border-radius: 12px;
  padding: 14px; margin-bottom: 10px;
}
.zr-k { color: var(--z-muted); font-size: 12px; }
.zr-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 6px; }
.zr-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.zr-stat {
  background: #fff; border: 1px solid var(--z-line); border-radius: 10px; padding: 10px;
}
.zr-stat b { display: block; font-size: 20px; letter-spacing: -0.03em; }
.zr-stat span { color: var(--z-muted); font-size: 11.5px; }
.ok { color: var(--z-green); }
.bar { height: 6px; background: var(--z-track); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; background: var(--z-blue); width: 8%; }

/* Light workspace */
.zg { min-height: 100%; background: #fff; }
.zg-bar {
  position: sticky; top: 0; z-index: 6;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 18px; border-bottom: 1px solid var(--z-line);
  background: #fff;
  flex-wrap: wrap;
}
.zg-bar .zh-actions { flex-wrap: wrap; justify-content: flex-end; }
.zg-crumb { display: flex; align-items: center; gap: 8px; color: var(--z-muted); font-size: 13px; }
.zg-crumb b { color: var(--z-ink); font-weight: 600; }
.zg-crumb button { border: 0; background: none; color: var(--z-blue-ink); padding: 0; font-weight: 600; }
.back, .zg-crumb .back {
      display: inline-flex; align-items: center; gap: 6px;
      border: 1px solid var(--z-line); background: #fff; color: var(--z-ink);
      border-radius: 8px; padding: 5px 10px; font-weight: 550;
    }
    .notice {
      margin: 0 22px 0; padding: 8px 12px; border-radius: 8px;
      background: #eef1ff; color: #2f49d1; font-size: 12.5px;
    }
    .chat-grid { display: grid; grid-template-columns: 1fr 280px; gap: 14px; min-height: 480px; }
    @media (max-width: 800px) { .chat-grid { grid-template-columns: 1fr; } }
    .chat-pane {
      display: flex; flex-direction: column; min-height: 480px;
      border: 1px solid var(--z-line); border-radius: 12px; background: #fff;
    }
    .chat-pane .thread { flex: 1; padding: 18px 16px 8px; }
    .chat-pane .msg-row { color: var(--z-ink); }
    .chat-pane .msg-row.bot { color: var(--z-ink); }
    .chat-pane .msg-row.me { background: #f3f3f5; color: var(--z-ink); }
    .chat-pane .when { color: var(--z-faint); }
    .chat-pane .composer { margin: 10px; background: #f7f7f8; border: 1px solid var(--z-line); }
    .chat-pane .composer input { color: var(--z-ink); }
    .zone-send { border-radius: 10px !important; }
    .pre-plain { white-space: pre-wrap; margin: 10px 0 0; font: inherit; color: #444; }
    .ident { display: block; flex: 0 0 auto; border-radius: 6px; }
    .set-row .val .ident { display: inline-block; vertical-align: middle; margin-right: 8px; }
    .zg-crumb .ident { border-radius: 7px; }
    .agent-room { min-height: 100%; display: flex; flex-direction: column; }
    .drive-split {
      display: grid; grid-template-columns: minmax(280px, 1fr) minmax(300px, 1.05fr);
      flex: 1; min-height: calc(100dvh - 104px); border-top: 1px solid var(--z-line);
    }
    @media (max-width: 860px) { .drive-split { grid-template-columns: 1fr; } }
    .drive-split .chat-pane { border: 0; border-radius: 0; min-height: 520px; }
    .desk-side { border-left: 1px solid var(--z-line); background: #111214; min-height: 520px; }
    .desk-full { flex: 1; background: #111214; min-height: 640px; padding: 12px; }
    .desk-stream { display: flex; flex-direction: column; height: 100%; min-height: 520px; }
    .desk-stream.is-full { min-height: 640px; }
    .desk-osd {
      display: flex; justify-content: space-between; align-items: center; gap: 8px;
      padding: 8px 10px; color: #c8c8cc; font-size: 11.5px; background: #0b0b0c;
    }
    .desk-osd .ident { display: inline-block; vertical-align: middle; }
    .desk-screen {
      position: relative; flex: 1; min-height: 360px;
      background:
        radial-gradient(900px 280px at 50% 0%, rgba(61,90,254,.18), transparent 55%),
        #1a1c22;
    }
    .desk-screen.xfce {
      background:
        linear-gradient(180deg, #2a3a4a 0%, #3d5a6c 42%, #2f4a3a 100%);
    }
    .xfce-panel {
      display: flex; align-items: center; justify-content: space-between;
      height: 28px; padding: 0 10px; background: #1d1d1d; color: #eee; font-size: 12px;
    }
    .xfce-menu { background: #3a3a3a; padding: 2px 8px; border-radius: 3px; }
    .xfce-icons {
      position: absolute; left: 12px; top: 44px; color: #e8eef2; font-size: 11px;
      display: grid; grid-template-columns: 16px 1fr; gap: 6px 8px; align-items: center;
    }
    .xfce-icons i { width: 16px; height: 16px; background: #c5d0d8; border-radius: 2px; }
    .xfce-win .desk-wh {
      background: linear-gradient(180deg, #ececec, #d4d4d4);
      color: #222; display: flex; justify-content: space-between; font-size: 11.5px;
    }
    .desk-win {
      position: absolute; background: #f4f5f7; color: #1d1d1f; border-radius: 8px;
      box-shadow: 0 16px 40px rgba(0,0,0,.35); overflow: hidden; font-size: 12px;
    }
    .desk-wh { background: #e4e6ea; padding: 5px 8px; color: #555; }
    .desk-wb { padding: 8px 10px; }
    .desk-bar {
      display: flex; justify-content: space-between; align-items: center;
      padding: 8px 10px; color: #9a9aa0; font-size: 11.5px; background: #0b0b0c;
    }
    .desk-screen.xfce { background: none; }
    .xfce {
      position: absolute; inset: 0;
      font-family: "DejaVu Sans", "Noto Sans", "Liberation Sans", ui-sans-serif, sans-serif;
      background:
        radial-gradient(1200px 500px at 50% 0%, #4a5d6c, transparent 60%),
        linear-gradient(180deg, #3a4a58 0%, #2c3944 100%);
      overflow: hidden; color: #1a1a1a;
    }
    .xfce-icons {
      position: absolute; left: 18px; top: 18px;
      display: flex; flex-direction: column; gap: 16px;
      width: 72px; color: #eef2f5; font-size: 11px; text-align: center;
      text-shadow: 0 1px 2px rgba(0,0,0,.6);
    }
    .xfce-ico { display: flex; flex-direction: column; align-items: center; gap: 4px; }
    .xfce-ico .g {
      width: 36px; height: 32px; border-radius: 3px;
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.4), 0 2px 4px rgba(0,0,0,.25);
    }
    .xfce-ico.home .g { background: linear-gradient(#f4f7fa, #c5d0d8); }
    .xfce-ico.trash .g { background: linear-gradient(#cfd6dc, #8b969e); }
    .xfce-win {
      position: absolute; background: #f6f6f6; border: 1px solid #9a9a9a;
      box-shadow: 0 18px 40px rgba(0,0,0,.35);
      display: flex; flex-direction: column; min-width: 0;
    }
    .xfce-title {
      flex: 0 0 28px; display: flex; align-items: center; gap: 8px;
      padding: 0 6px 0 10px;
      background: linear-gradient(180deg, #f0f0f0, #e4e4e4);
      border-bottom: 1px solid #c8c8c8; font-size: 12px; color: #333;
    }
    .xfce-title b { flex: 1; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .xfce-btns { display: flex; gap: 4px; }
    .xfce-btns i {
      width: 18px; height: 18px; border-radius: 2px; border: 1px solid #b5b5b5;
      background: #f3f3f3; display: grid; place-items: center;
      font-style: normal; font-size: 10px; color: #555; line-height: 1;
    }
    .xfce-ff { left: 7%; top: 7%; width: 54%; height: 62%; }
    .xfce-tabs {
      display: flex; align-items: flex-end; gap: 2px;
      padding: 0 8px; background: #d8d8d8; height: 28px;
    }
    .xfce-tabs span {
      background: #c4c4c4; padding: 5px 12px 6px; font-size: 11.5px; color: #444;
      border-radius: 6px 6px 0 0;
    }
    .xfce-tabs span.on { background: #f6f6f6; color: #222; }
    .xfce-bar {
      display: flex; align-items: center; gap: 8px;
      padding: 6px 10px; background: #f6f6f6; border-bottom: 1px solid #ddd;
    }
    .xfce-url {
      flex: 1; background: #fff; border: 1px solid #ccc; border-radius: 14px;
      padding: 4px 12px; font-size: 12px; color: #333;
    }
    .xfce-page { flex: 1; background: #fff; overflow: auto; text-align: left; }
    .xfce-mail-h { padding: 12px 16px 8px; border-bottom: 1px solid #eee; font-size: 15px; font-weight: 600; }
    .xfce-mail-row {
      display: grid; grid-template-columns: minmax(88px, 140px) minmax(0, 1fr) auto; gap: 12px;
      padding: 9px 16px; border-bottom: 1px solid #f0f0f0; font-size: 13px;
    }
    .xfce-mail-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .xfce-mail-row em { white-space: nowrap; }
    .xfce-mail-row em { font-style: normal; color: #5a5a5a; font-size: 12px; }
    .xfce-th { left: 56%; top: 16%; width: 40%; height: 54%; }
    .xfce-th-body { flex: 1; display: grid; grid-template-columns: 128px 1fr; min-height: 0; }
    .xfce-th-side { background: #ececec; border-right: 1px solid #d0d0d0; padding: 8px 0; font-size: 12px; text-align: left; }
    .xfce-th-side div { padding: 5px 12px; }
    .xfce-th-side div.on { background: #cfe0f5; }
    .xfce-th-list { background: #fff; font-size: 12.5px; overflow: auto; text-align: left; }
    .xfce-th-cols, .xfce-th-row {
      display: grid; grid-template-columns: minmax(0, 1.2fr) 56px 64px; padding: 6px 10px;
    }
    .xfce-th-cols span, .xfce-th-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .xfce-th-cols { background: #f3f3f3; border-bottom: 1px solid #d0d0d0; color: #5a5a5a; font-size: 11px; padding: 5px 10px; }
    .xfce-th-row { border-bottom: 1px solid #f2f2f2; }
    .xfce-th-row:nth-child(odd) { background: #fafafa; }
    .xfce-term {
      left: 18%; top: 58%; width: 42%; height: 28%;
      background: #1e1e1e; color: #d8d8d8; border-color: #555;
    }
    .xfce-term .xfce-title { background: #2a2a2a; color: #ccc; border-bottom-color: #111; }
    .xfce-term pre {
      margin: 0; padding: 10px 12px; flex: 1;
      font: 12.5px/1.5 ui-monospace, "DejaVu Sans Mono", Menlo, monospace; color: #d0d0d0;
    }
    .xfce-term .ok { color: #8f8; }
    .xfce-dock {
      position: absolute; left: 0; right: 0; bottom: 0; height: 32px;
      background: linear-gradient(180deg, #3c3c3c, #2a2a2a);
      border-top: 1px solid #555;
      display: flex; align-items: center; gap: 4px; padding: 0 6px;
      color: #eee; font-size: 12px;
    }
    .xfce-menu { background: #4a4a4a; border: 1px solid #666; border-radius: 3px; padding: 3px 10px; margin-right: 6px; }
    .xfce-task {
      background: #353535; border: 1px solid #555; border-radius: 3px;
      padding: 3px 10px; max-width: 160px;
      overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    .xfce-task.on { background: #4a4a4a; border-color: #777; }
    .xfce-tray { margin-left: auto; display: flex; align-items: center; gap: 10px; padding-right: 8px; color: #ddd; }
    .desk-stream .desk-screen { position: relative; flex: 1; min-height: 360px; }
    .desk-stream:not(.is-full) .xfce-ff { left: 4%; top: 6%; width: 64%; height: 56%; }
    .desk-stream:not(.is-full) .xfce-th { left: 50%; top: 12%; width: 48%; height: 52%; }
    .desk-stream:not(.is-full) .xfce-th-cols,
    .desk-stream:not(.is-full) .xfce-th-row { grid-template-columns: minmax(0, 1fr) 52px; }
    .desk-stream:not(.is-full) .xfce-th-cols span:nth-child(3),
    .desk-stream:not(.is-full) .xfce-th-row span:nth-child(3) { display: none; }
    .desk-stream:not(.is-full) .xfce-term { left: 8%; top: 58%; width: 58%; height: 32%; }
    .agent-desk .xfce { position: absolute; inset: 0; }
    .side-guest .panel { margin: 0; }
    .dialog {
      border: 1px solid var(--z-line); background: #fff; border-radius: 12px;
      padding: 14px; margin-bottom: 14px;
    }
    .dialog .row { display: flex; gap: 8px; margin-top: 8px; }
.zg-tabs {
  position: sticky; top: 48px; z-index: 5;
  display: flex; gap: 4px; padding: 10px 18px 0;
  border-bottom: 1px solid var(--z-line);
  background: #fff;
}
.zg-tab {
  border: 0; background: var(--z-track); color: var(--z-muted);
  padding: 6px 12px; border-radius: 8px 8px 0 0; font-size: 13px;
}
.zg-tab.on { background: #fff; color: var(--z-ink); border: 1px solid var(--z-line); border-bottom-color: #fff; margin-bottom: -1px; }
.zg-body { padding: 22px 28px 48px; max-width: none; }
.work {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start;
}
@media (max-width: 960px) { .work { grid-template-columns: 1fr; } }
.work-rail { position: sticky; top: 72px; min-width: 0; }
.prove-row {
  display: flex; flex-direction: column; gap: 4px;
  padding: 10px 14px; border-bottom: 1px solid var(--z-line-2);
}
.prove-row:last-child { border-bottom: 0; }
.prove-row span { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--z-faint); }
.prove-row code {
  font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: var(--z-ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block;
}

.panel {
  background: #fff; border: 1px solid var(--z-line); border-radius: 12px;
  margin-bottom: 14px; overflow: hidden;
}
.panel-h { padding: 12px 14px; border-bottom: 1px solid var(--z-line-2); }
.panel-h .k { font-weight: 600; }
.panel-h .d { color: var(--z-muted); font-size: 12.5px; margin-top: 2px; }
.panel-h .d a { margin-right: 8px; }

table.zt { width: 100%; border-collapse: collapse; }
table.zt th, table.zt td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--z-line-2); vertical-align: top; }
table.zt th { color: var(--z-faint); font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
table.zt tr:last-child td { border-bottom: 0; }
table.zt td.mono, table.zt .sha {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 280px;
}
table.zt td.mono { font-size: 12px; }
.zg-body > .z-btn { margin: 0 8px 14px 0; }
.env {
  display: inline-block; color: var(--z-blue-ink); font-weight: 600; font-size: 12.5px;
  border-left: 3px solid var(--z-blue); padding-left: 8px;
}
.env.preview { color: #6a4b12; border-left-color: #c8a36a; }
.spark {
  display: flex; align-items: flex-end; gap: 3px; height: 88px; margin-top: 12px;
}
.spark i { flex: 1; background: #c5cdf8; border-radius: 2px 2px 0 0; display: block; }
.sha { font-weight: 600; }
.msg { color: var(--z-muted); font-size: 12.5px; }

.set-row {
  display: grid; grid-template-columns: 160px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 12px 14px; border-bottom: 1px solid var(--z-line-2);
}
.set-row:last-child { border-bottom: 0; }
.set-row .lab { font-size: 13px; font-weight: 550; }
.set-row .val {
  color: var(--z-muted); font-size: 13px;
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.set-nav { display: flex; gap: 28px; align-items: flex-start; }
.set-side { width: 180px; position: sticky; top: 12px; }
.set-side button {
  display: block; width: 100%; text-align: left; border: 0; background: none;
  padding: 6px 8px; border-radius: 6px; color: var(--z-muted);
}
.set-side button.on { background: #eef1ff; color: var(--z-blue-ink); }

.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.chart {
  border: 1px solid var(--z-line); border-radius: 12px; padding: 14px; min-height: 180px; background: #fff;
}
.chart .h { display: flex; justify-content: space-between; color: var(--z-muted); font-size: 12.5px; }
.chart .empty {
  height: 120px; display: grid; place-items: center; color: var(--z-faint); font-size: 12.5px;
  background: repeating-linear-gradient(180deg, transparent, transparent 23px, #f3f3f5 24px);
  margin-top: 10px; border-radius: 6px;
}

.compose {
  background: #0f1115; color: #d7deea; border-radius: 10px; padding: 14px 16px;
  font-family: ui-monospace, Menlo, monospace; font-size: 12px; line-height: 1.55;
  overflow: auto; white-space: pre;
}
.hashline {
  font-family: ui-monospace, Menlo, monospace; font-size: 12px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  display: block; max-width: 100%;
}

.verify-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.badge-live { color: var(--z-green); font-weight: 600; font-size: 12.5px; }
.badge-live::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--z-green); margin-right: 6px; }

/* Dark agent register */
.za {
  --d: #000;
  --d2: #0c0c0d;
  --d3: #161618;
  --dline: rgba(255,255,255,.07);
  display: grid;
  grid-template-columns: 268px 1fr;
  min-height: 760px;
  background: #000;
  color: #ececec;
}
@media (max-width: 800px) { .za { grid-template-columns: 1fr; } }
.za-side {
  background: #070708;
  border-right: 1px solid var(--dline);
  display: flex; flex-direction: column;
  min-height: 760px;
}
.za-side-top { display: flex; gap: 8px; align-items: center; padding: 12px; }
.za-side-top input {
  flex: 1; background: #141416; border: 1px solid var(--dline); color: #fff;
  border-radius: 9px; padding: 8px 10px; outline: none;
}
.za-plus {
  width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--dline);
  background: transparent; color: #fff; font-size: 18px; line-height: 1;
}
.za-bots { flex: 1; padding: 4px 8px; }
.za-bot {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 8px; border-radius: 10px; border: 0; background: transparent; color: #ececec; text-align: left;
}
.za-bot.on { background: #1a1a1c; }
.za-bot .t { font-size: 13.5px; }
.za-bot .s { color: #8a8a8e; font-size: 11.5px; }
.za-foot { padding: 12px; border-top: 1px solid var(--dline); display: flex; justify-content: space-between; align-items: center; color: #9a9a9e; font-size: 13px; }
.face {
  width: 30px; height: 30px; border-radius: 50%; position: relative; flex: 0 0 auto;
}
.face::before, .face::after {
  content: ""; position: absolute; width: 4px; height: 9px; background: #0b0b0c;
  border-radius: 3px; top: 10px; left: 9px; transform: rotate(-12deg);
}
.face::after { left: 17px; transform: rotate(12deg); }

.za-main { display: flex; flex-direction: column; min-width: 0; background: #000; }
.za-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: 1px solid var(--dline);
}
.za-id { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.za-tools { display: flex; gap: 6px; }
.za-ico {
  width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--dline);
  background: transparent; color: #ddd; display: grid; place-items: center;
}
.za-ico.on { background: #1a1a1c; }
.za-tabs { display: flex; gap: 2px; padding: 8px 12px 0; }
.za-tabs button {
  border: 0; background: transparent; color: #8a8a8e; padding: 6px 10px; border-radius: 8px; font-size: 12.5px;
}
.za-tabs button.on { background: #1a1a1c; color: #fff; }

.thread { flex: 1; padding: 36px 28px 12px; }
.when { text-align: center; color: #6d6d72; font-size: 12px; margin-bottom: 22px; }
.msg-row { display: flex; gap: 10px; margin: 0 0 16px; max-width: 640px; }
.msg-row.me { margin-left: auto; background: #161618; padding: 10px 12px; border-radius: 14px; }
.msg-row.bot { color: #d8d8d4; }
.composer {
  margin: 10px 14px 16px; display: flex; align-items: center; gap: 8px;
  background: #141416; border: 1px solid var(--dline); border-radius: 999px; padding: 6px 8px 6px 14px;
}
.composer input { flex: 1; border: 0; background: transparent; outline: none; color: #fff; padding: 8px 0; }
.send {
  width: 32px; height: 32px; border-radius: 50%; border: 0; background: #fff; color: #111; font-weight: 700;
}

/* Computer */
.comp {
  display: grid; grid-template-rows: 36px 1fr 28px;
  background: #1b1916;
  min-height: 560px;
  border-radius: 0;
}
.comp-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px; background: #111; color: #bbb; font-size: 12px;
  border-bottom: 1px solid #000;
}
.comp-wins { display: flex; gap: 6px; }
.comp-wins button {
  border: 0; background: #2a2723; color: #ddd; border-radius: 6px; padding: 4px 8px; font-size: 12px;
}
.comp-wins button.on { background: #f3efe6; color: #111; }
.comp-stage { padding: 16px; }
.win {
  background: #f6f3ec; color: #1b1a17; border-radius: 10px; overflow: hidden;
  box-shadow: 0 18px 50px rgba(0,0,0,.35); max-width: 720px;
}
.win-h { background: #e7e2d6; padding: 7px 10px; font-size: 12px; color: #5c574c; display: flex; gap: 6px; align-items: center; }
.win-b { padding: 14px; font-size: 13px; }
.win-b .urlbar {
  background: #fff; border: 1px solid #ddd; border-radius: 8px; padding: 6px 10px; color: #666; margin-bottom: 12px;
}
.files div { padding: 5px 0; border-bottom: 1px solid #ece7dc; }
.term { background: #111; color: #cde3c4; font-family: ui-monospace, Menlo, monospace; font-size: 12px; padding: 12px; border-radius: 8px; min-height: 220px; }
.comp-dock { display: flex; justify-content: center; align-items: center; gap: 16px; color: #9a9386; font-size: 11px; }

.split { display: grid; grid-template-columns: 1fr 1fr; min-height: 560px; }
.split .thread { padding: 20px 16px; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

/* Create flows */
.zc { padding: 28px; min-height: 720px; background: #fff; }
.zc.dark { background: #000; color: #eee; min-height: 760px; }
.zc-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 720px; }
.kind {
  text-align: left; border: 1px solid var(--z-line); background: #fff; border-radius: 12px; padding: 16px;
}
.kind b { display: block; margin-bottom: 4px; font-size: 14px; }
.kind span { color: var(--z-muted); font-size: 12.5px; }
.kind:hover { border-color: #c9c9d0; }
.field { margin: 0 0 12px; }
.field label { display: block; font-size: 12px; color: var(--z-muted); margin-bottom: 4px; }
.field input, .field textarea, .field select {
  width: 100%; border: 1px solid var(--z-line); border-radius: 8px; padding: 8px 10px; background: #fff;
}
.zc.dark .field input, .zc.dark .field textarea {
  background: #141416; border-color: #2a2a2c; color: #fff;
}
.zc.dark .back { background: #141416; color: #eee; border-color: #2a2a2c; }
.drop {
  display: block; width: 100%;
  border: 1.5px dashed #cfcfd4; border-radius: 12px; padding: 36px; text-align: center; color: var(--z-muted);
  background: #fafafa; cursor: pointer;
}
.colors { display: flex; gap: 8px; justify-content: center; margin: 12px 0; }
.sw { width: 18px; height: 18px; border-radius: 50%; border: 2px solid transparent; }
.sw.on { border-color: #fff; box-shadow: 0 0 0 2px #000; }
.sugs { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 24px; }
.sug {
  text-align: left; border: 1px solid #222; background: #111; color: #eee;
  border-radius: 12px; padding: 12px;
}
.sug b { display: block; margin-bottom: 4px; }
.sug span { color: #8a8a8e; font-size: 12px; }
.center { text-align: center; padding: 48px 16px 16px; }
.integ { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 560px; margin: 16px auto; }
.integ button {
  background: #141416; border: 1px solid #2a2a2c; color: #eee; border-radius: 10px; padding: 12px; text-align: left;
}
.integ button.on { outline: 1px solid #fff; }

.za-ops { padding: 18px; }
.za-ops .panel { background: #111; border-color: #222; color: #ddd; }
.za-ops .panel-h { border-color: #222; }
.za-ops table.zt th, .za-ops table.zt td { border-color: #222; color: #ddd; }
.za-ops .set-row { border-color: #222; }
.za-ops .compose { background: #0a0a0b; }

.warn {
  background: #fff7e6; border: 1px solid #f0d9a0; color: #6a4b12;
  padding: 10px 12px; border-radius: 10px; font-size: 12.5px; margin-bottom: 12px;
}
.zc.dark .warn { background: #2a210f; border-color: #5a4a22; color: #e6d3a2; }

.thread-toggle { display: none; }

@media (max-width: 720px) {
  .zh-main { padding: 16px 16px 24px; }
  .zh-rail {
    position: static;
    max-height: none;
    border-left: 0;
    border-top: 1px solid var(--z-line);
    padding: 16px;
  }
  .zh-title { flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
  .zh-title h2 { font-size: 22px; }
  .zh-tools { flex-wrap: wrap; }
  .zh-tools .search { flex: 1 0 100%; min-width: 0; }
  .zh-tools select { flex: 1 1 40%; min-width: 0; }
  .z-app-top, .z-app-bot {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 8px 10px;
  }
  .z-meta {
    grid-column: 2;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
  }
  .z-commit { grid-column: 2; }
  .z-app-bot > span:last-child { grid-column: 2; }

  .zg-bar { padding: 8px 12px; }
  .zg-tabs {
    top: auto;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding: 8px 12px 0;
    gap: 6px;
  }
  .zg-tab { flex: 0 0 auto; min-height: 36px; }
  .zg-body { padding: 14px 12px 28px; }
  .notice { margin: 8px 12px 0; }

  .panel { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table.zt { min-width: 540px; }
  .set-row {
    grid-template-columns: 1fr;
    gap: 4px 8px;
    align-items: start;
  }
  .set-row .val { white-space: normal; }
  .metrics { grid-template-columns: 1fr; }
  .dialog .row { flex-wrap: wrap; }
  .dialog .row input, .dialog .row select { min-width: 0; flex: 1 1 100%; }
  .kinds { grid-template-columns: 1fr; }
  .zc { padding: 16px; min-height: 0; }
  .sugs { grid-template-columns: 1fr; }
  .drop { padding: 22px 14px; }

  .agent-room { min-height: 0; flex: 1; }
  .drive-split {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
    border-top: 0;
  }
  .drive-split .desk-side {
    order: -1;
    border-left: 0;
    border-bottom: 1px solid var(--z-line);
    min-height: 260px;
    height: 48dvh;
    max-height: 380px;
  }
  .agent-room .desk-bar { display: none; }
  .drive-split .chat-pane {
    min-height: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
  }
  .drive-split .chat-pane .thread { flex: 1; min-height: 0; overflow: auto; padding: 12px 12px 4px; }
  .chat-pane { min-height: 0; }
  .desk-stream, .desk-side, .desk-full { min-height: 0; }
  .desk-full { min-height: 0; flex: 1; padding: 0; }
  .desk-stream.is-full { min-height: 0; flex: 1; }
  .desk-stream .desk-screen { min-height: 180px; }
  .desk-stream .xfce-th,
  .desk-stream .xfce-term,
  .desk-stream .xfce-icons { display: none; }
  .desk-stream .xfce-ff,
  .desk-stream:not(.is-full) .xfce-ff {
    left: 8px !important;
    top: 6px !important;
    width: calc(100% - 16px) !important;
    height: calc(100% - 44px) !important;
  }
  .thread-toggle {
    display: block;
    width: 100%;
    border: 0;
    background: none;
    color: var(--z-blue-ink);
    font-size: 12.5px;
    font-weight: 550;
    padding: 6px 12px 2px;
    text-align: left;
  }
  .agent-room .thread:not(.is-open) .when { display: none; }
  .agent-room .thread:not(.is-open) .msg-row { display: none; }
  .agent-room .thread:not(.is-open) .msg-row:last-child { display: flex; }
  .chat-pane .composer {
    margin: 8px 10px max(10px, env(safe-area-inset-bottom));
  }
  .z-btn, .z-btn.sm, .back { min-height: 40px; }
}
