.feedback-success {
  color: var(--green);
  margin-top: 8px;
}

.feedback-status-panel {
  margin-top: 12px;
  padding: 12px;
  background: var(--bg);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.feedback-status-panel.agent-logs-target {
  cursor: pointer;
}

.feedback-status-panel.agent-logs-target:active {
  background: var(--surface-2);
}

.agent-logs-link {
  border: none;
  padding: 0;
  margin: 0;
  background: none;
  color: var(--yellow);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.feedback-agent-active .agent-logs-link {
  font-weight: 600;
}

.feedback-status-line {
  font-size: 14px;
  line-height: 1.5;
}

.feedback-status-line.status-pending { color: var(--text-dim); }
.feedback-status-line.status-fixing { color: var(--yellow); }
.feedback-status-line.status-deploy { color: var(--accent); }
.feedback-status-line.status-fixed { color: var(--green); }
.feedback-status-line.status-failed { color: var(--red); }
.feedback-status-line.status-dismissed { color: var(--text-dim); }

.feedback-agent-summary {
  margin: 10px 0 0;
  padding: 12px;
  background: var(--surface);
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.55;
  max-height: min(50vh, 360px);
  overflow: auto;
  word-break: break-word;
  -webkit-overflow-scrolling: touch;
}

.feedback-agent-summary-lead {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.55;
  word-break: break-word;
}

.feedback-repair-quick {
  margin: 10px 0 0;
  padding: 10px 12px;
  background: rgba(61, 214, 140, 0.08);
  border: 1px solid rgba(61, 214, 140, 0.22);
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
}

.repair-toast.status-failed .feedback-repair-quick {
  background: rgba(255, 107, 107, 0.08);
  border-color: rgba(255, 107, 107, 0.22);
}

.feedback-agent-details {
  margin: 10px 0 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.feedback-agent-details summary {
  padding: 10px 12px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  list-style: none;
}

.feedback-agent-details summary::-webkit-details-marker {
  display: none;
}

.feedback-agent-details summary::before {
  content: "▸ ";
  display: inline-block;
  margin-right: 4px;
  transition: transform 0.15s ease;
}

.feedback-agent-details[open] summary::before {
  transform: rotate(90deg);
}

.feedback-agent-details .feedback-agent-summary,
.feedback-agent-details .repair-toast-details-body {
  margin: 0;
  max-height: none;
  border-top: 1px solid var(--border);
  border-radius: 0 0 8px 8px;
}

.feedback-demo-gif {
  margin: 10px 0 0;
  text-align: center;
}

.feedback-demo-gif img {
  width: min(100%, 320px);
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.feedback-demo-pending {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px dashed var(--border);
}

.feedback-demo-gif .hint-text {
  margin-top: 6px;
}

.feedback-photo-input {
  display: block;
  width: 100%;
  margin-top: 4px;
  font-size: 14px;
}

.feedback-photo-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.feedback-photo-preview img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.feedback-photo-preview.feedback-photo-attached img {
  width: 96px;
  height: 96px;
}

.agent-summary-content h3,
.agent-summary-content h4,
.agent-summary-content h5 {
  margin: 0.6em 0 0.35em;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.agent-summary-content h3:first-child,
.agent-summary-content h4:first-child,
.agent-summary-content h5:first-child,
.agent-summary-content p:first-child,
.agent-summary-content ul:first-child,
.agent-summary-content ol:first-child {
  margin-top: 0;
}

.agent-summary-content p {
  margin: 0.4em 0;
}

.agent-summary-content ul,
.agent-summary-content ol {
  margin: 0.4em 0;
  padding-left: 1.25em;
}

.agent-summary-content li {
  margin: 0.25em 0;
}

.agent-summary-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92em;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.agent-summary-content pre.agent-summary-code {
  margin: 0.5em 0;
  padding: 8px;
  background: var(--bg);
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.4;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.log-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
}

.log-viewer {
  margin: 0;
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 11px;
  line-height: 1.4;
  max-height: 50vh;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text-dim);
}

/* Copy-friendly dashboard copy — overrides widget customize user-select: none. */
.log-viewer,
.agent-summary-content,
.feedback-agent-summary,
.feedback-agent-summary-lead,
.feedback-status-line,
.hint-text,
.summary-text,
.modal-range,
.mino-chat-message-body,
.preview,
textarea[readonly],
.main-dashboard.customize-mode .log-viewer,
.tab-dashboard.customize-mode .log-viewer,
.main-dashboard.customize-mode .agent-summary-content,
.tab-dashboard.customize-mode .agent-summary-content,
.main-dashboard.customize-mode .feedback-agent-summary,
.tab-dashboard.customize-mode .feedback-agent-summary,
.main-dashboard.customize-mode .feedback-agent-summary-lead,
.tab-dashboard.customize-mode .feedback-agent-summary-lead,
.main-dashboard.customize-mode .feedback-status-line,
.tab-dashboard.customize-mode .feedback-status-line,
.main-dashboard.customize-mode .hint-text,
.tab-dashboard.customize-mode .hint-text,
.main-dashboard.customize-mode .summary-text,
.tab-dashboard.customize-mode .summary-text,
.main-dashboard.customize-mode .modal-range,
.tab-dashboard.customize-mode .modal-range,
.main-dashboard.customize-mode .mino-chat-message-body,
.tab-dashboard.customize-mode .mino-chat-message-body,
.main-dashboard.customize-mode .preview,
.tab-dashboard.customize-mode .preview,
.main-dashboard.customize-mode textarea[readonly],
.tab-dashboard.customize-mode textarea[readonly] {
  -webkit-user-select: text;
  user-select: text;
}

#running-agents-card.hidden {
  display: none;
}

.status-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 6px;
}

.status-badge.pending { background: rgba(139, 156, 179, 0.2); color: var(--text-dim); }
.status-badge.fixing { background: rgba(245, 197, 66, 0.2); color: var(--yellow); }
.status-badge.deploy { background: rgba(77, 163, 255, 0.2); color: var(--accent); }
.status-badge.fixed { background: rgba(61, 214, 140, 0.2); color: var(--green); }
.status-badge.failed { background: rgba(255, 107, 107, 0.2); color: var(--red); }
.status-badge.dismissed { background: rgba(139, 156, 179, 0.15); color: var(--text-dim); }

.repair-toast {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(var(--tab-height) + env(safe-area-inset-bottom, 0) + 12px);
  z-index: 30;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

.repair-toast-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.repair-toast-header strong {
  flex: 1;
  font-size: 14px;
}

.repair-toast-close {
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 20px;
  line-height: 1;
  padding: 0 4px;
  cursor: pointer;
}

.repair-toast-summary {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
}

.repair-toast-quick {
  margin: 8px 0 0;
}

.repair-toast-demo {
  margin: 8px 0 0;
}

.repair-toast-demo img {
  width: min(100%, 280px);
}

@media (max-width: 599px) {
  .feedback-status-panel {
    padding: 10px;
  }

  .feedback-status-line {
    font-size: 13px;
  }

  .feedback-agent-summary-lead {
    font-size: 15px;
    line-height: 1.6;
  }

  .feedback-agent-summary {
    font-size: 15px;
    line-height: 1.6;
    max-height: none;
    padding: 12px;
  }

  .agent-summary-content h3,
  .agent-summary-content h4,
  .agent-summary-content h5 {
    font-size: 16px;
  }

  .agent-summary-content pre.agent-summary-code {
    font-size: 12px;
  }

  .feedback-demo-gif img {
    width: 100%;
    max-width: 100%;
  }

  .repair-toast-summary {
    font-size: 14px;
  }

  .repair-toast-demo img {
    width: 100%;
    max-width: 100%;
  }
}

.inline-restart-btn {
  margin-top: 8px;
}

.repair-toast-usage {
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.service-restart-btn {
  width: 100%;
  margin-top: 8px;
}

.service-access {
  margin: 10px 0 4px;
}

.service-meta-list {
  margin: 12px 0 0;
}

.service-controls-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.service-url-list {
  margin: 0;
}

.service-url-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 8px;
}

.service-url-row dt {
  margin: 0;
  font-size: 12px;
  color: var(--text-dim);
}

.service-url-row dd {
  margin: 0;
  min-width: 0;
}

.service-url-link {
  display: block;
  font-size: 13px;
  line-height: 1.35;
  word-break: break-all;
  color: var(--accent);
  text-decoration: none;
}

.service-url-link:hover,
.service-url-link:focus-visible {
  text-decoration: underline;
}

.service-access-hint,
.service-restart-hint {
  margin-top: 8px;
}

.repair-toast.status-failed {
  border-color: rgba(255, 107, 107, 0.45);
}

@media (min-width: 768px) {
  /* Keep content centered but let the scroll container span the full viewport
     so wheel/touch scrolling works in the side margins on wide screens. */
  #app-main {
    padding-left: max(12px, calc((100% - 720px) / 2));
    padding-right: max(12px, calc((100% - 720px) / 2));
  }
}

