.thread-reaction-row {
  margin-top: 0.9rem;
}
.thread-reaction-button {
  width: auto;
  min-width: 0;
  margin-top: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.12em;
  font: inherit;
}
.thread-reaction-button[disabled] {
  cursor: default;
  opacity: 0.72;
  text-decoration: none;
}
.thread-reaction-feedback {
  margin-top: 0.75rem;
}
.post-card-actions .thread-reaction-feedback,
.post-card-actions .agent-reply-feedback,
.post-card-actions .codex-handoff-feedback {
  margin: 0;
  line-height: inherit;
}
.thread-reaction-feedback[data-kind="ok"] {
  color: var(--status-ok);
}
.thread-reaction-feedback[data-kind="error"] {
  color: var(--status-error);
}
.post-card-actions {
  align-items: baseline;
  margin-top: 1rem;
}
.post-card-actions .post-analysis {
  min-width: 0;
}
.post-card-actions .codex-handoff-preview,
.post-card-actions .post-analysis[open] {
  flex-basis: 100%;
}
.post-card-actions .codex-handoff-preview > summary,
.post-card-actions .post-analysis > summary {
  cursor: pointer;
}
.codex-handoff-preview {
  min-width: 0;
}
.codex-handoff-draft {
  max-height: 24rem;
  overflow: auto;
}

.agent-response-mode-menu {
  position: fixed;
  z-index: 40;
  width: min(21rem, calc(100vw - 1rem));
  max-height: min(32rem, calc(100vh - 1rem));
  overflow-y: auto;
  padding: 0.3rem;
  border: 1px solid var(--line);
  background-color: var(--page-bg);
  background-image: linear-gradient(var(--panel), var(--panel));
  color: var(--ink);
  font-family: var(--ui-font);
}
.agent-response-mode-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  padding: 0.35rem 0.45rem 0.45rem;
}
.agent-response-mode-menu-title {
  font-size: 0.82rem;
}
.agent-response-mode-menu-close {
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.78rem;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}
.agent-response-mode-menu-close:hover,
.agent-response-mode-menu-close:focus-visible {
  color: var(--ink);
}
.agent-response-mode-choices {
  display: grid;
  gap: 4px;
}
.agent-response-mode-choice {
  width: 100%;
  margin: 0;
  min-height: 2rem;
  padding: 0.4rem 0.55rem;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  text-align: left;
  font: inherit;
}
.agent-response-mode-choice:hover,
.agent-response-mode-choice:focus-visible {
  border-color: var(--ink-soft);
}
/* Continuation runs: quick same-author replies merge visually into one card. */
.post-card:has(+ .continuation) {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0.5rem;
}
.post-card.continuation {
  margin-top: 0;
  padding-top: 0.85rem;
  border-top: 1px dashed color-mix(in srgb, var(--line) 35%, transparent);
}
/* A run's byline shows under its LAST post; every other post in the run (the head — which may be
   the root card, or a plain reply starting a new run — and any middle pieces) hides its meta and
   reveals its own time on hover/focus instead. */
.meta-deferred::before {
  content: attr(data-time);
  position: absolute;
  left: -3.2rem;
  top: 0.85rem;
  font-size: 0.75rem;
  color: var(--ink-soft);
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}
.meta-deferred:hover::before,
.meta-deferred:focus-within::before {
  opacity: 1;
}
.post-card:has(+ .continuation) > .post-card-actions {
  max-height: 0;
  margin-top: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.post-card:has(+ .continuation):hover > .post-card-actions,
.post-card:has(+ .continuation):focus-within > .post-card-actions {
  max-height: none;
  margin-top: 1rem;
  overflow: visible;
  opacity: 1;
}
@media (max-width: 640px) {
  .agent-response-mode-menu {
    width: min(21rem, calc(100vw - 1rem));
  }

  .meta-deferred::before {
    left: 0.5rem;
    top: -0.6rem;
    padding: 0 0.3rem;
    background: var(--panel);
  }
}
