.button-chat { color: #5635d1; background: #f4efff; border-color: #e5dcfa; }
.tool-page { display: grid; gap: 14px; }
.tool-card { padding: 16px; }
.tool-head { margin-bottom: 12px; }
.tool-head p, .tool-status { color: var(--muted); font-size: 12px; margin-top: 4px; }
.tool-status:empty { display: none; }
.tool-card > .button { margin-top: 10px; }
.tool-form { display: grid; gap: 10px; }
.tool-form label { display: grid; gap: 4px; font-weight: 700; font-size: 12px; min-width: 0; }
.tool-form :is(input, select, textarea) { width: 100%; min-width: 0; border: 1px solid var(--line); padding: 8px; border-radius: 7px; color: var(--ink); font: inherit; background: #fff; }
.tool-form textarea { resize: vertical; }
.tool-form summary { cursor: pointer; font-weight: 700; color: var(--accent-dark); }
.tool-form details a { display: inline-block; margin-top: 8px; color: var(--accent-dark); font-size: 12px; }
.tool-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.api-fields { margin-top: 8px; }
.tool-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.tool-result { padding: 10px; border: 1px solid var(--line); background: #fbf9ff; border-radius: 8px; }
.tool-result h3 { margin-bottom: 8px; }
.tool-result ul { padding-inline-start: 19px; }
.title-preview { display: grid; gap: 3px; }
.title-preview small, .tool-stats small { color: var(--muted); }
.tool-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 8px 0; }
.tool-stats div { padding: 8px; border: 1px solid var(--line); border-radius: 8px; }
.tool-stats strong, .tool-stats small { display: block; overflow-wrap: anywhere; }
.tool-stats strong { font-size: 17px; padding-top: 4px; }
.upload-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.upload-item { padding: 8px; border: 1px solid var(--line); border-radius: 7px; text-align: left; background: #fff; color: var(--ink); }
.upload-item:hover { background: #f8f4ff; }
.studio-dialog { width: min(670px, calc(100% - 24px)); }
.studio-video-body, .studio-video-body > div { display: grid; gap: 10px; }
.tool-raw { color: var(--muted); }
.tool-raw summary { cursor: pointer; }
.tool-raw pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 260px; overflow: auto; font-size: 11px; }
.tool-table { min-width: 0; }
.tool-table th { white-space: normal; }
.connect-permissions { margin: 0; border: 1px solid var(--line); border-radius: 8px; display: grid; gap: 5px; font-size: 12px; }
.connect-permissions legend { font-weight: 750; }
.connect-permissions input { accent-color: var(--accent); }
@media (max-width: 455px) {
  .sidebar .nav { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .top-controls { gap: 5px; }
  .button-chat { padding-inline: 7px; }
  .button-chat span { display: none; }
  .upload-list { grid-template-columns: 1fr; }
}
