:root {
  color-scheme: light;
  --canvas: #f3f3f1;
  --surface: #ffffff;
  --ink: #111111;
  --muted: #6f6f6b;
  --subtle: #f5f5f3;
  --line: #e7e7e3;
  --line-strong: #ccccca;
  --amber: #f1bc2d;
  --danger: #b42318;
  --safe: #1b7f4b;
  --shadow: 0 16px 48px rgba(0, 0, 0, 0.04);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-round: 999px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body {
  width: 100%;
  max-width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select { font: inherit; }
button { color: inherit; }

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(17, 17, 17, 0.22);
  outline-offset: 2px;
}

.app-shell {
  width: 100%;
  max-width: 430px;
  min-height: 100dvh;
  margin-inline: auto;
  overflow-x: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.screen {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
}

.screen-header {
  min-height: 88px;
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  align-items: center;
  padding: max(env(safe-area-inset-top), var(--space-4)) var(--space-5) var(--space-3);
}

.screen-header h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  text-align: center;
  letter-spacing: -0.03em;
}

.screen-body {
  width: 100%;
  max-width: 100%;
  flex: 1;
  min-height: 0;
  padding: var(--space-2) var(--space-5) 128px;
  overflow-y: auto;
}

.round-button,
.project-button,
.task-button,
.desktop-entry,
.attention-row,
.output-button {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.round-button {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.round-button:hover,
.project-button:hover,
.project-button.selected,
.desktop-entry:hover,
.task-button:hover { background: var(--subtle); }

.icon {
  width: 24px;
  height: 24px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.connection-row {
  width: 100%;
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-3) 0 var(--space-10);
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.connection-dot {
  width: 10px;
  height: 10px;
  flex: none;
  border-radius: 50%;
  background: var(--amber);
}

.connection-row.reconnecting .connection-dot,
.connection-row.offline .connection-dot { background: var(--muted); }

.connection-row strong {
  min-width: 0;
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-heading {
  margin: 0 0 var(--space-4);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.project-list,
.task-list,
.output-list,
.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.project-list { margin-bottom: var(--space-10); }

.project-button {
  width: 100%;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: 0 var(--space-1);
  border-radius: var(--radius-sm);
  font-size: 18px;
  text-align: left;
}

.project-button .icon { width: 26px; height: 26px; }

.attention-row {
  width: 100%;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  padding: var(--space-3) 0;
  border-block: 1px solid var(--line);
  text-align: left;
}

.attention-row .copy { flex: 1; }
.attention-row strong, .attention-row small { display: block; }
.attention-row small { margin-top: var(--space-1); color: var(--muted); }

.task-button {
  width: 100%;
  min-height: 76px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: var(--space-3);
  align-items: start;
  padding: var(--space-3) var(--space-1);
  border-radius: var(--radius-sm);
  text-align: left;
}

.task-copy { min-width: 0; }
.task-copy strong, .task-copy small { display: block; }

.task-copy strong {
  overflow: hidden;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-copy small,
.task-time {
  margin-top: var(--space-1);
  color: var(--muted);
  font-size: 13px;
}

.task-time { white-space: nowrap; }

.connection-note {
  margin-bottom: var(--space-6);
  padding: var(--space-3) var(--space-4);
  border-left: 2px solid var(--ink);
  color: var(--muted);
  background: var(--subtle);
  font-size: 13px;
  line-height: 1.6;
}

.thread-skeleton {
  margin-bottom: var(--space-8);
  padding: var(--space-6) 0;
  color: var(--muted);
  font-size: 14px;
}

.codex-thread-body { padding-bottom: 72px; }

.conclusion-panel {
  margin-bottom: var(--space-8);
  padding: var(--space-5);
  border-left: 3px solid var(--ink);
  background: var(--subtle);
}

.conclusion-panel span {
  display: block;
  margin-bottom: var(--space-3);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.conclusion-panel p {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.message-feed,
.record-feed {
  display: grid;
  gap: var(--space-4);
}

.record-card {
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  min-width: 0;
}

.record-card header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.record-card header strong { font-size: 13px; }
.record-card header span { color: var(--muted); font-size: 11px; text-align: right; }
.record-card > p { margin: 0; font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; }
.record-card > code {
  display: block;
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--surface);
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.record-card > small { display: block; margin-top: var(--space-2); color: var(--muted); overflow-wrap: anywhere; }
.record-text { white-space: pre-wrap; }

.record-line {
  display: grid;
  grid-template-columns: minmax(82px, auto) minmax(0, 1fr);
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-left: 2px solid var(--line-strong);
  background: var(--subtle);
  font-size: 13px;
  line-height: 1.55;
}
.record-line span { overflow-wrap: anywhere; }
.record-line.muted { color: var(--muted); }

.activity-record {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  min-width: 0;
}
.activity-record > summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-3);
  align-items: baseline;
  padding: var(--space-3) var(--space-4);
  cursor: pointer;
  list-style-position: inside;
}
.activity-record > summary strong { font-size: 13px; }
.activity-record > summary span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.activity-record[open] > summary { border-bottom: 1px solid var(--line); }
.activity-section { padding: var(--space-3) var(--space-4); }
.activity-section + .activity-section { border-top: 1px solid var(--line); }
.activity-section b { display: block; margin-bottom: var(--space-2); color: var(--muted); font-size: 11px; }
.activity-section pre {
  max-height: 320px;
  margin: 0;
  overflow: auto;
  font-size: 11px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.activity-error pre { color: var(--danger); }

.record-details { margin-top: var(--space-3); border-top: 1px solid var(--line); }
.record-details summary {
  padding-top: var(--space-3);
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}
.record-details pre {
  max-height: 320px;
  margin: var(--space-3) 0 0;
  padding: var(--space-3);
  overflow: auto;
  border-radius: var(--radius-sm);
  background: var(--subtle);
  font-size: 11px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.file-change + .file-change { margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--line); }
.file-change p { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-2); margin: 0; font-size: 12px; line-height: 1.5; }
.file-change b { color: var(--muted); font-weight: 600; }
.file-change p { overflow-wrap: anywhere; }
.error-record { border-color: var(--danger); }
.history-more { margin-top: var(--space-5); }
.history-end { margin: var(--space-5) 0 0; color: var(--muted); font-size: 12px; text-align: center; }

.message {
  max-width: 92%;
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.message.user {
  justify-self: end;
  border-color: transparent;
  background: var(--subtle);
}

.message span {
  display: block;
  margin-bottom: var(--space-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.message p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.request-card {
  margin-top: var(--space-6);
  padding: var(--space-5);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
}

.request-card h3 { margin: 0 0 var(--space-3); font-size: 16px; }
.request-card p { margin: 0 0 var(--space-3); font-size: 14px; line-height: 1.6; }
.request-card .request-hint { margin: 0; color: var(--muted); font-size: 13px; }
.request-form { display: grid; gap: var(--space-5); }
.request-form fieldset { display: grid; gap: var(--space-3); margin: 0; padding: 0; border: 0; }
.request-form legend { margin-bottom: var(--space-3); font-size: 14px; line-height: 1.6; }
.request-option { display: grid; grid-template-columns: 20px 1fr; gap: var(--space-3); align-items: start; }
.request-option input { margin-top: var(--space-1); }
.request-option strong, .request-option small { display: block; }
.request-option strong { font-size: 14px; }
.request-option small { margin-top: var(--space-1); color: var(--muted); font-size: 12px; line-height: 1.5; }

.desktop-entry {
  width: 100%;
  min-height: 76px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 24px;
  align-items: center;
  gap: var(--space-3);
  margin: 0 0 var(--space-8);
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  text-align: left;
}

.desktop-entry-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--subtle);
}

.desktop-entry-copy { min-width: 0; }
.desktop-entry-copy strong,
.desktop-entry-copy small { display: block; }
.desktop-entry-copy strong { font-size: 15px; }
.desktop-entry-copy small {
  margin-top: var(--space-1);
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-state,
.center-state {
  color: var(--muted);
  line-height: 1.7;
  text-align: center;
}

.empty-state { padding: var(--space-8) 0; }

.center-state {
  min-height: 100dvh;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: var(--space-8);
}

.center-state h1 { margin: var(--space-5) 0 var(--space-2); color: var(--ink); font-size: 22px; }
.center-state p { margin: 0 0 var(--space-5); }

.pairing-screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: max(env(safe-area-inset-top), 48px) var(--space-6) max(env(safe-area-inset-bottom), 48px);
  background: var(--surface);
}

.pairing-mark {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  margin-bottom: var(--space-8);
  border-radius: 50%;
  background: var(--subtle);
}

.pairing-mark .icon { width: 27px; height: 27px; }
.eyebrow { margin: 0 0 var(--space-3); color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.pairing-screen h1 { margin: 0 0 var(--space-4); font-size: 32px; line-height: 1.15; letter-spacing: -0.045em; }
.pairing-copy { margin: 0 0 var(--space-8); color: var(--muted); font-size: 16px; line-height: 1.7; }
.pairing-form { display: grid; gap: var(--space-3); }
.pairing-form label { font-size: 14px; font-weight: 600; }

.pairing-code {
  width: 100%;
  min-height: 64px;
  padding: 0 var(--space-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  color: var(--ink);
  background: var(--surface);
  font-size: 28px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.22em;
  text-align: center;
}

.pairing-code::placeholder { color: var(--line-strong); }
.pairing-hint, .pairing-error { min-height: 20px; margin: 0; font-size: 13px; line-height: 1.5; }
.pairing-hint { color: var(--muted); }
.pairing-error { color: var(--danger); }

.loading-mark {
  width: 28px;
  height: 28px;
  border: 2px solid var(--line);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.bottom-dock {
  position: fixed;
  z-index: 10;
  right: max(calc((100vw - 430px) / 2 + var(--space-4)), var(--space-4));
  bottom: 0;
  left: max(calc((100vw - 430px) / 2 + var(--space-4)), var(--space-4));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-3);
  padding: var(--space-3) 0 max(env(safe-area-inset-bottom), var(--space-4));
  border-top: 1px solid rgba(0, 0, 0, 0.04);
  background: rgba(255, 255, 255, 0.96);
}

.search-field,
.primary-action { min-height: 56px; border-radius: var(--radius-round); }

.search-field {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0 var(--space-5);
  border: 1px solid var(--line-strong);
  background: var(--surface);
}

.search-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
}

.search-field input::placeholder { color: var(--muted); }

.primary-action,
.button {
  border: 0;
  cursor: pointer;
}

.primary-action {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0 var(--space-5);
  background: var(--ink);
  color: var(--surface);
  font-weight: 600;
}

.detail-body { padding-top: var(--space-5); }
.desktop-body { padding-bottom: 164px; }

.semantic-meta {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  color: var(--muted);
  font-size: 12px;
}

.semantic-feed {
  display: grid;
  gap: var(--space-3);
}

.semantic-block {
  margin: 0;
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.semantic-empty {
  padding: var(--space-6);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--subtle);
}

.semantic-empty strong { display: block; margin-bottom: var(--space-2); }
.semantic-empty p { margin: 0 0 var(--space-5); color: var(--muted); font-size: 14px; line-height: 1.65; }

.desktop-composer {
  position: fixed;
  z-index: 10;
  right: max(calc((100vw - 430px) / 2 + var(--space-4)), var(--space-4));
  bottom: 0;
  left: max(calc((100vw - 430px) / 2 + var(--space-4)), var(--space-4));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: var(--space-3);
  padding: var(--space-3) 0 max(env(safe-area-inset-bottom), var(--space-4));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.desktop-composer textarea {
  height: 56px;
  min-height: 56px;
  padding: var(--space-4);
  resize: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  color: var(--ink);
  background: var(--surface);
}

.desktop-composer .primary-action {
  height: 56px;
  min-height: 56px;
  align-self: end;
  border-radius: var(--radius-round);
}

.status-line {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
  color: var(--muted);
  font-size: 14px;
}

.status-line .connection-dot { width: 8px; height: 8px; }
.status-line.completed .connection-dot { background: var(--safe); }
.status-line.stopped .connection-dot { background: var(--muted); }
.status-line.failed .connection-dot { background: var(--danger); }

.task-title {
  margin: 0 0 var(--space-4);
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: -0.04em;
}

.task-summary {
  margin: 0 0 var(--space-8);
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.subheading { margin: var(--space-8) 0 var(--space-4); font-size: 15px; }

.timeline li {
  position: relative;
  padding: 0 0 var(--space-6) var(--space-6);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.timeline li::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 2px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink);
}

.timeline li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 17px;
  bottom: 3px;
  left: 5px;
  width: 1px;
  background: var(--line-strong);
}

.reply-box,
.form-stack { display: grid; gap: var(--space-3); }

.reply-box textarea,
.form-control {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink);
}

.reply-box textarea,
textarea.form-control {
  min-height: 112px;
  padding: var(--space-4);
  resize: vertical;
}

.form-control { min-height: 52px; padding: 0 var(--space-4); }
.form-stack label { margin-top: var(--space-3); font-size: 14px; font-weight: 600; }

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.button {
  min-height: 52px;
  padding: 0 var(--space-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-round);
  background: var(--surface);
  font-weight: 600;
}

.button.primary { border-color: var(--ink); background: var(--ink); color: var(--surface); }
.button:disabled { cursor: not-allowed; opacity: 0.42; }
.button.danger { color: var(--danger); }
.button.full { width: 100%; }
.top-gap { margin-top: var(--space-4); }

.approval-fact { padding: var(--space-4) 0; border-bottom: 1px solid var(--line); }
.approval-fact span, .approval-fact strong { display: block; }
.approval-fact span { margin-bottom: var(--space-2); color: var(--muted); font-size: 13px; }
.approval-fact strong { font-size: 15px; line-height: 1.6; }

.output-button {
  width: 100%;
  min-height: 72px;
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.output-button strong, .output-button small { display: block; }
.output-button small { margin-top: var(--space-1); color: var(--muted); }
.output-button.static { grid-template-columns: 32px 1fr; cursor: default; }

.menu {
  position: fixed;
  z-index: 30;
  top: 72px;
  right: max(calc((100vw - 430px) / 2 + var(--space-4)), var(--space-4));
  width: 220px;
  padding: var(--space-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.menu button {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0 var(--space-3);
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.menu button:hover { background: var(--subtle); }

dialog {
  width: min(calc(100% - var(--space-8)), 390px);
  padding: var(--space-6);
  border: 0;
  border-radius: var(--radius-md);
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow);
}

dialog::backdrop { background: rgba(0, 0, 0, 0.32); }
dialog h2 { margin: 0 0 var(--space-3); font-size: 20px; }
dialog p { margin: 0; color: var(--muted); line-height: 1.6; }

.toast {
  position: fixed;
  z-index: 40;
  bottom: 96px;
  left: 50%;
  max-width: min(calc(100% - var(--space-8)), 390px);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-round);
  background: var(--ink);
  color: var(--surface);
  font-size: 13px;
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
}

.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.svg-sprite { position: absolute; }

/* Codex task detail: conversation-first mobile layout */
.thread-screen {
  background:
    radial-gradient(circle at 100% 0, rgba(201, 217, 207, 0.22), transparent 240px),
    #fbfbfa;
}

.thread-header {
  position: sticky;
  z-index: 12;
  top: 0;
  width: 100%;
  max-width: 100%;
  min-height: 72px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: var(--space-2);
  padding: max(env(safe-area-inset-top), 10px) var(--space-3) 10px;
  border-bottom: 1px solid rgba(17, 17, 17, 0.06);
  background: rgba(251, 251, 250, 0.9);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}

.thread-header .round-button { width: 44px; height: 44px; }
.thread-header-copy { min-width: 0; text-align: center; }
.thread-header-copy h1 {
  margin: 0;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.thread-header-copy p {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}
.thread-header-copy .connection-dot { width: 6px; height: 6px; background: var(--safe); }
.thread-header-copy .waiting .connection-dot { background: var(--amber); }
.thread-more { font-size: 16px; font-weight: 700; letter-spacing: 0.08em; }

.codex-thread-body {
  padding: var(--space-4) var(--space-5) 170px;
  overflow: visible;
}

.thread-overview {
  margin: 0 0 var(--space-5);
  padding: 0 var(--space-1);
}
.thread-overview span,
.conclusion-panel > span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
}
.thread-overview p {
  margin: 0;
  color: #4f514e;
  font-size: 13px;
  line-height: 1.65;
}

.conclusion-panel {
  margin: 0 0 var(--space-6);
  padding: 18px 18px 19px;
  border: 0;
  border-radius: 6px 20px 20px 20px;
  background: #eef3ef;
  box-shadow: inset 3px 0 0 #284a39;
}
.conclusion-panel p { font-size: 14px; line-height: 1.72; }
.conclusion-panel .record-details { border-color: rgba(40, 74, 57, 0.14); }

.thread-section-heading,
.thread-section-title h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.thread-section-heading { margin-bottom: var(--space-2); }
.thread-section-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 28px 0 var(--space-4);
  padding: 0 var(--space-1);
}
.thread-section-title span { color: var(--muted); font-size: 11px; }

.compact-output-list {
  padding: 0 var(--space-1);
  border-block: 1px solid var(--line);
}
.compact-output-list .output-button { min-height: 56px; border-bottom: 0; }
.compact-output-list .output-button strong { font-size: 13px; font-weight: 600; }
.compact-output-list .output-button small { font-size: 11px; }
.compact-output-list .icon { width: 20px; height: 20px; }

.record-feed { gap: 38px; }
.conversation-turn {
  min-width: 0;
  display: grid;
  gap: 18px;
}
.conversation-turn + .conversation-turn {
  padding-top: 36px;
  border-top: 1px solid rgba(17, 17, 17, 0.07);
}
.turn-activity {
  min-width: 0;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  background: #f1f2ef;
}
.turn-activity > summary {
  min-height: 48px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  cursor: pointer;
  list-style: none;
}
.turn-activity > summary::-webkit-details-marker { display: none; }
.turn-activity-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #4f524e;
  background: #e8eae6;
  font-size: 15px;
}
.turn-activity > summary strong { font-size: 13px; font-weight: 600; }
.turn-activity > summary small { color: var(--muted); font-size: 11px; }
.turn-activity[open] > summary { border-bottom: 1px solid rgba(17, 17, 17, 0.07); }
.turn-activity-list { display: grid; gap: 8px; padding: 10px; }
.message {
  min-width: 0;
  max-width: 100%;
  display: block;
  padding: 2px 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 14px;
}
.message.assistant { width: 100%; }
.message.user {
  width: fit-content;
  max-width: 84%;
  display: block;
  justify-self: end;
  padding: 12px 15px;
  border-radius: 20px 20px 6px 20px;
  background: #edf4f8;
}
.message-content,
.assistant-message-stack,
.assistant-message-segment {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.message-content > span {
  margin: 0 0 7px;
  color: #777973;
  font-size: 12px;
  font-weight: 600;
}
.message p {
  margin: 0;
  max-width: 100%;
  font-size: 14px;
  line-height: 1.72;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-wrap: pretty;
  white-space: normal;
}
.message.user p { font-size: 14px; line-height: 1.65; }
.message.user .message-content > span { display: none; }
.message-content p + p,
.message-content p + ul,
.message-content p + ol,
.message-content ul + p,
.message-content ol + p { margin-top: 14px; }
.message-content h4 {
  margin: 0 0 12px;
  max-width: 100%;
  font-size: 15px;
  line-height: 1.4;
  letter-spacing: -0.02em;
}
.message-content ul,
.message-content ol {
  max-width: 100%;
  margin: 0;
  padding-left: 22px;
  font-size: 14px;
  line-height: 1.72;
  overflow-wrap: anywhere;
}
.message-content li + li { margin-top: 7px; }
.message-content code {
  padding: 0.1em 0.35em;
  border-radius: 5px;
  background: #eff0ed;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.88em;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-all;
}
.message-code {
  max-width: 100%;
  margin: 12px 0 0;
  padding: 14px;
  overflow: auto;
  border-radius: 10px;
  color: #e9efe9;
  background: #202320;
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.message-code code { padding: 0; color: inherit; background: transparent; font-size: inherit; }
.message-image {
  width: 100%;
  max-width: 100%;
  margin: 16px 0;
}
.message-image img {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 70dvh;
  display: block;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 12px;
  object-fit: contain;
}
.assistant-message-segment + .assistant-message-segment {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(17, 17, 17, 0.07);
}
.message .record-details { margin-top: 8px; }

.activity-record {
  overflow: hidden;
  border-color: rgba(17, 17, 17, 0.075);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}
.activity-record > summary {
  min-height: 48px;
  display: grid;
  grid-template-columns: 24px minmax(82px, auto) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 9px 12px;
  list-style: none;
}
.activity-record > summary::-webkit-details-marker { display: none; }
.activity-record > summary::after {
  content: "⌄";
  position: absolute;
  right: 10px;
  color: #9a9b96;
  font-size: 12px;
}
.activity-record > summary { position: relative; padding-right: 28px; }
.activity-record[open] > summary::after { content: "⌃"; }
.activity-record > summary i {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #50534f;
  background: #f0f1ee;
  font: 600 11px/1 var(--font-sans);
  font-style: normal;
}
.activity-record > summary strong { font-size: 12px; white-space: nowrap; }
.activity-record > summary span {
  padding-right: 4px;
  overflow: hidden;
  font-size: 11px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.activity-record[open] > summary { border-bottom-color: rgba(17, 17, 17, 0.07); }
.activity-body { padding: 12px; }
.activity-body > p { margin: 0; font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
.activity-body > code {
  display: block;
  padding: 12px;
  border-radius: 9px;
  color: #e9efe9;
  background: #202320;
  font-size: 11px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.activity-body > small { display: block; margin-top: 8px; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.activity-section { padding: 12px; }

.record-line {
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 8px;
  padding: 9px 12px;
  border: 0;
  border-radius: 10px;
  color: #5d5f5b;
  background: rgba(239, 240, 237, 0.7);
  font-size: 11px;
}
.record-line strong { color: #31332f; }

.history-more {
  width: 100%;
  min-height: 44px;
  margin-top: var(--space-5);
  border: 0;
  border-radius: 12px;
  color: #4c504b;
  background: #eff0ed;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}
.history-end { margin-top: 12px; font-size: 10px; }

.request-card {
  border-color: rgba(157, 104, 0, 0.24);
  background: #fff8e9;
  box-shadow: 0 10px 30px rgba(100, 72, 15, 0.05);
}

.thread-composer {
  position: fixed;
  z-index: 20;
  right: max(calc((100vw - 430px) / 2), 0px);
  bottom: 0;
  left: max(calc((100vw - 430px) / 2), 0px);
  max-width: 430px;
  margin-inline: auto;
  padding: 8px 12px max(env(safe-area-inset-bottom), 12px);
  border-top: 1px solid rgba(17, 17, 17, 0.07);
  background: rgba(250, 250, 248, 0.93);
  backdrop-filter: blur(22px) saturate(170%);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
}
.thread-composer > p {
  margin: 0 4px 7px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}
.thread-composer form {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
  padding: 5px 5px 5px 14px;
  border: 1px solid #d9dad6;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(22, 28, 23, 0.08);
}
.thread-composer textarea {
  width: 100%;
  height: 48px;
  min-height: 48px;
  max-height: 128px;
  padding: 12px 0 9px;
  resize: none;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 16px;
  line-height: 1.45;
}
.thread-composer textarea::placeholder { color: #9a9b96; }
.composer-send {
  min-width: 50px;
  height: 48px;
  padding: 0 13px;
  border: 0;
  border-radius: 24px;
  color: #fff;
  background: #1d211e;
  font-size: 0;
  font-weight: 700;
  cursor: pointer;
}
.composer-send::before { content: "↑"; font-size: 20px; }
.composer-stop {
  width: 100%;
  margin-top: 7px;
  padding: 3px;
  border: 0;
  color: var(--danger);
  background: transparent;
  font-size: 11px;
  cursor: pointer;
}

@media (max-width: 360px) {
  .screen-header, .screen-body { padding-inline: var(--space-4); }
  .codex-thread-body { padding-inline: var(--space-5); }
  .thread-header { padding-inline: 8px; }
  .thread-header-copy h1 { font-size: 14px; }
  .activity-record > summary { grid-template-columns: 24px minmax(76px, auto) minmax(0, 1fr); }
  .primary-action span { display: none; }
  .primary-action { width: 56px; justify-content: center; padding: 0; }
  .task-button { grid-template-columns: 28px minmax(0, 1fr); }
  .task-time { display: none; }
}

/* Prototype-aligned mobile conversation shell.  These rules intentionally sit last: the
   semantic data components above are reused, while their presentation becomes a native chat flow. */
:root { color-scheme: dark; --prototype-canvas: #131417; --prototype-surface: #1e2025; --prototype-raised: #282a32; --prototype-drawer: #17181c; --prototype-user: #2a2d35; --prototype-line: rgba(255,255,255,.08); --prototype-primary: #f2f3f5; --prototype-secondary: #a3a6af; --prototype-muted: #717682; --prototype-green: #10a37f; }
body { color: var(--prototype-primary); background: #08090b; }
.app-shell { background: var(--prototype-canvas); box-shadow: 0 25px 65px rgba(0,0,0,.85); }
.mobile-workspace-screen, .prototype-thread-screen { position: relative; min-height: 100dvh; overflow: hidden; background: var(--prototype-canvas); }
.mobile-status-bar { height: max(30px, env(safe-area-inset-top)); display: flex; align-items: end; justify-content: space-between; padding: 0 18px 7px; color: #e5e7eb; font-size: 12px; font-weight: 650; letter-spacing: .01em; flex: 0 0 auto; }
.mobile-status-icons { font-size: 11px; letter-spacing: 0; }
.mobile-chat-header { height: 52px; display: grid; grid-template-columns: 44px minmax(0,1fr) 76px; align-items: center; padding: 0 10px; border-bottom: 1px solid var(--prototype-line); background: var(--prototype-canvas); flex: 0 0 auto; z-index: 12; }
.mobile-header-action { width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; color: var(--prototype-primary); background: transparent; font-size: 29px; line-height: 1; cursor: pointer; }
.mobile-header-action:active { background: rgba(255,255,255,.09); }
.mobile-header-action .icon { width: 21px; height: 21px; }
.mobile-header-title { min-width: 0; display: grid; justify-items: center; align-content: center; }
.mobile-header-title h1 { max-width: 220px; margin: 0; overflow: hidden; color: var(--prototype-primary); font-size: 15px; font-weight: 600; line-height: 19px; letter-spacing: -.015em; text-overflow: ellipsis; white-space: nowrap; }
.device-capsule { max-width: 180px; display: inline-flex; align-items: center; gap: 5px; margin-top: 2px; padding: 2px 8px; overflow: hidden; border: 1px solid rgba(255,255,255,.08); border-radius: 12px; color: var(--prototype-secondary); background: rgba(255,255,255,.06); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.device-capsule i { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: var(--prototype-green); }
.mobile-header-actions { display: flex; align-items: center; justify-content: end; gap: 1px; }

.workspace-viewport { flex: 1; min-height: 0; padding: 30px 14px 100px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.workspace-welcome { margin: 4px 7px 26px; }
.workspace-mark { width: 30px; height: 30px; display: grid; place-items: center; margin-bottom: 16px; border: 1px solid rgba(16,163,127,.4); border-radius: 50%; color: #56d5ad; font-size: 22px; }
.workspace-welcome h2 { margin: 0; color: var(--prototype-primary); font-size: 25px; font-weight: 600; letter-spacing: -.04em; }
.workspace-welcome p { margin: 9px 0 0; color: var(--prototype-secondary); font-size: 13px; line-height: 1.6; }
.workspace-search { height: 44px; display: flex; align-items: center; gap: 9px; padding: 0 13px; border: 1px solid var(--prototype-line); border-radius: 12px; color: var(--prototype-muted); background: var(--prototype-surface); }
.workspace-search .icon { width: 17px; height: 17px; }
.workspace-search input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--prototype-primary); background: transparent; font-size: 14px; }
.workspace-search input::placeholder { color: var(--prototype-muted); }
.workspace-connection, .workspace-empty { margin: 18px 0 0; padding: 13px; border: 1px solid var(--prototype-line); border-radius: 10px; color: var(--prototype-secondary); background: rgba(255,255,255,.025); font-size: 12px; line-height: 1.55; }
.workspace-section { margin-top: 31px; }
.workspace-section > div { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 9px; }
.workspace-section h2 { margin: 0; color: var(--prototype-primary); font-size: 14px; font-weight: 600; }
.workspace-section > div > span { color: var(--prototype-muted); font-size: 11px; }
.workspace-thread-list, .workspace-project-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--prototype-line); }
.drawer-thread-row, .workspace-project-list button { width: 100%; min-height: 62px; display: grid; grid-template-columns: 10px minmax(0,1fr); align-items: center; gap: 10px; padding: 10px 3px; border: 0; border-bottom: 1px solid var(--prototype-line); color: inherit; background: transparent; text-align: left; cursor: pointer; }
.drawer-thread-row.is-current { background: rgba(255,255,255,.055); }
.drawer-thread-state { width: 7px; height: 7px; align-self: start; margin-top: 8px; border-radius: 50%; background: #687080; }
.drawer-thread-state.running { background: #438dff; box-shadow: 0 0 0 3px rgba(67,141,255,.13); }
.drawer-thread-state.ready { background: var(--prototype-green); }
.drawer-thread-state.available { background: #db9b35; }
.drawer-thread-row strong, .drawer-thread-row small, .workspace-project-list strong, .workspace-project-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-thread-row strong, .workspace-project-list strong { color: var(--prototype-primary); font-size: 13px; font-weight: 500; line-height: 1.4; }
.drawer-thread-row small, .workspace-project-list small { margin-top: 3px; color: var(--prototype-muted); font-size: 10px; }
.workspace-project-list button { grid-template-columns: 32px minmax(0,1fr) 18px; gap: 9px; }
.workspace-project-list button > span:first-child { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; color: #9ec0ff; background: rgba(59,130,246,.16); }
.workspace-project-list .icon { width: 16px; height: 16px; color: var(--prototype-secondary); }
.workspace-project-list button > .icon { width: 15px; height: 15px; justify-self: end; color: var(--prototype-muted); }
.workspace-composer { position: absolute; right: 0; bottom: 0; left: 0; padding: 10px 14px max(12px, env(safe-area-inset-bottom)); border-top: 1px solid var(--prototype-line); background: rgba(19,20,23,.96); }
.workspace-composer button { width: 100%; height: 46px; border: 1px solid rgba(16,163,127,.35); border-radius: 23px; color: #ccf5e8; background: rgba(16,163,127,.16); font-size: 14px; }
.project-viewport { padding-top: 22px; }
.project-intro { display: flex; gap: 13px; align-items: center; margin: 0 2px 29px; }
.project-intro > span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; color: #9ec0ff; background: rgba(59,130,246,.16); }
.project-intro > span .icon { width: 22px; height: 22px; }
.project-intro p, .project-intro h2, .project-intro small { margin: 0; }
.project-intro p, .project-intro small { color: var(--prototype-muted); font-size: 11px; }
.project-intro h2 { margin: 3px 0 5px; color: var(--prototype-primary); font-size: 19px; font-weight: 600; }

.prototype-chat-viewport { flex: 1; min-height: 0; padding: 16px 14px 138px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.prototype-chat-viewport::-webkit-scrollbar, .workspace-viewport::-webkit-scrollbar, .drawer-scroll::-webkit-scrollbar { display: none; }
.prototype-conversation-turn { display: grid; gap: 14px; }
.prototype-conversation-turn + .prototype-conversation-turn { margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--prototype-line); }
.prototype-thread-screen .message { padding: 0; color: var(--prototype-primary); font-size: 14px; }
.prototype-thread-screen .message.user { max-width: 90%; justify-self: end; padding: 13px 16px; border-radius: 20px 20px 6px 20px; color: #e5e7eb; background: var(--prototype-user); box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.prototype-thread-screen .message p { color: inherit; font-size: 14px; line-height: 1.68; }
.prototype-thread-screen .message-content h4 { color: var(--prototype-primary); font-size: 15px; }
.prototype-thread-screen .message-content ul, .prototype-thread-screen .message-content ol { color: var(--prototype-primary); line-height: 1.72; }
.prototype-thread-screen .message-content code { color: #d8e9ff; background: rgba(59,130,246,.17); }
.prototype-thread-screen .message-code { border: 1px solid var(--prototype-line); border-radius: 12px; color: #dbe3ec; background: #23252c; }
.prototype-thread-screen .message-image img { border-color: var(--prototype-line); border-radius: 12px; }
.assistant-message-segment + .assistant-message-segment { margin-top: 16px; padding-top: 16px; border-top-color: var(--prototype-line); }
.message-copy { display: inline-flex; align-items: center; gap: 5px; margin-top: 12px; padding: 3px 1px; border: 0; color: var(--prototype-muted); background: transparent; font-size: 11px; cursor: pointer; }
.message-copy .icon { width: 14px; height: 14px; }
.prototype-thought { overflow: visible; border: 0; border-radius: 0; background: transparent; }
.prototype-thought > summary { min-height: 32px; display: grid; grid-template-columns: 28px auto minmax(0,1fr) 14px; align-items: center; gap: 7px; padding: 0; color: var(--prototype-secondary); list-style: none; cursor: pointer; }
.prototype-thought > summary::-webkit-details-marker { display: none; }
.prototype-thought > summary strong { font-size: 13px; font-weight: 500; }
.prototype-thought > summary small { color: var(--prototype-muted); font-size: 11px; }
.prototype-thought-mark { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid rgba(16,163,127,.45); border-radius: 50%; color: #59dcb2; font-size: 18px; }
.prototype-thought-chevron { color: var(--prototype-muted); font-size: 18px; transition: transform .16s ease; }
.prototype-thought[open] .prototype-thought-chevron { transform: rotate(90deg); }
.prototype-thought-list { position: relative; display: grid; gap: 5px; margin: 9px 0 2px 12px; padding: 0 0 0 22px; border-left: 1px solid rgba(16,163,127,.45); }
.prototype-thought-step { position: relative; }
.prototype-thought-step > summary { display: grid; grid-template-columns: 18px minmax(0,1fr) auto; align-items: center; gap: 7px; min-height: 28px; color: var(--prototype-secondary); list-style: none; cursor: pointer; font-size: 12px; }
.prototype-thought-step > summary::-webkit-details-marker { display: none; }
.prototype-thought-step > summary i { position: absolute; left: -32px; width: 20px; height: 20px; display: grid; place-items: center; border: 1px solid var(--prototype-green); border-radius: 50%; color: #59dcb2; background: var(--prototype-canvas); font-size: 10px; font-style: normal; }
.prototype-thought-step > summary small { color: var(--prototype-muted); font-size: 10px; }
.prototype-thought-step > p { margin: 3px 0 8px; padding: 8px 9px; border-radius: 8px; color: var(--prototype-muted); background: rgba(255,255,255,.045); font: 10px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.thread-artifacts { margin-top: 26px; padding-top: 17px; border-top: 1px solid var(--prototype-line); }
.thread-artifacts h2 { margin: 0 0 9px; color: var(--prototype-secondary); font-size: 12px; font-weight: 500; }
.thread-artifacts > div { display: flex; align-items: center; gap: 9px; padding: 11px; border: 1px solid var(--prototype-line); border-radius: 10px; background: #1c1d22; }
.thread-artifacts .icon { width: 18px; height: 18px; color: #8db9ff; }.thread-artifacts strong, .thread-artifacts small { display: block; }.thread-artifacts strong { color: var(--prototype-primary); font-size: 12px; }.thread-artifacts small { margin-top: 2px; color: var(--prototype-muted); font-size: 10px; }
.prototype-history-more { width: 100%; min-height: 40px; margin-top: 24px; border: 1px solid var(--prototype-line); border-radius: 10px; color: var(--prototype-secondary); background: var(--prototype-surface); font-size: 12px; }
.prototype-history-end { margin: 21px 0 0; color: var(--prototype-muted); font-size: 10px; text-align: center; }
.prototype-read-only { margin-top: 24px; padding: 12px; border: 1px solid rgba(222,161,57,.3); border-radius: 10px; color: #edc36d; background: rgba(222,161,57,.08); font-size: 12px; }
.prototype-thread-screen .semantic-empty { margin-top: 50px; color: var(--prototype-secondary); background: transparent; }.prototype-thread-screen .semantic-empty strong { color: var(--prototype-primary); }
.prototype-composer { position: absolute; right: 0; bottom: 0; left: 0; z-index: 10; padding: 8px 14px max(9px, env(safe-area-inset-bottom)); border-top: 1px solid var(--prototype-line); background: rgba(19,20,23,.97); }
.prototype-composer > p, .prototype-composer > small { display: block; margin: 0 0 6px; color: var(--prototype-muted); font-size: 10px; text-align: center; }
.prototype-composer > small { margin: 7px 0 0; }
.prototype-composer form { display: grid; grid-template-columns: 36px minmax(0,1fr) 38px; align-items: end; gap: 7px; }
.composer-side-action, .prototype-send { width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; cursor: pointer; }
.composer-side-action { color: var(--prototype-primary); background: var(--prototype-raised); font-size: 25px; font-weight: 250; }.prototype-send { color: #07251e; background: #38c893; font-size: 21px; font-weight: 700; }
.prototype-composer textarea { width: 100%; height: 40px; min-height: 40px; max-height: 108px; padding: 10px 13px; resize: none; border: 1px solid var(--prototype-line); border-radius: 21px; outline: 0; color: var(--prototype-primary); background: var(--prototype-raised); font-size: 14px; line-height: 1.4; }.prototype-composer textarea::placeholder { color: var(--prototype-muted); }
.prototype-stop { display: block; margin: 6px auto 0; padding: 0; border: 0; color: #ff978f; background: transparent; font-size: 10px; }

.navigation-drawer-layer { position: absolute; inset: 0; z-index: 50; display: flex; }.mobile-navigation-drawer { position: relative; z-index: 2; width: min(82%, 320px); height: 100%; display: flex; flex-direction: column; border-right: 1px solid var(--prototype-line); background: var(--prototype-drawer); box-shadow: 16px 0 38px rgba(0,0,0,.38); animation: drawer-enter .16s ease-out; }.drawer-scrim { flex: 1; border: 0; background: rgba(0,0,0,.56); }
.mobile-navigation-drawer header { min-height: 86px; display: grid; grid-template-columns: 38px minmax(0,1fr) 36px; align-items: center; gap: 9px; padding: max(12px, env(safe-area-inset-top)) 12px 10px; border-bottom: 1px solid var(--prototype-line); }.drawer-avatar { width: 34px; height: 34px; border: 1px solid rgba(16,163,127,.38); border-radius: 10px; color: #abf0d9; background: rgba(16,163,127,.16); font-size: 15px; }.mobile-navigation-drawer header strong, .mobile-navigation-drawer header small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.mobile-navigation-drawer header strong { color: var(--prototype-primary); font-size: 12px; font-weight: 550; }.mobile-navigation-drawer header small { margin-top: 3px; color: var(--prototype-muted); font-size: 10px; }.mobile-navigation-drawer header small i { width: 6px; height: 6px; display: inline-block; margin-right: 4px; border-radius: 50%; background: var(--prototype-green); }
.drawer-scroll { flex: 1; min-height: 0; padding: 13px 12px 28px; overflow-y: auto; }.drawer-new-thread { width: 100%; height: 39px; display: flex; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid rgba(16,163,127,.32); border-radius: 9px; color: #d5f8ec; background: rgba(16,163,127,.13); font-size: 12px; }.drawer-all-tasks { width: 100%; height: 32px; margin-top: 7px; border: 0; border-radius: 7px; color: var(--prototype-secondary); background: rgba(255,255,255,.045); font-size: 11px; }.drawer-scroll section { margin-top: 24px; }.drawer-scroll section h2 { margin: 0 0 7px; color: var(--prototype-muted); font-size: 10px; font-weight: 500; }.drawer-scroll ul { margin: 0; padding: 0; list-style: none; }.drawer-scroll .drawer-thread-row { min-height: 54px; }.drawer-empty { padding: 13px 2px; color: var(--prototype-muted); font-size: 11px; }.drawer-project-row { width: 100%; min-height: 49px; display: grid; grid-template-columns: 28px minmax(0,1fr) 16px; align-items: center; gap: 8px; padding: 7px 0; border: 0; border-bottom: 1px solid var(--prototype-line); color: inherit; background: transparent; text-align: left; }.drawer-project-row > span:first-child { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 7px; color: #9ec0ff; background: rgba(59,130,246,.16); }.drawer-project-row .icon { width: 14px; height: 14px; }.drawer-project-row > .icon { justify-self: end; color: var(--prototype-muted); }.drawer-project-row strong, .drawer-project-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.drawer-project-row strong { color: var(--prototype-primary); font-size: 12px; font-weight: 500; }.drawer-project-row small { margin-top: 3px; color: var(--prototype-muted); font-size: 10px; }
@keyframes drawer-enter { from { transform: translateX(-14px); opacity: .65; } to { transform: translateX(0); opacity: 1; } }
@media (min-width: 431px) { body { padding: 12px 6px; display: flex; align-items: center; justify-content: center; }.app-shell { max-width: 414px; min-height: min(860px, 96dvh); max-height: 96dvh; border: 4px solid #2d3039; border-radius: 40px; }.mobile-workspace-screen, .prototype-thread-screen { min-height: min(852px, calc(96dvh - 8px)); }.prototype-composer, .workspace-composer { border-radius: 0 0 36px 36px; } }

@media (min-width: 431px) {
  body { padding-block: var(--space-6); }
  .app-shell, .screen, .center-state { min-height: calc(100dvh - 48px); }
  .app-shell { border-radius: 24px; overflow: hidden; }
  .bottom-dock { bottom: var(--space-6); }
}

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

/* FY03 mobile visual system: desktop-connected, dark, calm, and task-first. */
:root {
  color-scheme: dark;
  --canvas: #080a0e;
  --surface: #11151d;
  --ink: #f4f7fb;
  --muted: #929bae;
  --subtle: #181e28;
  --line: #28303d;
  --line-strong: #3a4557;
  --amber: #e7aa35;
  --danger: #f07167;
  --safe: #4ed38b;
  --shadow: 0 22px 58px rgba(0, 0, 0, 0.36);
  --radius-sm: 10px;
  --radius-md: 16px;
}

body {
  background:
    radial-gradient(circle at 50% -18%, rgba(55, 82, 112, 0.18), transparent 38%),
    var(--canvas);
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline-color: rgba(78, 211, 139, 0.72);
}

.app-shell {
  background: var(--canvas);
  box-shadow: 0 0 0 1px rgba(171, 187, 210, 0.07), var(--shadow);
}

.screen { background: var(--canvas); }

.screen-header {
  min-height: 76px;
  padding: max(env(safe-area-inset-top), 12px) var(--space-4) var(--space-2);
  background: rgba(8, 10, 14, 0.82);
}

.screen-header h1 { font-size: 18px; font-weight: 650; letter-spacing: -0.02em; }

.screen-body { padding: var(--space-3) var(--space-5) 132px; }

.round-button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(23, 28, 37, 0.9);
}

.round-button:hover,
.project-button:hover,
.project-button.selected,
.desktop-entry:hover,
.task-button:hover { background: #202735; }

.icon { width: 21px; height: 21px; }

.connection-row {
  min-height: 46px;
  gap: 10px;
  margin-bottom: var(--space-6);
  padding: 0 13px;
  border: 1px solid rgba(78, 211, 139, 0.28);
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(31, 104, 75, 0.28), rgba(20, 32, 45, 0.62));
  color: #c9f6da;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.connection-row .icon { color: #b7d9ff; }
.connection-row strong { font-size: 12px; font-weight: 600; }
.connection-dot { width: 8px; height: 8px; background: var(--safe); box-shadow: 0 0 12px rgba(78, 211, 139, 0.72); }
.connection-row.reconnecting,
.connection-row.offline { border-color: var(--line); background: rgba(24, 30, 40, 0.84); color: var(--muted); }
.connection-row.reconnecting .connection-dot,
.connection-row.offline .connection-dot { box-shadow: none; }

.connection-note {
  margin: calc(var(--space-5) * -1) 0 var(--space-6);
  padding: 10px 12px;
  border-left: 2px solid var(--amber);
  color: #d1b276;
  background: rgba(231, 170, 53, 0.08);
  font-size: 12px;
}

.section-heading {
  margin-bottom: var(--space-3);
  color: #d7dce6;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.task-list { gap: 9px; }

.task-button {
  min-height: 80px;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: var(--space-3);
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(28, 34, 45, 0.96), rgba(16, 20, 27, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.028);
}

.task-button .icon { color: #80b4ff; }
.task-copy strong { color: var(--ink); font-size: 14px; font-weight: 650; line-height: 1.45; }
.task-copy small { margin-top: 4px; color: var(--muted); font-size: 12px; }
.task-time { align-self: start; color: #6f7b90; font-size: 11px; }

.empty-state { padding: var(--space-8) var(--space-5); border: 1px dashed var(--line-strong); border-radius: var(--radius-md); color: var(--muted); background: rgba(20, 25, 34, 0.52); }

.bottom-dock,
.desktop-composer {
  border-top: 1px solid rgba(165, 183, 211, 0.1);
  background: rgba(8, 10, 14, 0.88);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.search-field {
  min-height: 52px;
  padding: 0 var(--space-4);
  border-color: var(--line-strong);
  background: #141a23;
}
.search-field input { color: var(--ink); }
.search-field input::placeholder { color: #707b8e; }
.primary-action { min-height: 52px; border-radius: 14px; background: #4bca7e; color: #07130d; font-weight: 750; }
.primary-action:hover { background: #67dd96; }

.thread-screen {
  background:
    radial-gradient(circle at 100% 0, rgba(48, 88, 76, 0.19), transparent 280px),
    var(--canvas);
}

.thread-header {
  min-height: 70px;
  border-bottom-color: rgba(165, 183, 211, 0.1);
  background: rgba(8, 10, 14, 0.86);
}
.thread-header-copy h1 { color: var(--ink); }
.thread-header-copy p { color: var(--muted); }
.thread-header-copy .connection-dot { background: var(--safe); }
.thread-header-copy .waiting .connection-dot { background: var(--amber); }
.codex-thread-body { padding-inline: var(--space-5); }

.thread-overview p { color: #aeb7c7; }
.conclusion-panel { border-radius: 8px 18px 18px 18px; background: #14241d; box-shadow: inset 3px 0 0 #4ed38b; }
.conclusion-panel > span { color: #9bd4ae; }
.conclusion-panel .record-details { border-color: rgba(78, 211, 139, 0.18); }

.message { border-color: var(--line); background: #151b24; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025); }
.message.user { background: #203844; border-color: rgba(122, 192, 222, 0.26); }
.message span { color: #96a3b7; }

.record-card,
.activity-record,
.desktop-entry,
.request-card,
.semantic-block,
.semantic-empty { border-color: var(--line); background: #131923; }
.turn-activity { border: 1px solid var(--line); background: #151c26; }
.turn-activity > summary { background: #151c26; }
.turn-activity-icon { background: #202a37; color: #9ab6d7; }
.turn-activity[open] > summary { border-bottom-color: var(--line); }
.turn-activity-list { background: #111720; }
.record-line { border-left-color: #5887c1; background: #161d28; }
.record-card > code,
.record-details pre { background: #080b10; color: #d9e5f7; }
.activity-record[open] > summary,
.activity-section + .activity-section,
.record-details { border-color: var(--line); }
.activity-record { background: #151c26; }
.activity-record > summary::after { color: #8c9ab0; }
.record-line strong { color: #dbe4f3; }
.history-more { border-color: var(--line-strong); background: #151c26; color: #dbe4f3; }

.desktop-composer textarea,
.reply-box textarea,
.form-control {
  border-color: var(--line-strong);
  background: #141a23;
  color: var(--ink);
}
.desktop-composer .primary-action { border-radius: 14px; background: #4bca7e; color: #07130d; }

.thread-composer {
  border-top-color: rgba(165, 183, 211, 0.1);
  background: rgba(8, 10, 14, 0.9);
}
.thread-composer > p { color: #91aa9a; }
.thread-composer form {
  border-color: var(--line-strong);
  background: #151c26;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
}
.thread-composer textarea { color: var(--ink); }
.thread-composer textarea::placeholder { color: #758196; }
.composer-send { color: #07130d; background: #4bca7e; }
.composer-send:hover { background: #67dd96; }
.composer-stop { color: #ff948f; }

.button { border-color: var(--line-strong); background: #151b24; }
.button.primary { border-color: #4bca7e; background: #4bca7e; color: #07130d; }
.button.danger { color: #ff948f; }

.menu,
dialog { border: 1px solid var(--line); background: #151b24; box-shadow: var(--shadow); }
.menu button:hover { background: #202735; }
dialog::backdrop { background: rgba(0, 0, 0, 0.64); }
.toast { background: #e9f8ef; color: #0b2114; }

.pairing-screen { background: var(--canvas); }
.pairing-mark { background: #16241d; color: var(--safe); }
.pairing-screen h1 { color: var(--ink); }
.pairing-code { border-color: var(--line-strong); background: #141a23; color: var(--ink); }
.pairing-code::placeholder { color: #596477; }
.pairing-hint { color: var(--muted); }

@media (min-width: 431px) {
  .app-shell { border-radius: 24px; }
}

/* Home: high-fidelity translation of the supplied remote-companion prototype. */
.home-screen { min-height: 100dvh; background: #090a0f; }

.remote-sync-strip {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: max(env(safe-area-inset-top), 0px) var(--space-4) 0;
  border: 0;
  border-bottom: 1px solid rgba(147, 160, 182, 0.16);
  color: #b8c0cf;
  background: #0b0d12;
  font-size: 11px;
  text-align: left;
}
.remote-sync-strip > span { min-width: 0; display: flex; align-items: center; gap: 8px; }
.remote-sync-strip .icon { width: 15px; height: 15px; color: #a8c9f2; }
.remote-sync-strip strong { overflow: hidden; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.remote-sync-strip .connection-dot { width: 7px; height: 7px; flex: 0 0 auto; }
.remote-sync-strip b {
  flex: 0 0 auto;
  padding: 4px 8px;
  border: 1px solid rgba(78, 211, 139, 0.32);
  border-radius: 6px;
  color: #52df90;
  background: rgba(34, 127, 78, 0.12);
  font-size: 10px;
  letter-spacing: 0.01em;
}
.remote-sync-strip.offline b { border-color: var(--line-strong); color: var(--muted); background: transparent; }

.home-navbar {
  min-height: 86px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid rgba(147, 160, 182, 0.12);
}
.home-navbar > div { min-width: 0; text-align: center; }
.home-navbar h1 { margin: 0; color: #f7f8fb; font-size: 18px; font-weight: 650; letter-spacing: -0.02em; }
.home-navbar p { margin: 3px 0 0; color: #788397; font-size: 10px; }
.home-nav-button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #303947;
  border-radius: 50%;
  color: #f1f5fb;
  background: #171c25;
  font-size: 31px;
  font-weight: 300;
  line-height: 1;
}
.home-nav-button .icon { width: 21px; height: 21px; }
.home-nav-button.accent { border-color: #3989f6; color: #c8ddff; background: rgba(23, 45, 78, 0.45); }

.home-body { flex: 1; min-height: 0; padding: var(--space-5) var(--space-4) 136px; overflow-y: auto; }
.home-body .connection-note { margin: 0 0 var(--space-5); }
.home-section + .home-section { margin-top: var(--space-8); }
.home-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  margin: 0 0 var(--space-3);
}
.home-section-heading h2 { margin: 0; color: #f1f3f7; font-size: 15px; font-weight: 650; letter-spacing: -0.01em; }
.home-section-heading span { color: #8793a8; font-size: 11px; }
.remote-task-list,
.recent-thread-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }

.remote-task-card {
  position: relative;
  width: 100%;
  min-height: 132px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  grid-template-rows: auto 4px auto;
  gap: 10px 8px;
  padding: 15px 15px 13px 19px;
  overflow: hidden;
  border: 1px solid #303845;
  border-radius: 14px;
  color: #eef2f8;
  background: linear-gradient(135deg, rgba(28, 34, 45, 0.98), rgba(15, 19, 26, 0.98));
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}
.remote-task-card:hover { background: linear-gradient(135deg, rgba(34, 42, 56, 0.98), rgba(17, 22, 30, 0.98)); }
.remote-task-rail { position: absolute; inset: 0 auto 0 0; width: 4px; background: #6e7b8d; }
.remote-task-card.running .remote-task-rail { background: #3989f6; }
.remote-task-card.ready .remote-task-rail { background: #4ed38b; }
.remote-task-card.available .remote-task-rail,
.remote-task-card.preparing .remote-task-rail { background: #e7aa35; }
.remote-task-main { min-width: 0; display: grid; gap: 8px; align-content: start; }
.remote-task-title { overflow: hidden; color: #f6f8fb; font-size: 15px; font-weight: 620; line-height: 1.42; text-overflow: ellipsis; white-space: nowrap; }
.remote-task-status { width: fit-content; display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border: 1px solid #414c5e; border-radius: 5px; color: #abb6c8; background: rgba(8, 10, 14, 0.32); font-size: 10px; font-weight: 650; }
.remote-task-status i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.remote-task-card.running .remote-task-status { border-color: rgba(57, 137, 246, 0.42); color: #79aeff; background: rgba(34, 87, 162, 0.16); }
.remote-task-card.ready .remote-task-status { border-color: rgba(78, 211, 139, 0.42); color: #62dd96; background: rgba(31, 118, 71, 0.15); }
.remote-task-card.available .remote-task-status,
.remote-task-card.preparing .remote-task-status { border-color: rgba(231, 170, 53, 0.42); color: #efc46b; background: rgba(131, 91, 18, 0.14); }
.remote-task-more { justify-self: end; color: #7d899d; }
.remote-task-more .icon { width: 18px; height: 18px; }
.remote-task-progress { grid-column: 1 / -1; display: block; height: 4px; overflow: hidden; border-radius: 99px; background: rgba(183, 198, 219, 0.12); }
.remote-task-progress i { display: block; width: 36%; height: 100%; border-radius: inherit; background: #637185; }
.remote-task-card.running .remote-task-progress i { width: 58%; background: #3989f6; animation: remote-progress 2.4s ease-in-out infinite; }
.remote-task-card.ready .remote-task-progress i { width: 100%; background: #4ed38b; }
.remote-task-card.available .remote-task-progress i,
.remote-task-card.preparing .remote-task-progress i { width: 28%; background: #e7aa35; }
.remote-task-meta { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); color: #8793a8; font-size: 10px; line-height: 1.35; }
.remote-task-meta > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.remote-task-meta > span:last-child { display: inline-flex; align-items: center; gap: 3px; flex: 0 0 auto; }
.remote-task-meta .icon { width: 12px; height: 12px; }

.recent-thread-list { overflow: hidden; gap: 0; border: 1px solid #2c3542; border-radius: 14px; background: #11161f; }
.recent-thread-list li + li { border-top: 1px solid rgba(147, 160, 182, 0.14); }
.recent-thread-row { width: 100%; min-height: 68px; display: grid; grid-template-columns: 36px minmax(0, 1fr) 18px; align-items: center; gap: 11px; padding: 10px 12px; color: #d9e0eb; background: transparent; text-align: left; }
.recent-thread-row:hover { background: #171e29; }
.recent-thread-row > .icon { width: 17px; height: 17px; color: #8794a9; }
.recent-thread-icon { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid #36455e; border-radius: 9px; color: #7faeff; background: rgba(36, 78, 138, 0.22); }
.recent-thread-icon.ready { border-color: rgba(78, 211, 139, 0.34); color: #63dc97; background: rgba(31, 118, 71, 0.18); }
.recent-thread-icon.available { border-color: rgba(231, 170, 53, 0.34); color: #edc36d; background: rgba(131, 91, 18, 0.18); }
.recent-thread-icon.history { border-color: #3a4051; color: #9ba6b9; background: rgba(74, 85, 105, 0.16); }
.recent-thread-icon .icon { width: 19px; height: 19px; }
.recent-thread-copy { min-width: 0; }
.recent-thread-copy strong,
.recent-thread-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-thread-copy strong { color: #edf1f7; font-size: 13px; font-weight: 600; }
.recent-thread-copy small { margin-top: 4px; color: #8995a9; font-size: 10px; }

.project-folder-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.project-folder-card {
  width: 100%;
  min-width: 0;
  min-height: 118px;
  display: grid;
  align-content: space-between;
  gap: 18px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid #2e3848;
  border-radius: 14px;
  color: inherit;
  background: linear-gradient(145deg, #192332, #111822);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025);
  text-align: left;
}
.project-folder-card:hover,
.project-folder-card:focus-visible {
  border-color: #4b86d6;
  background: linear-gradient(145deg, #1d2b3e, #142033);
}
.project-folder-icon {
  width: 34px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(89, 153, 247, 0.35);
  border-radius: 8px;
  color: #8cb8ff;
  background: rgba(42, 96, 177, 0.18);
}
.project-folder-icon .icon { width: 19px; height: 19px; }
.project-folder-copy { min-width: 0; }
.project-folder-copy strong,
.project-folder-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-folder-copy strong { color: #eaf1fb; font-size: 12px; font-weight: 640; }
.project-folder-copy small { margin-top: 5px; color: #8795aa; font-size: 10px; }

.codex-project-hero { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.codex-project-hero p { margin: 0 0 4px; color: #8795aa; font-size: 11px; }
.codex-project-hero h2 { margin: 0; color: #eef3fb; font-size: 22px; line-height: 1.2; }
.codex-project-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0 0 30px; }
.codex-project-facts > div { min-width: 0; padding: 13px; border: 1px solid #2d3745; border-radius: 12px; background: #111822; }
.codex-project-facts dt { color: #8795aa; font-size: 10px; }
.codex-project-facts dd { margin: 6px 0 0; overflow: hidden; color: #e7edf6; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.project-thread-section .empty-state.compact { min-height: 126px; padding: 30px 20px; font-size: 13px; }

.home-screen .bottom-dock { gap: 10px; padding: 10px var(--space-4) max(env(safe-area-inset-bottom), 12px); border-top-color: rgba(147, 160, 182, 0.14); background: rgba(10, 13, 18, 0.94); }
.home-screen .search-field { min-height: 50px; border-radius: 14px; background: #151b25; }
.home-screen .primary-action { min-height: 50px; min-width: 116px; justify-content: center; border-radius: 14px; }

@keyframes remote-progress {
  0%, 100% { transform: translateX(0); opacity: 0.82; }
  50% { transform: translateX(45%); opacity: 1; }
}

@media (max-width: 360px) {
  .remote-sync-strip { padding-inline: 12px; }
  .remote-sync-strip strong { max-width: 190px; }
  .home-navbar { padding-inline: var(--space-3); }
  .home-body { padding-inline: var(--space-3); }
  .remote-task-card { min-height: 126px; padding-inline: 17px 13px; }
  .home-screen .bottom-dock { padding-inline: var(--space-3); }
  .home-screen .primary-action { min-width: 50px; width: 50px; padding: 0; }
  .home-screen .primary-action span { display: none; }
}

/* Keep the conversation stream deliberately unboxed, even after legacy theme rules. */
.prototype-thread-screen .message.assistant { width: 100%; border: 0; background: transparent; box-shadow: none; }
.prototype-thread-screen .message.user { border: 0; background: var(--prototype-user); box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.prototype-thread-screen .prototype-thought { border: 0; background: transparent; }
.prototype-thread-screen .prototype-thought > summary { border: 0; background: transparent; }
.prototype-thread-screen .prototype-thought[open] > summary { border-bottom: 0; }
.prototype-thread-screen .prototype-thought-list { background: transparent; }
