:root {
  color-scheme: dark;
  --viewport-height: 100dvh;
  --page: #080c13;
  --panel: #0f1622;
  --panel-raised: #131c2a;
  --line: #243044;
  --line-soft: #1b2637;
  --text: #edf3ff;
  --muted: #8f9db2;
  --green: #77ddaa;
  --blue: #89b4fa;
  --amber: #f6c177;
  --red: #f38ba8;
  --radius: 15px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; background: var(--page); }

body {
  min-height: var(--viewport-height);
  color: var(--text);
  background:
    radial-gradient(circle at 75% -20%, rgba(75, 123, 189, .18), transparent 42%),
    radial-gradient(circle at 10% 110%, rgba(65, 143, 111, .12), transparent 40%),
    var(--page);
  overscroll-behavior: none;
}

button, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.shell {
  width: min(1180px, 100%);
  min-height: var(--viewport-height);
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) max(22px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left));
}
.shell.preview-shell {
  width: 100%;
  padding-top: max(10px, env(safe-area-inset-top));
  padding-right: env(safe-area-inset-right);
  padding-left: env(safe-area-inset-left);
}
.preview-shell .topbar,
.preview-shell .agent-telemetry {
  margin-right: 16px;
  margin-left: 16px;
}
.preview-shell .workspace {
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}
.preview-shell .preview-topbar {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) max-content;
  gap: clamp(12px, 2vw, 26px);
  min-height: 38px;
  margin-bottom: 8px;
}
.preview-shell .brand-lockup { gap: 8px; }
.preview-shell .mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  box-shadow: none;
}
.preview-shell .eyebrow { font-size: 8px; }
.preview-shell h1 { font-size: 14px; }
.preview-session-summary {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-left: 14px;
  border-left: 1px solid var(--line-soft);
  overflow: hidden;
}
.session-chip {
  flex: 0 0 auto;
  color: var(--blue);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .11em;
}
.preview-session-summary strong {
  max-width: 35%;
  flex: 0 1 auto;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.preview-session-summary #session-meta {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font: 10px/1.3 ui-monospace, SFMono-Regular, Consolas, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.preview-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.preview-controls .connection {
  font-size: 11px;
  white-space: nowrap;
}
.preview-controls .secondary-button {
  padding: 6px 8px;
  font-size: 10px;
}

.topbar, .session-heading, .brand-lockup, .connection, .terminal-toolbar, .evidence-item {
  display: flex;
  align-items: center;
}

.topbar { justify-content: space-between; margin-bottom: 30px; }
.brand-lockup { gap: 12px; }
.mark {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(145deg, #8cc8ff, #78dda9);
  color: #06111a;
  font-weight: 900;
  box-shadow: 0 8px 30px rgba(97, 184, 193, .2);
}
.eyebrow, .section-label { margin: 0; color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .19em; }
h1 { margin: 1px 0 0; font-size: 18px; line-height: 1; letter-spacing: -.02em; }
.lab-badge, .e2ee-pill {
  padding: 4px 7px;
  border: 1px solid rgba(137, 180, 250, .3);
  border-radius: 6px;
  color: var(--blue);
  background: rgba(137, 180, 250, .08);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .11em;
}

.connection { gap: 9px; color: var(--muted); font-size: 13px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 4px rgba(246, 193, 119, .1); }
.connection.online .status-dot { background: var(--green); box-shadow: 0 0 0 4px rgba(119, 221, 170, .1), 0 0 17px rgba(119, 221, 170, .32); }
.connection.error .status-dot { background: var(--red); box-shadow: 0 0 0 4px rgba(243, 139, 168, .1); }

.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 275px; gap: 18px; }
.session-heading { grid-column: 1 / -1; justify-content: space-between; gap: 20px; }
.session-heading h2 { margin: 7px 0 4px; font-size: clamp(20px, 3vw, 27px); letter-spacing: -.03em; }
.session-heading p:last-child { margin: 0; color: var(--muted); font-size: 13px; }
.secondary-button {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px 12px;
  color: var(--muted);
  background: rgba(18, 27, 41, .75);
  cursor: pointer;
}
.secondary-button:hover { color: var(--text); border-color: #35465f; }

.agent-telemetry {
  position: relative;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(210px, .8fr) minmax(0, 2.5fr);
  grid-template-areas:
    "identity metrics"
    "git metrics";
  gap: 10px 18px;
  overflow: hidden;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background:
    linear-gradient(110deg, rgba(137, 180, 250, .07), transparent 40%),
    rgba(15, 22, 34, .88);
  box-shadow: 0 14px 42px rgba(0, 0, 0, .18);
  transition: border-color .18s ease, opacity .18s ease;
}
.agent-telemetry::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: linear-gradient(var(--blue), var(--green));
  content: "";
}
.agent-telemetry.pending { opacity: .72; }
.agent-telemetry.ready { border-color: rgba(137, 180, 250, .28); opacity: 1; }
.agent-identity {
  grid-area: identity;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
}
.agent-tool-mark {
  width: 36px;
  height: 36px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(137, 180, 250, .35);
  border-radius: 10px;
  color: var(--blue);
  background: rgba(137, 180, 250, .09);
  font: 800 10px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: -.02em;
}
.agent-identity-copy { min-width: 0; }
.agent-identity-copy strong {
  display: block;
  margin: 4px 0 2px;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agent-identity-copy > p:last-child {
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font: 10px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.telemetry-e2ee {
  margin-left: auto;
  padding: 4px 6px;
  border: 1px solid rgba(119, 221, 170, .22);
  border-radius: 6px;
  color: var(--green);
  background: rgba(119, 221, 170, .06);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .1em;
  white-space: nowrap;
}
.agent-metrics {
  grid-area: metrics;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(105px, 1.15fr) minmax(70px, .65fr) minmax(165px, 1.35fr) minmax(230px, 1.85fr);
  align-items: stretch;
}
.telemetry-metric {
  min-width: 0;
  padding: 1px 14px;
  border-left: 1px solid var(--line-soft);
}
.metric-label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.metric-value {
  display: block;
  overflow: hidden;
  color: #dbe7f7;
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.metric-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 9px;
}
.metric-heading .metric-label { margin-bottom: 0; }
.metric-heading strong { color: #dbe7f7; font-size: 10px; }
.metric-detail,
.quota-item small {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: #718097;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.telemetry-meter {
  --meter-fill: 0%;
  height: 5px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #202c3e;
}
.telemetry-meter i {
  display: block;
  width: var(--meter-fill);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #719de4, var(--blue));
  transition: width .25s ease;
}
.quota-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.quota-five-meter i { background: linear-gradient(90deg, #63c494, var(--green)); }
.quota-week-meter i { background: linear-gradient(90deg, #d9a457, var(--amber)); }
.telemetry-meter.warning i { background: linear-gradient(90deg, #dc738f, var(--red)); }
.agent-git {
  grid-area: git;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  color: #8796aa;
  font: 10px/1.35 ui-monospace, SFMono-Regular, Consolas, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agent-git[hidden] { display: none; }
.agent-git > span:first-child { color: var(--green); font-size: 15px; }

.preview-shell .agent-telemetry {
  grid-template-columns: minmax(185px, .85fr) minmax(0, 3fr) auto;
  grid-template-areas: "identity metrics git";
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 10px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, .14);
}
.preview-shell .agent-telemetry::before { width: 2px; }
.preview-shell .agent-identity { gap: 8px; }
.preview-shell .agent-tool-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 9px;
}
.preview-shell .agent-identity-copy .section-label,
.preview-shell .telemetry-e2ee { display: none; }
.preview-shell .agent-identity-copy strong {
  margin: 0 0 1px;
  font-size: 12px;
}
.preview-shell .agent-identity-copy > p:last-child { font-size: 9px; }
.preview-shell .agent-metrics {
  grid-template-columns: minmax(92px, 1.05fr) minmax(58px, .6fr) minmax(150px, 1.35fr) minmax(210px, 1.8fr);
  gap: 0;
  padding-top: 0;
  border-top: 0;
}
.preview-shell .telemetry-metric { padding: 1px 10px; }
.preview-shell .metric-label { margin-bottom: 4px; }
.preview-shell .telemetry-meter {
  height: 4px;
  margin-top: 4px;
}
.preview-shell .metric-detail,
.preview-shell .quota-item small { margin-top: 3px; }
.preview-shell .context-metric,
.preview-shell .quota-metric {
  grid-column: auto;
  padding-top: 1px;
  border-top: 0;
}
.preview-shell .agent-git {
  max-width: 180px;
  padding-left: 12px;
  border-left: 1px solid var(--line-soft);
}

.terminal-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(10, 15, 23, .91);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .28);
}
.terminal-card.drag-active {
  border-color: rgba(137, 180, 250, .78);
  box-shadow: 0 0 0 3px rgba(137, 180, 250, .13), 0 28px 80px rgba(0, 0, 0, .28);
}
.terminal-toolbar {
  height: 44px;
  gap: 10px;
  padding: 0 15px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
  background: rgba(18, 26, 39, .84);
  font: 11px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
}
.window-dots { display: flex; gap: 6px; margin-right: 3px; }
.window-dots i { width: 8px; height: 8px; border-radius: 50%; background: #3a4556; }
.window-dots i:first-child { background: #d36f7f; }
.window-dots i:nth-child(2) { background: #d8aa61; }
.window-dots i:last-child { background: #6bb68d; }
.e2ee-pill { margin-left: auto; color: var(--green); border-color: rgba(119, 221, 170, .25); background: rgba(119, 221, 170, .07); }

.terminal-viewport {
  --terminal-bg: #1e1e1e;
  --terminal-fg: #d4d4d4;
  min-height: 410px;
  max-height: min(58vh, 590px);
  overflow: auto;
  padding: 20px 22px;
  cursor: text;
  background: var(--terminal-bg);
  scrollbar-color: #344258 transparent;
}
#terminal {
  display: block;
  min-width: max-content;
  margin: 0;
  color: var(--terminal-fg);
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.48;
  font-variant-ligatures: none;
  font-kerning: none;
  white-space: pre;
  tab-size: 8;
}
.terminal-row {
  position: relative;
  display: block;
  height: 1.48em;
  line-height: 1.48em;
}
.terminal-cell {
  position: absolute;
  display: inline-block;
  left: 0;
  width: 1ch;
  min-width: 0;
  height: 100%;
  overflow: visible;
  box-sizing: border-box;
  color: var(--cell-fg, var(--terminal-fg));
  font: inherit;
  line-height: inherit;
  white-space: pre;
}
.terminal-cell.terminal-bold { font-weight: 700; }
.terminal-cell.terminal-italic { font-style: italic; }
.terminal-cell.terminal-underline { text-decoration-line: underline; }
.terminal-cell.terminal-strikethrough { text-decoration-line: line-through; }
.terminal-cell.terminal-underline.terminal-strikethrough {
  text-decoration-line: underline line-through;
}
.terminal-cell.terminal-faint {
  color: color-mix(in srgb, var(--cell-fg) 55%, var(--cell-bg));
}

.mobile-keys {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 9px 12px;
  border-top: 1px solid var(--line-soft);
  scrollbar-width: none;
}
.mobile-keys::-webkit-scrollbar { display: none; }
.mobile-keys button {
  min-width: 45px;
  min-height: 32px;
  flex: 0 0 auto;
  border: 1px solid #2b394e;
  border-radius: 7px;
  color: #b9c5d7;
  background: #151f2e;
  cursor: pointer;
  font: 11px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
}
.mobile-keys button:active { transform: translateY(1px); color: var(--text); background: #202d40; }
.mobile-keys button.history-key { color: var(--blue); border-color: rgba(137, 180, 250, .35); }
.mobile-keys button:disabled { opacity: .38; cursor: default; transform: none; }

.input-shell {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  border-top: 1px solid var(--line-soft);
  color: var(--green);
  background: #0d141f;
}
.input-shell:focus-within { box-shadow: inset 0 0 0 1px rgba(119, 221, 170, .25); }
#terminal-input {
  width: 100%;
  height: 28px;
  resize: none;
  overflow: hidden;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font: 13px/1.7 ui-monospace, SFMono-Regular, Consolas, monospace;
}
#terminal-input::placeholder { color: #5f6b7d; }

.attachment-panel {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-top: 1px solid var(--line-soft);
  background: rgba(15, 22, 34, .92);
}
.attachment-actions { display: flex; flex: 0 0 auto; gap: 7px; }
.attachment-actions button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid #30415a;
  border-radius: 8px;
  color: #c3d0e2;
  background: #172233;
  cursor: pointer;
  font-size: 11px;
  font-weight: 650;
}
.attachment-actions button:hover:not(:disabled) { border-color: var(--blue); color: var(--text); }
.attachment-actions button:active:not(:disabled) { transform: translateY(1px); }
.attachment-actions button:disabled { cursor: not-allowed; opacity: .42; }
.upload-status {
  min-width: 0;
  display: grid;
  flex: 1 1 auto;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}
.upload-status.uploading { color: var(--blue); }
.upload-status.complete { color: var(--green); }
.upload-status.failed { color: var(--red); }
.upload-status span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-status progress {
  width: 100%;
  height: 4px;
  border: 0;
  border-radius: 999px;
  accent-color: var(--blue);
}
.upload-status progress::-webkit-progress-bar { border-radius: 999px; background: #202c3e; }
.upload-status progress::-webkit-progress-value { border-radius: 999px; background: var(--blue); }

.preview-note {
  margin: 0;
  padding: 9px 14px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  background: rgba(13, 20, 31, .72);
  font-size: 11px;
  line-height: 1.55;
}

.evidence { display: flex; flex-direction: column; gap: 10px; }
.evidence-item {
  min-height: 72px;
  gap: 11px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(17, 25, 38, .72);
}
.evidence-icon {
  width: 25px;
  height: 25px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #344159;
  border-radius: 50%;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}
.evidence-item div { min-width: 0; }
.evidence-item strong, .evidence-item small { display: block; }
.evidence-item strong { margin-bottom: 4px; font-size: 12px; }
.evidence-item small { color: var(--muted); font-size: 10px; line-height: 1.35; }
.evidence-item b { margin-left: auto; color: #667489; font-size: 9px; text-transform: uppercase; }
.evidence-item.pass { border-color: rgba(119, 221, 170, .23); background: rgba(40, 88, 68, .13); }
.evidence-item.pass .evidence-icon { border-color: rgba(119, 221, 170, .5); color: var(--green); }
.evidence-item.pass b { color: var(--green); }
.evidence-item.fail { border-color: rgba(243, 139, 168, .3); }
.evidence-item.fail b { color: var(--red); }

#toast {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  max-width: min(420px, calc(100vw - 36px));
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: #121a27;
  box-shadow: 0 15px 45px rgba(0, 0, 0, .3);
  font-size: 12px;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: .18s ease;
}
#toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 820px) {
  .shell { padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); }
  .workspace { grid-template-columns: 1fr; }
  .agent-telemetry {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "identity"
      "metrics"
      "git";
  }
  .agent-metrics {
    grid-template-columns: 1fr 1fr;
    gap: 13px 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line-soft);
  }
  .telemetry-metric { padding: 0; border-left: 0; }
  .effort-metric { padding-left: 12px; border-left: 1px solid var(--line-soft); }
  .context-metric,
  .quota-metric {
    grid-column: 1 / -1;
    padding-top: 12px;
    border-top: 1px solid var(--line-soft);
  }
  .preview-shell .preview-topbar {
    grid-template-columns: max-content minmax(0, 1fr);
    grid-template-areas:
      "brand controls"
      "session session";
    gap: 6px 12px;
  }
  .preview-shell .brand-lockup { grid-area: brand; }
  .preview-shell .preview-session-summary { grid-area: session; }
  .preview-shell .preview-controls { grid-area: controls; }
  .preview-shell .agent-telemetry {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "identity git"
      "metrics metrics";
    gap: 7px 12px;
  }
  .preview-shell .agent-metrics {
    grid-template-columns: minmax(92px, 1.05fr) minmax(58px, .6fr) minmax(145px, 1.35fr) minmax(200px, 1.8fr);
    gap: 0;
    padding-top: 7px;
    border-top: 1px solid var(--line-soft);
  }
  .preview-shell .context-metric,
  .preview-shell .quota-metric {
    grid-column: auto;
    padding-top: 1px;
    border-top: 0;
  }
  .evidence { display: grid; grid-template-columns: 1fr 1fr; }
  .terminal-viewport { min-height: 370px; }
}

@media (max-width: 560px) {
  .shell { padding-top: max(12px, env(safe-area-inset-top)); }
  .preview-shell .topbar,
  .preview-shell .agent-telemetry { margin-right: 10px; margin-left: 10px; }
  .topbar { align-items: flex-start; margin-bottom: 22px; }
  .lab-badge { display: none; }
  .connection { max-width: 145px; justify-content: flex-end; text-align: right; font-size: 11px; line-height: 1.3; }
  .session-heading { align-items: flex-end; }
  .session-heading p:last-child { max-width: 270px; font-size: 11px; line-height: 1.4; }
  .secondary-button { padding: 7px 9px; font-size: 11px; }
  .agent-telemetry { padding: 13px 12px; gap: 9px; }
  .agent-tool-mark { width: 33px; height: 33px; }
  .telemetry-e2ee { display: none; }
  .quota-grid { gap: 10px; }
  .preview-shell .preview-topbar {
    align-items: center;
    margin-bottom: 7px;
  }
  .preview-shell .preview-session-summary {
    gap: 6px;
    padding-left: 0;
    border-left: 0;
  }
  .preview-shell .session-chip { display: none; }
  .preview-shell .preview-session-summary strong {
    max-width: 42%;
    font-size: 11px;
  }
  .preview-shell .preview-session-summary #session-meta { font-size: 9px; }
  .preview-shell .preview-controls { gap: 7px; }
  .preview-shell .connection {
    max-width: 126px;
    font-size: 10px;
  }
  .preview-shell .agent-telemetry {
    gap: 6px 10px;
    padding: 7px 10px;
  }
  .preview-shell .agent-metrics {
    grid-template-columns: 1fr 1fr;
    gap: 7px 10px;
    padding-top: 6px;
  }
  .preview-shell .telemetry-metric {
    padding: 0;
    border-left: 0;
  }
  .preview-shell .context-metric,
  .preview-shell .quota-metric {
    grid-column: auto;
    padding-top: 6px;
    border-top: 1px solid var(--line-soft);
  }
  .preview-shell .metric-detail,
  .preview-shell .quota-item small { display: none; }
  .preview-shell .agent-git {
    max-width: 140px;
    padding-left: 8px;
  }
  .terminal-toolbar { height: 40px; }
  .terminal-viewport { min-height: 46vh; max-height: 52vh; padding: 16px 10px; }
  .preview-shell .terminal-card { border-right: 0; border-left: 0; border-radius: 0; }
  .mobile-keys { padding-left: 9px; padding-right: 9px; }
  .mobile-keys button { min-width: 48px; min-height: 44px; }
  .input-shell { padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  #terminal-input { font-size: 16px; }
  .attachment-panel { align-items: stretch; flex-direction: column; gap: 7px; }
  .attachment-actions button { min-height: 40px; flex: 1 1 0; }
  .attachment-actions { width: 100%; }
  .evidence { grid-template-columns: 1fr; }
  .evidence-item { min-height: 60px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
