:root {
  --bg: #0b0c10;
  --surface: #14161c;
  --surface-2: #1c1f28;
  --border: rgba(255, 255, 255, 0.09);
  --text: #f3f4f6;
  --text-muted: #9ca3af;
  --amber: #f5a623;
  --amber-soft: rgba(245, 166, 35, 0.16);
  --green: #22c55e;
  --green-soft: rgba(34, 197, 94, 0.15);
  --red: #ef4444;
  --red-soft: rgba(239, 68, 68, 0.16);
  --blue: #60a5fa;
  --radius: 16px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  overscroll-behavior: none;
}

.hidden {
  display: none !important;
}

.app-shell {
  height: 100dvh;
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  position: relative;
}

/* Pairing */
.pairing-screen {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.pairing-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
}

.brand-badge h1 {
  margin: 0;
  font-size: 20px;
}

.muted {
  color: var(--text-muted);
  margin: 2px 0 0;
  font-size: 13px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-group label {
  font-size: 13px;
  color: var(--text-muted);
}

.field-group input, select {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  padding: 12px 14px;
  font-size: 15px;
  outline: none;
}

.field-group input:focus {
  border-color: var(--amber);
}

.hint-text {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

.error-text {
  color: var(--red);
  font-size: 13px;
  margin: 0;
}

/* Main Layout */
.main-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.top-bar {
  padding: calc(10px + var(--safe-top)) 16px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(11, 12, 16, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  z-index: 10;
}

.top-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot.online { background: var(--green); box-shadow: 0 0 8px var(--green); }
.status-dot.warn { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.status-dot.offline { background: var(--red); }

.top-titles {
  min-width: 0;
}

.header-title {
  font-weight: 650;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.icon-pill {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.icon-pill.accent {
  background: var(--amber-soft);
  border-color: rgba(245, 166, 35, 0.35);
  color: var(--amber);
}

/* Banners */
.approval-banner {
  background: linear-gradient(90deg, rgba(245, 166, 35, 0.2), rgba(245, 166, 35, 0.08));
  border-bottom: 1px solid rgba(245, 166, 35, 0.35);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.approval-banner-text {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #fde68a;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  animation: pulse 1.3s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.6); opacity: 0.45; }
}

.engine-banner {
  background: rgba(239, 68, 68, 0.12);
  border-bottom: 1px solid rgba(239, 68, 68, 0.3);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: #fca5a5;
}

/* Viewport & Tabs */
.viewport {
  flex: 1;
  min-height: 0;
  position: relative;
  display: flex;
  flex-direction: column;
}

.tab-panel {
  display: none;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
}

.tab-panel.active {
  display: flex;
}

/* Session Strip */
.session-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
}

.session-strip::-webkit-scrollbar { display: none; }

.chip {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}

.chip.accent {
  background: var(--amber-soft);
  border-color: rgba(245, 166, 35, 0.3);
  color: var(--amber);
}

.config-pickers {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.config-select {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  flex-shrink: 0;
  width: auto;
  min-width: max-content;
}

/* Plan Card */
.plan-card {
  margin: 10px 14px 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.plan-header {
  font-size: 12px;
  font-weight: 600;
  color: var(--amber);
  margin-bottom: 6px;
}

.plan-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}

.plan-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}

.plan-item.in_progress { color: var(--text); font-weight: 500; }
.plan-item.completed { color: var(--green); text-decoration: line-through; opacity: 0.8; }

/* Chat Feed */
.chat-feed {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  -webkit-overflow-scrolling: touch;
}

.empty-state {
  margin: auto;
  text-align: center;
  padding: 28px 16px;
  max-width: 380px;
}

.empty-icon {
  font-size: 36px;
  color: var(--amber);
  margin-bottom: 8px;
}

.empty-state h2 {
  margin: 0 0 6px;
  font-size: 19px;
}

.quick-chips {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.quick-chip-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 13px;
  cursor: pointer;
}

.quick-chip-btn:active {
  border-color: var(--amber);
}

.msg {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 100%;
}

.msg.user {
  align-items: flex-end;
}

.msg-bubble {
  padding: 11px 14px;
  border-radius: 18px;
  max-width: 88%;
  word-break: break-word;
}

.msg.user .msg-bubble {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  color: #0b0c10;
  font-weight: 500;
  border-bottom-right-radius: 6px;
}

.msg.assistant .msg-bubble {
  background: var(--surface);
  border: 1px solid var(--border);
  max-width: 100%;
  border-bottom-left-radius: 6px;
}

.voice-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.22);
  padding: 1px 6px;
  border-radius: 999px;
  margin-right: 6px;
}

.thought-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.thought-box summary {
  cursor: pointer;
  color: var(--amber);
  font-size: 12px;
  font-weight: 600;
  user-select: none;
}

.thought-body {
  margin-top: 8px;
  white-space: pre-wrap;
  font-size: 12.5px;
}

/* Tool Cards */
.tool-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tool-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
}

.tool-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-weight: 600;
}

.tool-status {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.tool-status.completed { background: var(--green-soft); color: var(--green); }
.tool-status.in_progress, .tool-status.pending { background: var(--amber-soft); color: var(--amber); }
.tool-status.failed { background: var(--red-soft); color: var(--red); }

.mono-block {
  margin-top: 8px;
  background: #0a0b0e;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 220px;
  overflow-y: auto;
}

.diff-line-add { color: #4ade80; background: rgba(34, 197, 94, 0.12); display: block; }
.diff-line-del { color: #f87171; background: rgba(239, 68, 68, 0.12); display: block; }
.diff-line-hunk { color: #60a5fa; display: block; }

.md-body p { margin: 0 0 8px; }
.md-body p:last-child { margin-bottom: 0; }
.md-body pre {
  background: #090a0d;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  overflow-x: auto;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12.5px;
}
.md-body code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 5px;
  border-radius: 5px;
  font-size: 13px;
}
.md-body pre code { background: transparent; padding: 0; }

/* Composer */
.composer-wrap {
  position: relative;
  padding: 8px 12px 10px;
  background: rgba(11, 12, 16, 0.96);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.voice-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  margin-bottom: 8px;
  border-radius: 12px;
  background: var(--amber-soft);
  border: 1px solid rgba(245, 166, 35, 0.3);
  font-size: 12px;
  color: #fde68a;
}

.voice-wave {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 14px;
}

.voice-wave span {
  width: 3px;
  height: 100%;
  background: var(--amber);
  border-radius: 2px;
  animation: wave 0.8s ease-in-out infinite;
}

.voice-wave span:nth-child(2) { animation-delay: 0.15s; }
.voice-wave span:nth-child(3) { animation-delay: 0.3s; }
.voice-wave span:nth-child(4) { animation-delay: 0.45s; }

@keyframes wave {
  0%, 100% { transform: scaleY(0.35); }
  50% { transform: scaleY(1); }
}

.auto-send-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  white-space: nowrap;
}

.composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 6px 6px 6px 8px;
}

.composer textarea {
  min-width: 0;
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.4;
  resize: none;
  max-height: 120px;
  padding: 7px 4px;
  outline: none;
}

.btn-attach, .btn-voice {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(245, 166, 35, 0.35);
  background: var(--amber-soft);
  color: var(--amber);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.btn-attach {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text);
}
.composer button:disabled { opacity: 0.5; }
#attachment-strip:not([hidden]) { display: flex; gap: 8px; padding: 0 0 8px; overflow-x: auto; }
.photo-thumb { position: relative; flex: none; border: 0; background: none; padding: 0; cursor: pointer; }
.photo-thumb img { display: block; width: 56px; height: 56px; object-fit: cover; border-radius: 9px; }
.photo-thumb span {
  position: absolute; top: 2px; right: 2px; border-radius: 50%; width: 19px;
  background: #15161c; color: white; line-height: 19px;
}
#slash-menu {
  position: absolute; bottom: 100%; left: 0; z-index: 2;
  width: 100%; max-width: 100%; box-sizing: border-box;
  max-height: min(32dvh, 260px); overflow-y: auto; border-radius: 14px;
  border: 1px solid var(--border); background: var(--surface-2); box-shadow: 0 8px 24px #0008;
}
#slash-menu button {
  display: flex; align-items: baseline; gap: 12px; padding: 10px 14px; width: 100%;
  text-align: left; background: none; border: 0; color: var(--amber); cursor: pointer;
}
#slash-menu button:is(:focus-visible, :hover) { background: var(--amber-soft); }
#slash-menu small { color: var(--text-muted); }
#slash-menu button > * { min-width: 0; overflow-wrap: anywhere; }

.btn-voice.recording {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.25);
}

.btn-send {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--amber);
  color: #0b0c10;
  font-weight: 800;
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
}

.btn-danger-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(239, 68, 68, 0.4);
  background: var(--red-soft);
  color: var(--red);
  font-size: 13px;
  cursor: pointer;
  flex-shrink: 0;
}

/* List Panels (Approvals / Projects / Device) */
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 8px;
  flex-shrink: 0;
}

.panel-header h2 {
  margin: 0;
  font-size: 18px;
}

.header-btns {
  display: flex;
  gap: 8px;
}

.stack-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  -webkit-overflow-scrolling: touch;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card.urgent {
  border-color: rgba(245, 166, 35, 0.5);
  box-shadow: 0 0 0 1px rgba(245, 166, 35, 0.15);
}

.card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.card-title {
  font-weight: 650;
  font-size: 15px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill {
  font-size: 11.5px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
  white-space: nowrap;
  flex-shrink: 0;
}

.pill.green { color: var(--green); background: var(--green-soft); border-color: transparent; }
.pill.amber { color: var(--amber); background: var(--amber-soft); border-color: transparent; }
.pill.red { color: var(--red); background: var(--red-soft); border-color: transparent; }

.btn-primary {
  background: var(--amber);
  color: #0b0c10;
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}

.btn-amber-sm {
  background: var(--amber);
  color: #0b0c10;
  border: none;
  border-radius: 999px;
  padding: 5px 12px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
}

.btn-ghost-sm {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 11px;
  font-size: 12.5px;
  cursor: pointer;
}

.full-width { width: 100%; }

.approval-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 8px;
  margin-top: 4px;
}

#approvals-list, #webhook-content, .webhook-fields, #hook-credentials {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr);
}

.approval-actions button.armed {
  background: #592b19;
  border: 1px solid var(--amber);
  color: #ffdfb0;
  box-shadow: 0 0 10px rgba(239, 95, 58, 0.55);
}

.approval-history { display: block; }
.approval-history summary { cursor: pointer; font-weight: 650; }
.approval-history[open] summary { margin-bottom: 10px; }
.history-record, .webhook-row {
  display: grid;
  gap: 5px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  overflow-wrap: anywhere;
}
.history-record time { margin-left: auto; color: var(--text-muted); font-size: 12px; }
.webhook-row .header-btns { margin-top: 4px; }
.delete-hook { color: #fca5a5; }
.webhook-fields { min-width: 0; margin: 0; padding: 0; border: 0; }
.webhook-fields input, .webhook-fields select { width: 100%; min-width: 0; font-size: 16px; }
.webhook-fields :focus-visible { outline: 2px solid var(--amber); }
#webhook-content button, .webhook-fields button { min-height: 44px; }
.telemetry { margin: 0; font-size: 13px; }
.telemetry > div { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; }
.telemetry dt { color: var(--text-muted); }
.telemetry dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }

.btn-approve {
  background: var(--green);
  color: #052e16;
  border: none;
  border-radius: 11px;
  padding: 10px 12px;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
}

.btn-approve-alt {
  background: var(--amber-soft);
  color: var(--amber);
  border: 1px solid rgba(245, 166, 35, 0.4);
  border-radius: 11px;
  padding: 10px 12px;
  font-weight: 650;
  font-size: 13.5px;
  cursor: pointer;
}

.btn-reject {
  background: var(--red-soft);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 11px;
  padding: 10px 12px;
  font-weight: 650;
  font-size: 13.5px;
  cursor: pointer;
}

.file-change-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 180px;
  overflow-y: auto;
}

.file-change-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
  cursor: pointer;
}

.file-change-row:active { background: rgba(245, 166, 35, 0.14); }

/* QR */
.qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: #ffffff;
  border-radius: 16px;
  width: fit-content;
  margin: 0 auto;
}

.qr-wrap img {
  width: 210px;
  height: 210px;
  display: block;
}

/* Bottom Tab Bar */
.tab-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(15, 17, 22, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  padding: 6px 4px calc(6px + var(--safe-bottom));
  flex-shrink: 0;
}

.tab-item {
  background: transparent;
  border: none;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  padding: 4px 0;
  cursor: pointer;
}

.tab-item.active {
  color: var(--amber);
}

.tab-icon {
  font-size: 18px;
  position: relative;
  line-height: 1.2;
}

.badge {
  position: absolute;
  top: -4px;
  right: -12px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Modal Sheet */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 50;
}

.sheet-card {
  width: 100%;
  max-width: 680px;
  max-height: 85dvh;
  background: var(--surface);
  border-top-left-radius: 22px;
  border-top-right-radius: 22px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding-bottom: var(--safe-bottom);
}

.sheet-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sheet-header h3 {
  margin: 0;
  font-size: 16px;
}

.sheet-body {
  padding: 14px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  position: fixed;
  top: calc(64px + var(--safe-top));
  width: max-content;
  max-width: calc(100% - 24px);
  overflow-wrap: anywhere;
  pointer-events: none;
  left: 50%;
  transform: translateX(-50%);
  background: #1f2430;
  border: 1px solid rgba(245, 166, 35, 0.45);
  color: var(--text);
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 13px;
  z-index: 100;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.queued-prompts { max-height: 18dvh; overflow: auto; padding: 4px 10px; font-size: 13px; }
.queued-prompts > div { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.queued-prompts span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queued-prompts button { flex: none; }
.risk-badge { padding: 8px 10px; border-radius: 8px; font-weight: 700; }
.risk-badge.high { background: #661f28; color: #fff0f0; }
.risk-badge.elevated { background: #533813; color: #ffdf9d; }
.diff-expand { margin: 8px 0; padding: 9px 12px; border-radius: 8px; background: #ffd08a; color: #281b09; font-weight: 700; }
.diff-fullscreen .sheet-card { max-width: none; height: 100dvh; max-height: 100dvh; padding-top: env(safe-area-inset-top); }
.full-diff { width: max-content; min-width: 100%; margin: 0; font: 12px/1.5 ui-monospace, monospace; }
