:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  color: var(--text);
  background: var(--canvas);
  font-size: 16px;
  line-height: 1.5;
  --canvas: #fff;
  --surface: #f9f8f7;
  --raised: #f0efed;
  --border: #e6e5e3;
  --text: #2c2c2b;
  --muted: #706d69;
  --accent: #216db4;
  --tint: #e5f2fc;
  --green: #27784a;
  --error: #b4372b;
  --warning: #8b501b;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button,
input,
select,
textarea {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--canvas);
  color: var(--text);
}
input,
select,
textarea {
  padding: 10px 12px;
  min-width: 0;
  max-width: 100%;
}
textarea {
  resize: vertical;
}
button {
  min-height: 44px;
  padding: 8px 14px;
  transition: background 0.15s;
}
button:hover {
  background: var(--raised);
}
a {
  color: var(--accent);
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h2 {
  font-size: 24px;
  letter-spacing: -0.7px;
}
small {
  font-size: 14px;
  color: var(--muted);
}
.muted {
  color: var(--muted);
}
.primary {
  background: var(--text);
  color: var(--canvas);
  border-color: var(--text);
  font-weight: 600;
}
.primary:hover {
  background: var(--accent);
  border-color: var(--accent);
}
.secondary {
  background: var(--canvas);
}
.icon {
  border: 0;
  background: transparent;
  font-size: 21px;
  min-width: 44px;
  padding: 8px;
}
.text-button {
  background: transparent;
  border: 0;
  color: var(--muted);
  padding: 6px 8px;
}
.dot {
  width: 7px;
  height: 7px;
  display: inline-block;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}
.section-label {
  font-size: 14px;
  letter-spacing: 1.4px;
  font-weight: 600;
  color: var(--muted);
}
.app {
  height: 100dvh;
  display: flex;
  overflow: hidden;
}
.sidebar {
  width: 248px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 24px 16px 16px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
}
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 28px;
  padding: 0 8px;
  font-size: 20px;
  letter-spacing: -0.7px;
}
.brand-symbol {
  height: 56px;
  width: 56px;
  display: grid;
  place-items: center;
  background: var(--text);
  color: var(--canvas);
  border-radius: 14px;
  font-size: 44px;
  font-weight: 500;
  font-family: Georgia, serif;
  line-height: 1;
  padding-bottom: 8px;
}
.brand-symbol.small {
  height: 30px;
  width: 30px;
  border-radius: 8px;
  font-size: 29px;
  padding-bottom: 4px;
}
.local-badge {
  border: 1px solid var(--border);
  font-size: 14px;
  letter-spacing: 1px;
  padding: 2px 5px;
  border-radius: 4px;
  margin-left: auto;
  color: var(--muted);
}
.new-chat {
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  background: var(--canvas);
  font-weight: 500;
  margin-bottom: 28px;
}
.new-chat span {
  font-size: 22px;
}
.new-chat kbd {
  font-family: inherit;
  margin-left: auto;
  font-size: 14px;
  color: var(--muted);
}
.sidebar .section-label {
  padding: 0 12px;
  margin-bottom: 10px;
}
.chat-link,
.agent-link {
  border: 0;
  background: transparent;
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-bottom: 4px;
  padding: 10px 12px;
  overflow: hidden;
}
.chat-link span,
.agent-link .agent-name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.chat-link.active,
.agent-link.active {
  background: var(--raised);
  font-weight: 600;
}
.chat-link .chat-icon {
  font-size: 17px;
  color: var(--muted);
  flex-shrink: 0;
}
.agent-link .dot {
  width: 6px;
  height: 6px;
  background: var(--muted);
}
.agent-link.running .dot,
.agent-link.sleeping .dot {
  background: var(--green);
}
.agent-link.error .dot,
.agent-link.needs_review .dot {
  background: var(--error);
}
.agent-link small {
  margin-left: auto;
  font-size: 14px;
}
.agent-heading {
  margin-top: 28px;
  display: flex;
  justify-content: space-between;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 32px;
}
.host-note {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  font-size: 14px;
}
.host-note small {
  font-size: 14px;
}
.settings-button {
  width: 100%;
  background: transparent;
  border: 0;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
}
.settings-button .muted {
  margin-left: auto;
}
.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.topbar {
  height: 76px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 28px;
  flex-shrink: 0;
}
.breadcrumb {
  display: flex;
  gap: 14px;
  align-items: center;
  min-width: 0;
  color: var(--muted);
  font-size: 14px;
}
.breadcrumb strong {
  color: var(--text);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.state-tag {
  font-size: 14px;
  color: var(--muted);
}
.workspace {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.conversation {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  position: relative;
}
.welcome {
  max-width: 780px;
  margin: auto;
  padding: 56px 48px;
  width: 100%;
}
.eyebrow {
  font-size: 14px;
  letter-spacing: 1.8px;
  font-weight: 600;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}
.welcome h1 {
  font-size: clamp(38px, 4vw, 62px);
  line-height: 1.1;
  letter-spacing: -2.5px;
  font-weight: 550;
  margin-bottom: 24px;
}
.welcome h1 span {
  color: var(--muted);
}
.welcome > p {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 32px;
}
.welcome > .primary {
  display: flex;
  gap: 36px;
  align-items: center;
}
.welcome-features {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  border-top: 1px solid var(--border);
  padding-top: 28px;
  margin-top: 48px;
}
.welcome-features > div {
  flex: 1;
  min-width: 135px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.feature-icon {
  font-size: 21px;
  margin-bottom: 6px;
}
.welcome-features strong {
  font-size: 14px;
  font-weight: 500;
}
.welcome-features small {
  font-size: 14px;
  line-height: 1.6;
}
.security-note {
  font-size: 14px;
  color: var(--muted);
  margin-top: 36px;
}
.inspector {
  width: 40%;
  max-width: 740px;
  min-width: 340px;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  background: var(--surface);
}
.inspector-header {
  height: 59px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  gap: 12px;
}
.inspector-header .muted {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  padding: 0 12px;
  flex-shrink: 0;
}
.tabs button {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 12px 10px;
  font-size: 14px;
  color: var(--muted);
  flex: 1;
  position: relative;
}
.tabs button.active {
  color: var(--text);
  font-weight: 600;
}
.tabs button.active:after {
  content: '';
  position: absolute;
  height: 2px;
  background: var(--text);
  left: 10px;
  right: 10px;
  bottom: -1px;
}
.tool-panel {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
}
.address-bar {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--canvas);
  padding-left: 12px;
  color: var(--muted);
  flex-shrink: 0;
}
.address-bar input {
  border: 0;
  background: transparent;
  width: 100%;
  font-size: 14px;
  padding: 10px 8px;
}
.browser-empty {
  min-height: 270px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 8px;
  gap: 16px;
}
.browser-placeholder {
  width: 70px;
  height: 58px;
  border: 1px solid var(--border);
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 26px;
  color: var(--muted);
  background: var(--canvas);
}
.browser-empty h2 {
  font-size: 18px;
  letter-spacing: -0.3px;
}
.browser-empty p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.8;
}
.browser-empty small {
  font-size: 14px;
}
.browser-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  margin-top: 16px;
  padding-top: 12px;
  flex-shrink: 0;
}
.switch-label {
  display: flex !important;
  align-items: center;
  gap: 8px;
  font-size: 14px !important;
  min-height: 44px;
}
.switch-label input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}
.browser-controls .text-button {
  font-size: 14px;
}
.panel-help {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.8;
  padding: 12px 0;
}
.inspector-footer {
  border-top: 1px solid var(--border);
  height: 42px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  flex-shrink: 0;
}
.inspector-footer span:last-child {
  margin-left: auto;
}
.viewport {
  position: relative;
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: white;
  touch-action: pan-y;
  flex-shrink: 0;
  line-height: 0;
}
.viewport.control {
  touch-action: none;
  cursor: crosshair;
}
.viewport img {
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
}
.live-indicator {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #fff;
  color: #27784a;
  font-size: 14px;
  letter-spacing: 1px;
  padding: 8px;
  line-height: 1;
  border-radius: 4px;
  pointer-events: none;
}
.inline-form {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.inline-form input,
.inline-form select {
  flex: 1;
  min-width: 120px;
}
.inline-form button {
  flex-shrink: 0;
}
.panel-error {
  font-size: 14px;
  color: var(--error);
  background: var(--canvas);
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: 8px;
  margin-top: 16px;
  overflow-wrap: anywhere;
}
.chat-body {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
}
.context-bar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 28px;
  font-size: 14px;
  color: var(--muted);
  flex-shrink: 0;
}
.context-bar span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.messages {
  overflow-y: auto;
  flex: 1;
  padding: 8px 32px 24px;
  scroll-behavior: smooth;
}
.message {
  max-width: 760px;
  margin: 0 auto 24px;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.8;
}
.message-label {
  font-size: 14px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.message.user .message-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  white-space: pre-wrap;
}
.message.assistant .message-content {
  white-space: pre-wrap;
}
.thinking-block {
  font-size: 14px;
  color: var(--muted);
  border-left: 2px solid var(--border);
  padding-left: 12px;
  white-space: pre-wrap;
  max-height: 200px;
  overflow: auto;
  margin: 12px 0;
}
.tool-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 8px auto 16px;
  max-width: 760px;
  background: var(--surface);
  font-size: 14px;
  overflow: hidden;
}
.tool-card summary {
  padding: 12px 14px;
  cursor: pointer;
  font-family: ui-monospace, Consolas, monospace;
  overflow-wrap: anywhere;
}
.tool-card summary .tool-status {
  float: right;
  font-family: inherit;
  color: var(--muted);
}
.tool-card pre {
  padding: 0 16px 16px;
  margin: 0;
  max-height: 420px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
}
.event-note {
  max-width: 760px;
  margin: 12px auto;
  color: var(--muted);
  font-size: 14px;
  border-left: 2px solid var(--border);
  padding: 4px 12px;
  overflow-wrap: anywhere;
}
.event-note.error {
  color: var(--error);
  border-color: var(--error);
}
.composer-wrap {
  padding: 16px 28px 16px;
  flex-shrink: 0;
}
.composer {
  border: 1px solid var(--border);
  border-radius: 12px;
  max-width: 800px;
  margin: 0 auto;
  padding: 12px 12px 8px;
  background: var(--canvas);
  box-shadow: 0 2px 6px #00000003;
}
.composer:focus-within {
  border-color: var(--muted);
}
.composer textarea {
  width: 100%;
  border: 0;
  outline: 0;
  resize: none;
  padding: 4px 4px 12px;
  font-size: 14px;
  max-height: 180px;
  min-height: 60px;
}
.composer-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.model-controls {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
  min-width: 0;
}
.model-controls input {
  border: 0;
  background: var(--surface);
  font-size: 14px;
  width: 145px;
  padding: 8px;
}
.model-controls select {
  font-size: 14px;
  border: 0;
  color: var(--muted);
  max-width: 145px;
  padding: 8px 4px;
}
.send {
  background: var(--text);
  color: var(--canvas);
  font-size: 22px;
  width: 44px;
  flex-shrink: 0;
  border: 0;
  line-height: 1;
  padding: 0;
}
.send:hover {
  background: var(--accent);
}
.composer-note {
  max-width: 800px;
  margin: 8px auto 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 14px;
}
.review-banner {
  padding: 12px;
  margin-bottom: 12px;
  background: var(--surface);
  color: var(--warning);
  font-size: 14px;
  border-radius: 8px;
}
.console-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
}
.console-toolbar select {
  flex: 1;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 14px;
}
.terminal {
  background: #191b1e;
  color: #d9dce1;
  border-radius: 8px;
  flex: 1;
  min-height: 230px;
  padding: 16px;
  font:
    14px/1.7 ui-monospace,
    Consolas,
    monospace;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  tab-size: 4;
  margin: 12px 0 0;
}
.network-list {
  overflow: auto;
  min-height: 0;
}
.network-row {
  display: flex;
  width: 100%;
  text-align: left;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  margin-bottom: 8px;
  background: var(--canvas);
}
.network-row .url {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  flex: 1;
}
.network-row .method {
  font:
    14px ui-monospace,
    Consolas,
    monospace;
  color: var(--accent);
}
.network-detail {
  font:
    14px/1.6 ui-monospace,
    Consolas,
    monospace;
  background: var(--canvas);
  padding: 16px;
  max-height: 400px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border-radius: 8px;
}
.todo-list {
  padding: 12px 4px;
}
.todo-row {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.todo-row .done {
  color: var(--green);
}
.todo-row.done .todo-text {
  text-decoration: line-through;
  color: var(--muted);
}
.todo-row .status {
  font-size: 14px;
  color: var(--muted);
  margin-left: auto;
}
.section-divider {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-top: 24px;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 600;
}
.login-screen {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  background: var(--surface);
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 440px;
  padding: 36px;
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.login-card h1 {
  font-size: 28px;
  letter-spacing: -1px;
}
.login-card p {
  color: var(--muted);
}
.login-card small {
  font-size: 14px;
}
.error-text {
  color: var(--error) !important;
  font-size: 14px;
}
.login-card label,
dialog label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  margin-top: 16px;
}
dialog {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--canvas);
  color: var(--text);
  padding: 28px;
  width: calc(100vw - 32px);
  max-width: 580px;
  max-height: 90dvh;
  overflow: auto;
  box-shadow: 0 20px 80px #0002;
}
dialog::backdrop {
  background: #0005;
  backdrop-filter: blur(3px);
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
}
.dialog-heading .eyebrow {
  margin-bottom: 8px;
}
.dialog-heading h2 {
  font-weight: 550;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 28px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.input-with-button {
  display: flex;
  gap: 8px;
}
.input-with-button input {
  width: 100%;
}
dialog small {
  font-size: 14px;
}
.warning-note {
  color: var(--warning);
  font-size: 14px;
  margin-top: 16px;
  line-height: 1.7;
}
.folder-list {
  margin-top: 16px;
  max-height: 360px;
  overflow: auto;
}
.folder-item {
  width: 100%;
  display: flex;
  gap: 12px;
  border: 0;
  border-radius: 4px;
  text-align: left;
  background: transparent;
}
.probe-result {
  font-size: 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 200px;
  overflow: auto;
  padding: 12px;
  background: var(--surface);
  border-radius: 8px;
}
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100vw - 32px);
  padding: 14px 20px;
  background: var(--text);
  color: var(--canvas);
  border-radius: 8px;
  box-shadow: 0 4px 24px #0002;
  z-index: 100;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.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;
}
.mobile-only {
  display: none;
}
.inspector-off .inspector {
  display: none;
}
@media (min-width: 1600px) {
  .welcome {
    padding: 64px;
  }
  .messages {
    padding-left: 48px;
    padding-right: 48px;
  }
}
@media (max-width: 1180px) {
  .sidebar {
    width: 216px;
    padding-left: 12px;
    padding-right: 12px;
  }
  .inspector {
    min-width: 310px;
    width: 39%;
  }
  .welcome {
    padding: 32px;
  }
  .welcome-features {
    gap: 16px;
  }
  .welcome-features > div {
    min-width: 140px;
  }
  .composer-note span:last-child {
    display: none;
  }
  .topbar {
    padding: 0 20px;
  }
  .messages {
    padding: 8px 24px 24px;
  }
}
@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 270px;
    z-index: 20;
    box-shadow: 20px 0 60px #0002;
    transform: translateX(-110%);
    transition: transform 0.2s;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .mobile-only {
    display: block;
  }
  .brand .mobile-only {
    margin-left: 4px;
  }
  .brand .local-badge {
    margin-left: auto;
  }
  .inspector {
    width: 43%;
    min-width: 300px;
  }
  .topbar {
    height: 64px;
    padding: 0 16px;
    gap: 8px;
  }
  .breadcrumb {
    margin-right: auto;
  }
  .topbar-right {
    gap: 0;
  }
  .welcome {
    padding: 32px;
  }
  .welcome h1 {
    font-size: 46px;
  }
}
@media (max-width: 620px) {
  .workspace {
    position: relative;
  }
  .conversation {
    width: 100%;
  }
  .inspector {
    position: absolute;
    inset: 0;
    width: 100%;
    max-width: none;
    min-width: 0;
    z-index: 5;
    border-left: 0;
  }
  .app:not(.inspector-off) .conversation {
    visibility: hidden;
  }
  .breadcrumb > span {
    display: none;
  }
  .state-tag {
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
  }
  .topbar {
    height: 60px;
    padding: 0 8px;
  }
  .welcome {
    padding: 32px 24px;
    overflow: auto;
  }
  .welcome h1 {
    font-size: 48px;
  }
  .welcome > p {
    font-size: 15px;
  }
  .welcome-features {
    margin-top: 32px;
    gap: 20px;
  }
  .welcome-features > div {
    min-width: 135px;
    flex-basis: 40%;
  }
  .security-note {
    margin-top: 24px;
    font-size: 14px;
  }
  .chat-body .context-bar {
    padding: 12px 16px;
    font-size: 14px;
  }
  .messages {
    padding: 8px 16px 24px;
  }
  .composer-wrap {
    padding: 12px 16px;
  }
  .composer-note {
    font-size: 14px;
  }
  .composer textarea {
    font-size: 16px;
  }
  .model-controls input {
    width: 135px;
  }
  .model-controls select {
    max-width: 135px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .dialog-actions {
    flex-wrap: wrap;
  }
  .input-with-button input {
    min-width: 0;
  }
  dialog {
    padding: 20px;
  }
  .login-card {
    padding: 28px;
  }
  .message {
    font-size: 14px;
  }
  .browser-empty {
    min-height: 250px;
  }
  .inline-form input {
    font-size: 16px;
  }
  .inspector-header {
    height: 50px;
  }
}
@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #191919;
    --surface: #202020;
    --raised: #30302e;
    --border: #3b3b39;
    --text: #f1f1ef;
    --muted: #aeaba5;
    --accent: #8bbbef;
    --tint: #243242;
    --green: #72bc8f;
    --error: #f0958b;
    --warning: #e5b07e;
  }
  .primary:hover,
  .send:hover {
    color: #191919;
  }
  .terminal {
    background: #111315;
  }
  .live-indicator {
    background: #202020;
    color: #72bc8f;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.svg-icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.browser-placeholder .svg-icon {
  width: 28px;
  height: 28px;
}
.feature-icon .svg-icon {
  width: 24px;
  height: 24px;
}

.section-label {
  letter-spacing: 0.7px;
}
.eyebrow {
  font-size: 12px;
}
.local-badge {
  font-size: 12px;
}
.composer-note {
  flex-wrap: wrap;
}
.brand .local-badge {
  font-size: 10px;
}
.host-note small,
.inspector-footer {
  font-size: 12px;
}

label.switch-label {
  flex-direction: row;
  align-items: center;
}
.switch-label input {
  flex-shrink: 0;
}
.inspector-header .section-label {
  margin-right: auto;
}
.inspector-header {
  gap: 8px;
}
.inspector-full .inspector {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  z-index: 30;
}
.inspector-full .viewport {
  max-width: 1280px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

#browser-size {
  font-size: 14px;
  max-width: 180px;
}
.browser-controls {
  justify-content: flex-start;
}
.browser-controls .text-button {
  margin-left: auto;
}

#register-model {
  margin-top: 12px;
  margin-bottom: 12px;
}

.browser-controls {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface);
  margin-top: 8px;
  padding: 8px 0;
}
#browser-size {
  max-width: 160px;
}
.viewport {
  flex-shrink: 0;
}

.message-actions { display:none; gap:12px; margin-top:8px; }
.message.actions-open > .message-actions {display:flex;}
.message:focus-visible {outline:1px solid currentColor;outline-offset:4px;border-radius:8px;}
#message-edit-text {width:100%;min-height:160px;}

#browser-session-bar {display:none;}
.browser-only #sidebar,.browser-only .topbar,.browser-only .conversation,.browser-only .inspector-header,.browser-only .tabs,.browser-only .inspector-footer,.browser-only .panel-help,.browser-only #open-browser-page {display:none!important;}
.browser-only #app,.browser-only .main,.browser-only .workspace {width:100%;height:100dvh;min-height:0;margin:0;}
.browser-only #inspector {display:flex!important;position:relative;inset:auto;width:100%;max-width:none;min-width:0;border:0;height:100%;}
.browser-only #panel-browser {padding:12px 16px 20px;overflow:auto;display:flex;flex-direction:column;align-items:stretch;min-height:0;}
.browser-only #browser-session-bar {display:flex;align-items:center;gap:12px;margin-bottom:10px;flex-wrap:wrap;flex-shrink:0;}
.browser-only #browser-chat-select {flex:1;min-width:140px;max-width:420px;}
.browser-only #browser-agent-select {max-width:240px;}
.browser-only #browser-session-bar a {text-decoration:none;color:var(--text);white-space:nowrap;}
.browser-only #browser-logout {margin-left:auto;}
.browser-only #viewport {width:100%;max-width:1600px;margin:12px auto 0;}
.browser-only .browser-controls {position:static;}
#open-browser-page {white-space:nowrap;text-decoration:none;color:var(--muted);font-size:13px;}
@media(max-width:620px){.browser-only #panel-browser {padding:10px 10px max(14px,env(safe-area-inset-bottom));}.browser-only #browser-session-bar {gap:8px;}.browser-only #browser-chat-select {order:3;max-width:none;flex-basis:55%;}.browser-only #browser-agent-select {order:4;max-width:40%;}.browser-only #browser-type {flex-wrap:wrap;}.browser-only #browser-text {flex:1;min-width:120px;}.browser-only .browser-controls {gap:8px;}.browser-only .browser-controls .switch-label{font-size:13px;}}

/* Captcha must remain reachable on small/mobile login screens. */
.login-screen{overflow-y:auto;align-items:safe center;padding:20px}.login-card{flex-shrink:0;max-height:none}#login-captcha{width:100%;min-width:0}#captcha-frame{display:block;width:100%;height:620px;border:0;border-radius:10px;background:#fff}#captcha-status{font-size:13px}body:has(#login-captcha:not([hidden])) .login-card{width:min(760px,100%)}
body:has(#login-captcha:not([hidden])) .login-card{max-width:760px}
