:root {
  color-scheme: light;
  --bg: #f4f1ea;
  --surface: #fffdfa;
  --surface-2: #ece8df;
  --ink: #222826;
  --muted: #66706b;
  --line: #d2cbc0;
  --teal: #2d7f72;
  --amber: #b97822;
  --violet: #6660a8;
  --danger: #a64235;
  --shadow: 0 18px 45px rgba(31, 35, 33, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
textarea,
input {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 520px;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
}

.workspace {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 24px 14px;
  border-bottom: 1px solid var(--line);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 24px;
  letter-spacing: 0;
}

h2 {
  font-size: 14px;
  letter-spacing: 0;
}

.topbar p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.status-pill,
.icon-button,
#event-count {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
}

.status-pill {
  padding: 0 12px;
}

.icon-button {
  min-width: 42px;
  padding: 0 8px;
  color: var(--teal);
  font-weight: 700;
}

.viewer-split {
  display: flex;
  flex: 1;
  min-height: 0;
  padding: 16px;
}

.viewer-panel,
.side-panel,
.chat-panel,
.agent-panel,
.artifact-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.viewer-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
}

.panel-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#model-canvas {
  flex: 1 1 0;
  width: 100%;
  min-height: 420px;
  display: block;
  background: #f7f6f1;
  cursor: crosshair;
}

#model-canvas:active {
  cursor: grabbing;
}

.project-browser {
  position: absolute;
  top: 48px;
  left: 0;
  z-index: 5;
  width: max-content;
  min-width: 370px;
  max-width: none;
  max-height: calc(100% - 48px);
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #24313a;
  font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
  font-size: 20px;
}

.project-browser-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 0 8px 0 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #263238;
  font-size: 21px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: uppercase;
}

.browser-title-label {
  display: inline-flex;
  align-items: center;
  flex: 1 1 auto;
  gap: 14px;
  min-width: 0;
  overflow: visible;
}

.browser-title-label span:last-child {
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

.browser-collapse-icon {
  position: relative;
  width: 28px;
  height: 42px;
  flex: 0 0 28px;
  color: #8c8c8c;
}

.browser-collapse-icon::before,
.browser-collapse-icon::after {
  content: "";
  position: absolute;
  top: 17px;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-right: 8px solid currentColor;
}

.browser-collapse-icon::before {
  left: 4px;
}

.browser-collapse-icon::after {
  left: 14px;
}

.project-browser-toolbar {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  gap: 3px;
  min-width: 0;
}

#project-save-status {
  max-width: 74px;
  margin-left: 4px;
  overflow: hidden;
  color: #777;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 10px;
  font-weight: 600;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.part-tree {
  display: grid;
  justify-items: start;
  max-height: calc(100vh - 240px);
  overflow: visible;
  padding: 6px 0 12px 48px;
}

.tree-row {
  display: grid;
  grid-template-columns: 28px 42px 44px max-content 34px;
  align-items: center;
  width: max-content;
  max-width: none;
  min-height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #27313a;
  font-size: 25px;
  font-weight: 500;
  letter-spacing: 0;
  text-align: left;
  cursor: pointer;
}

.tree-row.part-row {
  grid-template-columns: 28px 42px 44px max-content;
  min-height: 40px;
  margin-left: 20px;
}

.tree-row.project-row {
  margin: 12px 0 0 28px;
}

.project-row.collapsed .tree-expander {
  transform: none;
}

.tree-row:hover,
.tree-row:focus-visible {
  background: transparent;
  outline: none;
}

.tree-row:hover .tree-name,
.tree-row:focus-visible .tree-name,
.tree-row:hover .tree-visibility-toggle,
.tree-row:focus-visible .tree-visibility-toggle,
.tree-row:hover .tree-icon,
.tree-row:focus-visible .tree-icon,
.tree-row:hover .tree-active-indicator,
.tree-row:focus-visible .tree-active-indicator {
  filter: brightness(0.96);
}

.tree-row.active {
  background: transparent;
  color: #27313a;
  font-weight: 700;
}

.tree-row.hidden-part {
  color: #707070;
}

.tree-row.active.hidden-part {
  color: #707070;
}

.tree-row.hidden-part .tree-name,
.tree-row.hidden-part .tree-icon {
  opacity: 0.54;
}

.tree-visibility-toggle {
  position: relative;
  width: 42px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  background: transparent;
  color: currentColor;
  border-radius: 0;
  opacity: 1;
  cursor: pointer;
}

.tree-visibility-static {
  position: relative;
  width: 42px;
  height: 36px;
  align-self: stretch;
  background: transparent;
  color: #676767;
}

.tree-visibility-toggle:hover,
.tree-visibility-toggle:focus-visible {
  background: transparent;
  outline: none;
}

.tree-row.active .tree-visibility-toggle:hover,
.tree-row.active .tree-visibility-toggle:focus-visible {
  background: transparent;
}

.tree-visibility-toggle::before,
.tree-visibility-static::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 9px;
  width: 25px;
  height: 16px;
  border: 3px solid #696969;
  border-radius: 50%;
  background: #a1a1a1;
  box-shadow: inset 0 0 0 3px #e4e4e4;
}

.tree-visibility-toggle.is-visible::after,
.tree-visibility-static.is-visible::after {
  content: "";
  position: absolute;
  left: 17px;
  top: 14px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #696969;
}

.tree-visibility-toggle:not(.is-visible)::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 17px;
  width: 30px;
  height: 3px;
  border-radius: 2px;
  background: #696969;
  transform: rotate(-42deg);
}

.tree-expander {
  position: relative;
  justify-self: center;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 10px solid #686868;
  transform: rotate(90deg);
  opacity: 1;
}

.part-row .tree-expander {
  transform: none;
  border-left-color: #7b7b7b;
}

.tree-icon {
  position: relative;
  width: 44px;
  height: 36px;
  align-self: stretch;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.tree-icon::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 9px;
  width: 19px;
  height: 20px;
  border: 2px solid #6b6b6b;
  background: linear-gradient(135deg, #eeeeee 0 48%, #cfcfcf 49% 100%);
  transform: skewY(-18deg);
}

.tree-icon::after {
  content: "";
  position: absolute;
  left: 25px;
  top: 6px;
  width: 8px;
  height: 20px;
  border: 2px solid #8e8e8e;
  border-left: 0;
  background: #b7c0c6;
  transform: skewY(-18deg);
}

.project-icon::before {
  border-color: #6a6a6a;
  background: linear-gradient(135deg, #eeeeee 0 50%, #d0d4d5 51% 100%);
}

.project-icon::after {
  background: #aebac1;
}

.tree-row.active .tree-icon {
  background: transparent;
}

.tree-row.running .tree-icon::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 4px;
  width: 9px;
  height: 9px;
  border: 2px solid #eeeeee;
  border-radius: 50%;
  background: var(--amber);
  transform: none;
}

.tree-name {
  min-width: 0;
  max-width: none;
  align-self: stretch;
  padding: 3px 14px 3px 10px;
  background: transparent;
  overflow: visible;
  color: inherit;
  text-overflow: clip;
  white-space: nowrap;
}

.tree-row.active .tree-name {
  background: transparent;
  font-weight: 700;
}

.tree-active-indicator {
  position: relative;
  width: 34px;
  height: 36px;
  align-self: stretch;
  background: transparent;
}

.tree-active-indicator::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 8px;
  width: 20px;
  height: 20px;
  border: 3px solid #898989;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #4a4a4a 0 22%, #dedede 24% 55%, #b8b8b8 57% 100%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.24);
}

.tree-name-input {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 1px 7px;
  border: 1px solid #7ea7c7;
  border-radius: 0;
  background: #ffffff;
  color: #1f2930;
  font-size: 22px;
}

.project-browser-actions {
  display: none;
}

.tree-action-button {
  position: relative;
  width: 28px;
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 2px;
  background: transparent;
  color: #616161;
}

.tree-action-button:hover,
.tree-action-button:focus-visible {
  border-color: #c9c9c9;
  background: #ffffff;
  outline: none;
}

.tree-action-button:disabled {
  background: transparent;
  color: #a4a4a4;
  cursor: wait;
}

.tree-action-button > span,
.tree-action-button > span::before,
.tree-action-button > span::after {
  content: "";
  position: absolute;
  display: block;
}

.new-project-action > span {
  left: 6px;
  top: 8px;
  width: 16px;
  height: 12px;
  border: 2px solid currentColor;
  background: #f4f4f4;
}

.new-project-action > span::before {
  left: -2px;
  top: -6px;
  width: 9px;
  height: 5px;
  border: 2px solid currentColor;
  border-bottom: 0;
  background: #f4f4f4;
}

.new-project-action > span::after {
  right: -7px;
  bottom: -6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background:
    linear-gradient(currentColor 0 0) center / 8px 2px no-repeat,
    linear-gradient(currentColor 0 0) center / 2px 8px no-repeat,
    #ffffff;
  box-shadow: 0 0 0 1px currentColor;
}

.new-part-action > span {
  left: 7px;
  top: 7px;
  width: 14px;
  height: 16px;
  border: 2px solid currentColor;
  background: linear-gradient(135deg, #ffffff 0 50%, #d7dde2 51% 100%);
  transform: skewY(-14deg);
}

.new-part-action > span::after {
  right: -8px;
  bottom: -7px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background:
    linear-gradient(currentColor 0 0) center / 8px 2px no-repeat,
    linear-gradient(currentColor 0 0) center / 2px 8px no-repeat,
    #ffffff;
  box-shadow: 0 0 0 1px currentColor;
  transform: skewY(14deg);
}

.save-project-action > span {
  left: 7px;
  top: 5px;
  width: 15px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 1px;
  background: #ffffff;
}

.save-project-action > span::before {
  left: 2px;
  top: 2px;
  width: 8px;
  height: 5px;
  background: #8cb8d8;
}

.save-project-action > span::after {
  left: 3px;
  bottom: 2px;
  width: 9px;
  height: 6px;
  border-top: 2px solid currentColor;
  background: #f1f1f1;
}

.empty-state {
  color: var(--muted);
  font-size: 13px;
}

.side-panel {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  padding: 0;
  border-width: 0 0 0 1px;
  border-radius: 0;
  background: var(--surface);
  max-height: 100vh;
  overflow: hidden;
}

.prompt-form,
.agent-panel,
.artifact-panel {
  padding: 14px;
}

.chat-panel {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  container-type: inline-size;
}

.chat-panel .panel-heading {
  flex: 0 0 auto;
  min-height: 64px;
  padding: 0 22px;
}

.ghost-button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: #fbfaf6;
  color: var(--muted);
}

.ghost-button:disabled {
  background: #ece8df;
  color: #9b958c;
}

.chat-log {
  display: grid;
  align-content: start;
  gap: 28px;
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 22px 22px 18px;
}

.chat-message {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.chat-message.user {
  justify-items: stretch;
}

.chat-message.assistant {
  justify-items: stretch;
}

.chat-meta {
  display: none;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.chat-bubble {
  max-width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 15px;
  line-height: 1.45;
}

.chat-message.user .chat-bubble {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f7f7f5;
  color: var(--ink);
  font-size: 14px;
}

.chat-message.is-failed .chat-bubble {
  padding: 12px 14px;
  border: 1px solid rgba(166, 66, 53, 0.45);
  border-radius: 14px;
  background: #fff6f3;
}

.chat-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.chat-progress {
  display: grid;
  gap: 7px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.chat-progress li {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.chat-progress-type {
  color: var(--violet);
  font-weight: 800;
  text-transform: uppercase;
}

.chat-code {
  margin-top: 20px;
  overflow: hidden;
  border: 1px solid #e0dfdc;
  border-radius: 14px;
  background: #eeeeef;
  color: #202427;
}

.chat-code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 12px 0 16px;
}

.chat-code-title {
  color: #73777b;
  font-size: 14px;
}

.chat-code pre {
  max-height: 520px;
  margin: 0;
  overflow: auto;
  padding: 16px;
  scrollbar-color: #d5d5d7 transparent;
}

.chat-code code {
  font-family: "Cascadia Code", "Consolas", ui-monospace, monospace;
  font-size: 14px;
  line-height: 1.62;
  white-space: pre;
}

.copy-code-button {
  position: relative;
  width: 32px;
  min-width: 32px;
  min-height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #878b8f;
}

.copy-code-button::before,
.copy-code-button::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.copy-code-button::before {
  top: 8px;
  left: 8px;
  background: #eeeeef;
}

.copy-code-button::after {
  top: 5px;
  left: 12px;
}

.copy-code-button:hover,
.copy-code-button.copied {
  color: var(--teal);
}

.syntax-keyword {
  color: #bd35b7;
}

.syntax-string {
  color: #27934d;
}

.syntax-number {
  color: #9a6a00;
}

.syntax-comment {
  color: #9a9da2;
  font-style: italic;
}

.prompt-form {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 0 0 auto;
  margin: 0 16px 16px;
  min-height: 248px;
  padding: 28px 30px 18px;
  border: 1px solid #dadce0;
  border-radius: 54px;
  background: #ffffff;
  box-shadow:
    0 18px 56px rgba(60, 64, 67, 0.14),
    0 1px 2px rgba(60, 64, 67, 0.08);
  overflow: hidden;
}

.attachment-tray,
.surface-selection-tray {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 2px;
}

.surface-selection-tray {
  padding-bottom: 0;
}

.attachment-chip,
.chat-attachment,
.surface-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-height: 40px;
  padding: 5px 8px 5px 5px;
  border: 1px solid #dedbd4;
  border-radius: 12px;
  background: #f7f7f5;
  color: var(--ink);
  font-size: 12px;
}

.surface-chip {
  border-color: #e5c06a;
  background: #fff6dc;
}

.chat-surface-reference {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.surface-marker {
  width: 30px;
  min-width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 2px solid #7a5a12;
  background: linear-gradient(135deg, #f7c550, #fff2c2);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.42);
}

.surface-chip-text {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.surface-label,
.surface-detail {
  min-width: 0;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.surface-label {
  color: var(--ink);
  font-weight: 800;
}

.surface-detail {
  color: #7c631d;
  font-size: 11px;
}

.attachment-label,
.chat-attachment span:last-child {
  min-width: 0;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-thumb {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  object-fit: cover;
  background: #e9e7e1;
}

.attachment-file-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 30px;
  border-radius: 8px;
  background: #e7ecea;
  color: var(--teal);
  font-size: 9px;
  font-weight: 800;
}

.attachment-file-icon.file {
  background: #ebe9f5;
  color: var(--violet);
}

.remove-attachment,
.remove-surface {
  width: 24px;
  min-width: 24px;
  min-height: 24px;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  line-height: 1;
}

.remove-attachment:hover,
.remove-surface:hover {
  background: #e7e3dc;
  color: var(--danger);
}

.chat-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

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

label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

textarea {
  width: 100%;
  resize: none;
  min-height: 144px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  padding: 8px 4px;
  line-height: 1.45;
}

textarea:focus {
  outline: none;
}

.chat-panel textarea {
  min-height: 118px;
  max-height: 180px;
  padding: 17px 0 8px;
  color: #202124;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 30px;
  font-weight: 400;
  line-height: 1.24;
  letter-spacing: 0;
  caret-color: #202124;
}

.chat-panel textarea::placeholder {
  color: #c4c7c5;
  opacity: 1;
}

button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: var(--teal);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
}

button:disabled {
  background: #8fa7a1;
  cursor: wait;
}

.attach-button {
  width: 48px;
  min-width: 48px;
  min-height: 48px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #8a8c90;
  font-size: 40px;
  font-weight: 300;
  line-height: 1;
}

.attach-button:hover {
  background: transparent;
  color: #5f6368;
}

.attach-button:disabled {
  background: transparent;
  color: #a8aaa5;
}

.send-button {
  position: absolute;
  right: 22px;
  bottom: 20px;
  width: 68px;
  min-width: 68px;
  min-height: 68px;
  border-radius: 50%;
  background: #1f2227;
  color: #ffffff;
}

.send-button:disabled {
  background: #1f2227;
  opacity: 0.46;
}

.send-icon {
  position: relative;
  display: block;
  width: 16px;
  height: 18px;
  margin: 0 auto;
}

.send-icon::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 0;
  width: 3px;
  height: 33px;
  border-radius: 2px;
  background: #fff;
}

.send-icon::after {
  content: "";
  position: absolute;
  left: -3px;
  top: 0;
  width: 20px;
  height: 20px;
  border-top: 3px solid #fff;
  border-left: 3px solid #fff;
  transform: rotate(45deg);
}

.composer-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 68px;
  padding-right: 86px;
}

@media (max-width: 1450px) {
  .prompt-form {
    min-height: 232px;
    padding: 24px 24px 16px;
    border-radius: 42px;
  }

  .chat-panel textarea {
    min-height: 112px;
    font-size: 26px;
  }

  .composer-toolbar {
    min-height: 60px;
    padding-right: 72px;
  }

  .attach-button {
    width: 38px;
    min-width: 38px;
    min-height: 38px;
    font-size: 34px;
  }

  .send-button {
    right: 18px;
    bottom: 18px;
    width: 56px;
    min-width: 56px;
    min-height: 56px;
  }

  .send-icon::before {
    height: 27px;
  }

  .send-icon::after {
    left: -1px;
    width: 16px;
    height: 16px;
  }
}

@container (max-width: 760px) {
  .prompt-form {
    min-height: 232px;
    padding: 24px 24px 16px;
    border-radius: 42px;
  }

  .chat-panel textarea {
    min-height: 112px;
    font-size: 26px;
  }

  .composer-toolbar {
    min-height: 60px;
    padding-right: 64px;
  }

  .attach-button {
    width: 36px;
    min-width: 36px;
    min-height: 38px;
    font-size: 34px;
  }

  .send-button {
    right: 18px;
    bottom: 18px;
    width: 56px;
    min-width: 56px;
    min-height: 56px;
  }

  .send-icon::before {
    height: 27px;
  }

  .send-icon::after {
    left: -1px;
    width: 16px;
    height: 16px;
  }
}

@media (max-width: 760px) {
  .prompt-form {
    margin: 0 12px 14px;
    min-height: 210px;
    padding: 20px 20px 14px;
    border-radius: 34px;
  }

  .chat-panel textarea {
    min-height: 96px;
    font-size: 22px;
  }
}

.agent-panel {
  display: flex;
  flex-direction: column;
  flex: 0 0 240px;
  min-height: 220px;
  overflow: hidden;
}

.agent-panel .panel-heading {
  padding: 0 0 10px;
  min-height: auto;
}

.agent-events {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow: auto;
}

.agent-events li {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.agent-events li:first-child {
  border-top: 0;
}

.event-type {
  color: var(--violet);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.event-message {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
}

.event-time {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.artifact-panel h2 {
  margin-bottom: 12px;
}

dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

dl div {
  display: grid;
  grid-template-columns: 80px 1fr;
  align-items: center;
  gap: 8px;
}

dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

dd {
  margin: 0;
  min-width: 0;
  font-size: 13px;
}

dd a {
  color: var(--amber);
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }

  .side-panel {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  #model-canvas {
    min-height: 340px;
  }
}
