/* Mashu task workspace — DeepSeek 1:1 interaction rebuild v4 */

body[data-page="tools"] {
  overflow: hidden;
  background: #fff;
  color: #17191c;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body[data-page="tools"] .tools-app,
body[data-page="tools"] .tools-frame,
body[data-page="tools"] .tools-main {
  min-height: 100dvh;
}

body[data-page="tools"] .tools-app {
  padding: 0;
}

body[data-page="tools"] .tools-frame {
  display: grid;
  width: 100%;
  margin: 0;
  grid-template-columns: clamp(288px, 20.25vw, 320px) minmax(0, 1fr);
  gap: 0;
  transition: grid-template-columns .22s ease;
}

body[data-page="tools"].task-rail-collapsed .tools-frame {
  grid-template-columns: 0 minmax(0, 1fr);
}

.sr-only {
  position: absolute !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Sidebar */

.task-rail {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  overflow: hidden;
  height: 100dvh;
  min-height: 0;
  flex-direction: column;
  border-right: 1px solid #eceef1;
  background: #f8f9fb;
  transition: opacity .16s ease, transform .22s ease;
}

body.task-rail-collapsed .task-rail {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-100%);
}

.task-rail-head {
  display: flex;
  min-height: 78px;
  padding: 0 18px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.task-rail-brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
  color: #111315;
}

.task-rail-brand img {
  display: block;
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.task-rail-brand span {
  font-size: 26px;
  font-weight: 720;
  letter-spacing: -.055em;
  line-height: 1;
}

.task-rail-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #6f757c;
}

.task-rail-actions button {
  display: grid;
  width: 26px;
  height: 30px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  transition: background .15s ease, color .15s ease;
}

.task-rail-actions button:hover {
  background: #eceef1;
  color: #25282d;
}

.task-rail-actions svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.task-rail-close,
.task-rail-toggle {
  display: none;
  border: 0;
  background: transparent;
}

body.task-rail-collapsed .task-rail-toggle {
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 60;
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  border: 1px solid #e1e4e7;
  border-radius: 11px;
  background: rgba(255, 255, 255, .94);
  color: #656b72;
  box-shadow: 0 4px 16px rgba(31, 35, 40, .05);
  backdrop-filter: blur(12px);
}

body.task-rail-collapsed .task-rail-toggle svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.task-search-panel {
  display: grid;
  min-height: 44px;
  margin: -12px 10px 16px;
  padding: 0 10px;
  grid-template-columns: 20px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 7px;
  border: 1px solid #dfe2e6;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(31, 35, 40, .05);
}

.task-search-panel[hidden] {
  display: none;
}

.task-search-panel > svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #8a9097;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.task-search-panel input {
  min-width: 0;
  height: 40px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #26292d;
  font-size: 13px;
}

.task-search-panel button {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #8a9097;
  font-size: 18px;
}

.task-new-button {
  display: flex;
  width: calc(100% - 20px);
  min-height: 50px;
  margin: 0 10px 26px;
  padding: 0 18px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid #e2e5e9;
  border-radius: 999px;
  background: #fff;
  color: #24272b;
  font-size: 15px;
  font-weight: 500;
  box-shadow: 0 2px 7px rgba(31, 35, 40, .055);
  transition: background .16s ease, box-shadow .16s ease;
}

.task-new-button:hover {
  background: #fbfbfc;
  box-shadow: 0 5px 13px rgba(31, 35, 40, .09);
}

.task-new-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.task-history {
  min-height: 0;
  padding: 0 8px 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #d8dadd transparent;
}

.task-history-group + .task-history-group {
  margin-top: 22px;
}

.task-history-label {
  display: block;
  margin: 0 14px 7px;
  color: #9a9fa6;
  font-size: 13px;
  font-weight: 500;
}

.task-history-row {
  position: relative;
}

.task-history-item {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 44px;
  padding: 0 38px 0 14px;
  align-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #35383d;
  text-align: left;
  transition: background .15s ease;
}

.task-history-item:hover,
.task-history-item.active {
  background: #eceef1;
}

.task-history-menu-button {
  position: absolute;
  top: 50%;
  right: 8px;
  z-index: 3;
  display: grid;
  width: 32px;
  height: 30px;
  padding: 0 0 4px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #858a91;
  font-size: 13px;
  letter-spacing: 1px;
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity .15s ease, background .15s ease;
}

.task-history-row:hover .task-history-menu-button,
.task-history-menu-button:focus-visible,
.task-history-menu-button[aria-expanded="true"],
.task-history-item.active + .task-history-menu-button {
  opacity: 1;
}

.task-history-menu-button:hover {
  background: #e0e3e7;
}

.task-history-menu {
  position: absolute;
  top: 39px;
  right: 8px;
  z-index: 20;
  display: grid;
  width: 122px;
  padding: 6px;
  border: 1px solid #e1e4e8;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(31, 35, 40, .14);
}

.task-history-menu[hidden] {
  display: none;
}

.task-history-menu button {
  min-height: 34px;
  padding: 0 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #34383d;
  font-size: 12px;
  text-align: left;
}

.task-history-menu button:hover {
  background: #f1f3f5;
}

.task-history-menu button.is-danger {
  color: #b84b3e;
}

.task-history-item strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 450;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-history-item small {
  display: none;
  align-items: center;
  gap: 6px;
  color: #a0a4aa;
  font-size: 9px;
}

.task-history-item small i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #aeb2b8;
}

.task-history-item[data-status="running"] small i,
.task-history-item[data-status="queued"] small i,
.task-history-item[data-status="complete"] small i {
  background: #181a1d;
}

.task-history-item[data-status="error"] small i {
  background: #d85849;
}

.task-history-arrow {
  position: absolute;
  top: 50%;
  right: 14px;
  color: #989da4;
  font-size: 0;
  font-style: normal;
  transform: translateY(-50%);
}

.task-history-arrow::before {
  content: "···";
  font-size: 13px;
  letter-spacing: 1px;
}

.task-history-empty {
  padding: 5px 14px;
  color: #a0a4aa;
}

.task-history-empty > span,
.task-history-empty > strong {
  display: none;
}

.task-history-empty p {
  margin: 0;
  font-size: 12px;
}

.task-rail-foot {
  margin-top: auto;
  padding: 8px 12px 12px;
  border-top: 1px solid #eceef1;
  background: #f8f9fb;
}

.task-rail-account,
.task-rail-foot > a.task-rail-account:not(.task-rail-icp) {
  display: grid;
  min-height: 52px;
  padding: 6px 8px;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  border-radius: 9px;
  border: 0;
  width: 100%;
  background: transparent;
  color: #45494f;
  font: inherit;
  text-align: left;
}

.task-rail-account:hover {
  background: #eceef1;
}

.task-rail-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #e0e3e7;
  overflow: hidden;
}

.task-rail-avatar img {
  width: 25px;
  height: 25px;
  object-fit: contain;
}

.task-rail-account > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.task-rail-account strong {
  font-size: 13px;
  font-weight: 520;
}

.task-rail-account small {
  color: #9da2a8;
  font-size: 10px;
}

.task-rail-account > i {
  color: #8f949a;
  font-size: 12px;
  font-style: normal;
  letter-spacing: 1px;
}

.task-account-shell {
  position: relative;
}

.task-account-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  left: 0;
  z-index: 45;
  display: grid;
  padding: 7px;
  border: 1px solid #e1e4e8;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(31, 35, 40, .13);
}

.task-account-menu[hidden] {
  display: none;
}

.task-account-menu a {
  min-height: 38px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  border-radius: 8px;
  color: #34383d;
  font-size: 12px;
}

.task-account-menu a:hover {
  background: #f2f3f5;
}

.task-rail-foot .task-rail-icp {
  display: block;
  margin: 2px 8px 0;
  color: #b2b6bb;
  font-size: 9px;
}

.task-rail-scrim[hidden] {
  display: none;
}

/* Main blank canvas */

body[data-page="tools"] .tools-main {
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

body[data-page="tools"] .tools-main[data-state="idle"] .tool-launcher {
  position: relative;
  display: flex;
  min-height: 100dvh;
  box-sizing: border-box;
  padding: 32px 48px 86px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: #fff;
}

body[data-page="tools"] .tool-launcher::before {
  display: none;
}

body[data-page="tools"] .tool-launcher-intro {
  display: flex;
  width: min(100%, 960px);
  max-width: 960px;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  gap: 13px;
  text-align: left;
}

.tool-hero-brand {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
}

.tool-hero-brand img {
  display: block;
  width: 38px;
  height: 38px;
  object-fit: contain;
  transform: translateY(-4px);
}

body[data-page="tools"] .tool-launcher-intro p,
body[data-page="tools"] .tool-launcher-intro span:not(.tool-hero-brand) {
  display: none;
}

body[data-page="tools"] .tools-main[data-state="idle"] .tool-launcher-intro h1 {
  margin: 0;
  color: #17191c;
  font-size: 28px;
  font-weight: 660;
  letter-spacing: -.025em;
  line-height: 1.2;
}

.tool-mode-switch {
  display: flex;
  min-height: 50px;
  margin-top: 25px;
  padding: 3px;
  align-items: center;
  gap: 2px;
  border: 1px solid #e3e5e8;
  border-radius: 999px;
  background: #fff;
  margin-right: auto;
  margin-left: auto;
}

.tool-mode-switch button {
  display: flex;
  min-width: 148px;
  min-height: 42px;
  padding: 0 20px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #34383d;
  font-size: 14px;
  font-weight: 500;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}

.tool-mode-switch button[aria-selected="true"] {
  background: #f1f2f4;
  color: #111315;
  box-shadow: inset 0 0 0 1px #d6d9de;
}

.tool-mode-switch svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

/* Composer */

body[data-page="tools"] .tools-main[data-state="idle"] .tool-command {
  display: block;
  overflow: hidden;
  width: min(100%, 960px);
  min-height: 154px;
  margin-top: 44px;
  margin-right: auto;
  margin-left: auto;
  padding: 0;
  border: 1px solid #dfe2e6;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(31, 35, 40, .055);
  transition: border-color .18s ease, box-shadow .18s ease;
}

body[data-page="tools"] .tool-command:focus-within {
  border-color: #c8cdd3;
  box-shadow: 0 15px 40px rgba(31, 35, 40, .08);
}

.tool-command-body {
  min-height: 96px;
}

body[data-page="tools"] .tool-field-host {
  display: block;
  min-height: 96px;
}

body[data-page="tools"] .tool-field-host[hidden] {
  display: none !important;
}

body[data-page="tools"] .tool-field-host .tool-command-field {
  display: block;
  min-height: 96px;
  padding: 17px 20px 8px;
  border: 0;
}

body[data-page="tools"] .tool-field-host .tool-command-field > span {
  display: none;
}

body[data-page="tools"] .tool-field-host input {
  width: 100%;
  height: 54px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #25282d;
  font-size: 17px;
  font-weight: 430;
}

body[data-page="tools"] .tool-field-host input::placeholder {
  color: #a9aeb5;
}

.tool-prompt-field {
  position: relative;
  display: block;
  min-height: 96px;
  padding: 17px 20px 8px;
}

.tool-prompt-field[hidden] {
  display: none;
}

.tool-prompt-field textarea {
  display: block;
  width: 100%;
  height: 68px;
  padding: 0;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: #25282d;
  font: inherit;
  font-size: 17px;
  line-height: 1.6;
}

.tool-prompt-field textarea::placeholder {
  color: #a9aeb5;
}

.tool-prompt-hint {
  display: none;
}

.tool-prompt-field.is-invalid .tool-prompt-hint {
  position: absolute;
  right: 20px;
  bottom: 5px;
  left: 20px;
  display: block;
  color: #c14d40;
  font-size: 9px;
}

.tool-file-field {
  display: flex;
  min-height: 96px;
  padding: 12px 18px 4px;
  align-items: center;
}

.tool-file-field[hidden] {
  display: none;
}

.tool-file-pick {
  display: grid;
  width: 100%;
  min-height: 76px;
  padding: 10px 14px;
  grid-template-columns: 40px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 12px;
  border: 1px dashed #d6d9de;
  border-radius: 15px;
  background: #fafbfc;
  color: #34383d;
  text-align: left;
  transition: border-color .16s ease, background .16s ease;
}

.tool-file-pick:hover {
  border-color: #bfc4ca;
  background: #f5f6f8;
}

.tool-file-pick.is-invalid {
  border-color: #d9958c;
  background: #fff8f6;
}

.tool-file-pick.is-invalid small {
  color: #b84b3e;
}

.tool-file-pick > span {
  display: grid;
  width: 38px;
  height: 38px;
  grid-row: 1 / 3;
  place-items: center;
  border-radius: 11px;
  background: #eef0f2;
}

.tool-file-pick svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.tool-file-pick strong {
  align-self: end;
  font-size: 13px;
  font-weight: 560;
}

.tool-file-pick small {
  align-self: start;
  color: #92979e;
  font-size: 10px;
}

.tool-command-footer {
  display: flex;
  min-height: 58px;
  padding: 4px 12px 10px 15px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.tool-command-context {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.tool-command-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.tool-attach-button {
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #4e5359;
  transition: background .15s ease, color .15s ease;
}

.tool-attach-button:hover {
  background: #f0f2f4;
  color: #17191c;
}

.tool-attach-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.tool-platform-chip,
.tool-free-chip,
.tool-option-host .tool-command-field {
  display: inline-flex;
  min-height: 34px;
  padding: 0 12px;
  align-items: center;
  gap: 6px;
  border: 1px solid #e2e5e8;
  border-radius: 999px;
  background: #fff;
  color: #45494f;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.tool-platform-chip i.platform-favicon {
  width: 16px;
  height: 16px;
  flex-basis: 16px;
  border-radius: 4px;
}

.tool-option-host {
  display: flex;
  align-items: center;
}

.tool-option-host .tool-command-field {
  position: relative;
  padding-right: 7px;
}

.tool-option-host .tool-command-field > span {
  color: #7b8086;
  font-size: 11px;
}

.tool-option-host select {
  width: auto;
  min-width: 70px;
  height: 28px;
  padding: 0 22px 0 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #202327;
  font-size: 12px;
  font-weight: 560;
}

.tool-free-chip {
  border-color: #e0e3e7;
  background: #f7f8fa;
  color: #555b62;
}

body[data-page="tools"] .tool-start-button {
  display: grid;
  width: 43px;
  min-width: 43px;
  height: 43px;
  min-height: 43px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #181a1d;
  color: #fff;
  transition: background .16s ease, transform .16s ease;
}

body[data-page="tools"] .tool-start-button:hover {
  background: #000;
}

body[data-page="tools"] .tool-start-button:active {
  transform: scale(.96);
}

body[data-page="tools"] .tool-start-button:disabled {
  cursor: wait;
  opacity: .48;
}

body[data-page="tools"] .tool-start-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.tool-start-label {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  clip: rect(0 0 0 0);
}

.tool-suggestions[hidden] {
  display: none !important;
}

body[data-page="tools"] .tool-launcher-note {
  display: flex;
  margin: 13px 0 0;
  align-items: center;
  gap: 7px;
  color: #a2a7ad;
  font-size: 10px;
}

body[data-page="tools"] .tool-launcher-note i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #1b1d20;
  box-shadow: 0 0 0 4px rgba(27, 29, 32, .08);
}

/* Running task */

body[data-page="tools"] .tools-main:not([data-state="idle"]) .tool-launcher {
  display: none;
}

.tool-task-context[hidden] {
  display: none;
}

.tool-task-context {
  position: sticky;
  top: 0;
  z-index: 18;
  display: grid;
  min-height: 86px;
  padding: 14px 24px;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  align-items: center;
  gap: 22px;
  border-bottom: 1px solid #e8eaed;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(14px);
}

.tool-task-context > div:first-child {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.tool-task-context > div:first-child span,
.tool-task-context dt {
  color: #9ca1a7;
  font-size: 9px;
}

.tool-task-context > div:first-child strong {
  overflow: hidden;
  font-size: 15px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-task-context dl {
  display: flex;
  margin: 0;
  border: 1px solid #e2e5e8;
  border-radius: 12px;
  background: #fafbfc;
}

.tool-task-context dl > div {
  display: grid;
  min-width: 88px;
  padding: 8px 12px;
  gap: 2px;
}

.tool-task-context dl > div + div {
  border-left: 1px solid #e5e7ea;
}

.tool-task-context dd {
  overflow: hidden;
  max-width: 210px;
  margin: 0;
  font-size: 10px;
  font-weight: 560;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-task-state {
  display: inline-flex;
  min-height: 32px;
  padding: 0 12px;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  background: #f0f2f4;
  color: #34383d;
  font-size: 10px;
  font-weight: 600;
}

.tool-task-state i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #181a1d;
  animation: task-pulse 1.2s ease-in-out infinite;
}

.tools-main[data-state="complete"] .tool-task-state i,
.tools-main[data-state="error"] .tool-task-state i {
  animation: none;
}

.tools-main[data-state="error"] .tool-task-state {
  background: #fff0ed;
  color: #b84b3e;
}

.tools-main[data-state="error"] .tool-task-state i {
  background: #d85849;
}

@keyframes task-pulse {
  50% { opacity: .35; }
}

body[data-page="tools"] .tool-runtime {
  min-height: calc(100dvh - 86px);
  padding: 14px 16px 22px;
  background: #f7f8fa;
}

body[data-page="tools"] .tool-live-data-simple {
  height: min(68vh, 680px);
  min-height: 480px;
  border-color: #e0e3e6;
  border-radius: 15px;
}

body[data-page="tools"] .tool-result-summary {
  border-radius: 14px;
}

/* Responsive */

@media (max-width: 1050px) {
  body[data-page="tools"] .tools-frame {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  body[data-page="tools"] .tools-main[data-state="idle"] .tool-launcher {
    padding-inline: 32px;
  }

  .tool-task-context {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .tool-task-context dl {
    grid-row: 2;
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  body[data-page="tools"] .tools-frame {
    display: block;
    width: 100%;
  }

  .task-rail {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 140;
    width: min(86vw, 320px);
    height: 100dvh;
    box-shadow: 18px 0 50px rgba(24, 28, 33, .15);
    transform: translateX(-105%);
    transition: transform .24s ease;
  }

  body.task-rail-open .task-rail {
    transform: translateX(0);
  }

  .task-rail-actions {
    display: none;
  }

  .task-rail-close,
  .task-rail-toggle {
    display: grid;
    width: 38px;
    height: 38px;
    padding: 0;
    place-items: center;
    border-radius: 10px;
    color: #656b72;
  }

  .task-rail-close svg,
  .task-rail-toggle svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 1.8;
  }

  .task-rail-toggle {
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 60;
    border: 1px solid #e1e4e7;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(12px);
  }

  .task-rail-scrim {
    position: fixed;
    inset: 0;
    z-index: 130;
    display: block;
    background: rgba(21, 25, 30, .25);
    backdrop-filter: blur(2px);
  }

  .task-rail-scrim[hidden] {
    display: none;
  }

  body[data-page="tools"] .tools-main[data-state="idle"] .tool-launcher {
    min-height: 100dvh;
    padding: 64px 18px 40px;
    justify-content: center;
  }

  body[data-page="tools"] .tools-main[data-state="idle"] .tool-launcher-intro h1 {
    font-size: 23px;
  }

  .tool-mode-switch {
    width: min(100%, 344px);
    min-height: 46px;
    margin-top: 21px;
  }

  .tool-mode-switch button {
    min-width: 0;
    flex: 1;
    min-height: 38px;
    padding-inline: 14px;
    font-size: 12px;
  }

  body[data-page="tools"] .tools-main[data-state="idle"] .tool-command {
    min-height: 158px;
    margin-top: 21px;
    border-radius: 21px;
  }

  .tool-command-context {
    gap: 6px;
  }

  .tool-free-chip {
    display: none;
  }

  .tool-task-context {
    min-height: 0;
    padding: 12px 12px 12px 58px;
    gap: 10px;
  }

  .tool-task-context dl {
    width: 100%;
  }

  .tool-task-context dl > div {
    min-width: 0;
    flex: 1;
    padding-inline: 9px;
  }

  body[data-page="tools"] .tool-runtime {
    min-height: calc(100dvh - 116px);
    padding: 8px;
  }
}

@media (max-width: 460px) {
  body[data-page="tools"] .tools-main[data-state="idle"] .tool-launcher {
    padding: 64px 16px 34px;
  }

  .tool-hero-brand {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }

  .tool-hero-brand img {
    width: 32px;
    height: 32px;
  }

  body[data-page="tools"] .tools-main[data-state="idle"] .tool-launcher-intro h1 {
    font-size: 21px;
  }

  body[data-page="tools"] .tools-main[data-state="idle"] .tool-command {
    width: 100%;
  }

  .tool-command-footer {
    padding-left: 10px;
  }

  .tool-platform-chip,
  .tool-option-host .tool-command-field {
    padding-inline: 8px;
  }

  .tool-option-host .tool-command-field > span {
    display: none;
  }

  .tool-option-host select {
    min-width: 62px;
  }

  .tool-task-context dl > div:first-child {
    display: none;
  }

  .tool-task-context dl > div:nth-child(2) {
    border-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .task-rail,
  .tool-task-state i {
    transition: none;
    animation: none;
  }
}
