:root {
  color-scheme: light;
  --bg: #eef2f4;
  --surface: #ffffff;
  --surface-soft: #f7fafb;
  --surface-tint: #edf4f2;
  --text: #172026;
  --muted: #60707c;
  --border: #d6e0e6;
  --border-strong: #b8c7d0;
  --blue: #315efb;
  --teal: #18766a;
  --amber: #9d6512;
  --red: #bd2f2f;
  --ink: #101820;
  --shadow: 0 10px 28px rgba(23, 32, 38, 0.08);
  --rail-width: 420px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button {
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  padding: 0 12px;
  cursor: pointer;
}

button:hover {
  border-color: var(--border-strong);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

button.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

button.danger {
  border-color: #e6b8b8;
  color: var(--red);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 9px 10px;
}

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--red);
  box-shadow: 0 0 0 2px rgba(189, 47, 47, 0.12);
}

textarea {
  resize: vertical;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(22px, 3vw, 34px);
}

h2 {
  font-size: 18px;
}

h3 {
  font-size: 15px;
}

h4 {
  font-size: 14px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(238, 242, 244, 0.96);
  padding: 16px clamp(16px, 3vw, 32px);
  backdrop-filter: blur(8px);
}

.topbar p {
  margin: 3px 0 0;
  color: var(--muted);
}

.auth {
  display: grid;
  grid-template-columns: minmax(170px, 260px) auto;
  align-items: end;
  gap: 10px;
}

.auth-user {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.auth-user img {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}

.auth-user span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-status {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.auth-status.authenticated {
  color: var(--teal);
}

.auth-status.invalid,
.auth-status.missing {
  color: var(--red);
}

.auth-status.checking {
  color: var(--blue);
}

.mobile-tabs {
  display: none;
}

.dashboard {
  display: grid;
  gap: 18px;
  padding: 18px clamp(16px, 3vw, 32px) 36px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--rail-width);
  gap: 14px;
  align-items: start;
}

.board-surface,
.panel,
.pipeline-card,
.event-card,
.schedule-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.board-surface {
  min-height: calc(100vh - 146px);
  padding: 16px;
}

.board-surface,
.card-detail-panel,
.audit-panel,
.task-workspace {
  scroll-margin-top: 96px;
}

.work-rail {
  position: sticky;
  top: 112px;
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 128px);
  overflow: auto;
  padding-right: 2px;
}

.panel {
  padding: 16px;
}

.panel-head,
.section-title,
.board-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-head span,
.section-title span,
.board-toolbar span,
.muted {
  color: var(--muted);
}

.toolbar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.stack {
  display: grid;
  gap: 12px;
}

.form-status,
.form-errors,
.execution-preview {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 10px 12px;
}

.form-status {
  color: var(--teal);
}

.form-status.pending {
  color: var(--blue);
}

.form-errors {
  border-color: #e6b8b8;
  background: #fff6f6;
  color: var(--red);
  margin-bottom: 12px;
}

.form-errors ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

.execution-preview {
  display: grid;
  gap: 3px;
  color: var(--muted);
}

.execution-preview strong {
  color: var(--text);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.intake-actions {
  position: sticky;
  bottom: 10px;
  z-index: 5;
  margin: 4px -4px -4px;
  border-top: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), var(--surface) 28%);
  box-shadow: 0 -10px 22px rgba(23, 32, 38, 0.07);
  padding: 14px 4px 4px;
}

.intake-actions button {
  width: 100%;
  touch-action: manipulation;
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 12px;
}

.button-row,
.detail-actions,
.schedule-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.board-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(180px, 1fr));
  gap: 12px;
  align-items: stretch;
}

.board-column {
  min-height: calc(100vh - 230px);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #edf3f5;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.board-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.board-column-head h3 {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.board-column-body {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 10px;
}

.board-card {
  width: 100%;
  min-height: 112px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 3px 12px rgba(23, 32, 38, 0.07);
  display: grid;
  gap: 8px;
  padding: 10px;
  text-align: left;
}

.board-card:hover,
.board-card.selected {
  border-color: var(--blue);
}

.board-card.selected {
  box-shadow: 0 0 0 2px rgba(49, 94, 251, 0.16), 0 3px 12px rgba(23, 32, 38, 0.07);
}

.board-card h4 {
  overflow-wrap: anywhere;
}

.board-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.board-card-progress {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.board-card-jump {
  border-top: 1px solid var(--border);
  color: var(--blue);
  font-size: 12px;
  font-weight: 650;
  padding-top: 8px;
}

.board-card-meta,
.badge-row,
.attachment-chips,
.attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  padding: 2px 8px;
  font-size: 12px;
}

.badge.quick {
  background: #e7f5ef;
  color: var(--teal);
}

.badge.standard {
  background: #eef2ff;
  color: var(--blue);
}

.badge.deep {
  background: #fff3df;
  color: var(--amber);
}

.badge.warning,
.badge.failed {
  background: #fff0f0;
  color: var(--red);
}

.badge.review {
  background: #f3f0ff;
  color: #6d47c6;
}

.badge.work-kind {
  background: #edf4f2;
  color: var(--teal);
}

.priority-high {
  color: var(--red);
}

.priority-normal {
  color: var(--blue);
}

.priority-low {
  color: var(--teal);
}

.paste-zone {
  min-height: 42px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  display: flex;
  align-items: center;
  padding: 10px;
}

.paste-zone:focus {
  outline: 2px solid rgba(49, 94, 251, 0.18);
  border-color: var(--blue);
}

.attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  padding: 3px 9px;
  font-size: 12px;
}

.attachment-chip button {
  min-height: 20px;
  width: 20px;
  border-radius: 999px;
  padding: 0;
}

.attachment-tile {
  width: 118px;
  min-height: 104px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
  display: grid;
  grid-template-rows: 68px auto;
  overflow: hidden;
  padding: 0;
  text-align: left;
}

.attachment-thumb {
  width: 100%;
  height: 68px;
  object-fit: cover;
  background: #dfe9ee;
  border-bottom: 1px solid var(--border);
}

.attachment-preview-frame {
  display: block;
  width: 100%;
  height: 68px;
  background: #edf4f7;
  border-bottom: 1px solid var(--border);
}

.attachment-preview-frame .attachment-thumb,
.attachment-preview-frame .attachment-file {
  border-bottom: 0;
}

.attachment-file {
  display: grid;
  place-items: center;
  height: 68px;
  color: var(--muted);
  background: #f5f9fb;
  border-bottom: 1px solid var(--border);
}

.attachment-file-icon {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  min-height: 30px;
  border: 1px solid #cdd9df;
  border-radius: 5px;
  background: #fff;
  font-size: 13px;
  font-weight: 750;
  line-height: 1;
}

.attachment-file-pdf {
  color: #a11c1c;
  background: #fff6f6;
}

.attachment-file-pdf .attachment-file-icon {
  border-color: #efb9b9;
  background: #fff;
  box-shadow: inset 0 -4px 0 #f3d1d1;
}

.attachment-file-image {
  color: #276777;
  background: #eef8fb;
}

.attachment-file-image .attachment-file-icon {
  border-color: #b9d8df;
  background: #fff;
  box-shadow: inset 0 -4px 0 #d4edf2;
}

.attachment-name {
  padding: 6px 8px;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-state {
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--muted);
  padding: 18px;
  background: var(--surface-soft);
}

.task-summary {
  display: grid;
  gap: 8px;
}

.detail-jump-nav {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: -2px 0 2px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface), rgba(255, 255, 255, 0.92));
  padding: 8px 0;
}

.detail-jump-nav button {
  min-height: 30px;
  padding: 0 9px;
  font-size: 12px;
}

.task-heartbeat {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.heartbeat-card,
.current-step {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
}

.heartbeat-card {
  display: grid;
  gap: 4px;
  padding: 10px;
}

.heartbeat-card span,
.activity-meta {
  color: var(--muted);
  font-size: 12px;
}

.task-heartbeat.stale .heartbeat-card,
.current-step.stale,
.link-warning {
  border-color: #f1c8c8;
  background: #fff7f7;
}

.current-step {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.current-step h3 {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.current-step p {
  margin: 0;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.link-warning {
  color: var(--red);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
}

.detail-row,
.metric-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.detail-row code,
.task-summary code {
  overflow-wrap: anywhere;
}

.detail-row.multiline {
  align-items: flex-start;
}

.detail-row-content {
  min-width: 0;
  max-width: min(100%, 620px);
  text-align: right;
}

.error-summary {
  color: var(--red);
}

.error-summary .text-details {
  color: var(--ink);
  text-align: left;
}

.detail-section {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.detail-section h3 {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.section-heading-row,
.thread-message-head,
.thread-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.section-heading-row span,
.thread-message-head span,
.thread-actions span {
  color: var(--muted);
  font-size: 12px;
}

.card-thread {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 10px;
}

.card-thread-list {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
  padding-right: 2px;
}

.thread-message {
  display: grid;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.thread-message.user {
  border-color: #d6e0ff;
}

.thread-message.changarro {
  border-color: #cde8df;
  background: #f8fffc;
}

.thread-message p {
  margin: 0;
  overflow-wrap: anywhere;
}

.thread-message code {
  color: var(--muted);
  font-size: 12px;
}

.card-thread-form {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.card-thread-form textarea {
  min-height: 92px;
}

.thread-actions {
  align-items: end;
}

.thread-actions button {
  min-width: 88px;
}

.thread-image-list,
.thread-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.thread-attachments {
  margin-top: 2px;
}

.thread-attachment {
  width: 112px;
  min-height: 104px;
  padding: 0;
}

.thread-attachment .attachment-thumb,
.thread-attachment .attachment-file {
  height: 72px;
}

.deployment-panel,
.skill-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 10px;
}

.deployment-summary,
.deployment-attempt-line,
.skill-summary,
.skill-proposal-line,
.skill-usage-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
}

.deployment-summary span:last-child,
.deployment-attempt-line span,
.skill-summary span:last-child,
.skill-proposal-line span,
.skill-usage-line span {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.deployment-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px auto;
  gap: 8px;
  align-items: end;
}

.deployment-attempt-list,
.skill-proposal-list,
.skill-usage-list {
  display: grid;
  gap: 6px;
}

.deployment-history,
.skill-history,
.skill-preview {
  margin-top: 8px;
}

.deployment-history summary,
.skill-history summary,
.skill-preview summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 650;
}

.deployment-attempt-line,
.skill-proposal-line,
.skill-usage-line {
  border-top: 1px solid var(--border);
  padding-top: 8px;
}

.deployment-attempt-line div,
.skill-proposal-line div,
.skill-usage-line div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.skill-panel p {
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.task-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.deployment-attempt-line time {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.audit-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
  overflow: hidden;
}

.audit-panel summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  padding: 10px 12px;
  color: var(--ink);
  font-weight: 650;
}

.audit-panel summary span:last-child {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.audit-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 0 10px 10px;
}

.audit-stats div {
  display: grid;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  padding: 8px;
}

.audit-stats span,
.audit-phase {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.audit-note {
  margin: 0 10px 10px;
  border: 1px solid #f0d9a8;
  border-radius: 6px;
  background: #fffaf0;
  color: #6f541c;
  font-size: 12px;
  line-height: 1.4;
  padding: 8px 10px;
}

.evidence-disclaimer {
  border-color: #c9d8ee;
  background: #f6f9fd;
  color: #31415a;
}

.evidence-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 10px 10px;
}

.evidence-summary span {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  padding: 5px 8px;
}

.evidence-summary strong {
  color: var(--ink);
}

.evidence-log {
  display: grid;
  gap: 6px;
  max-height: min(54vh, 560px);
  overflow: auto;
  padding: 0 10px 10px;
}

.evidence-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  padding: 8px 10px;
}

.evidence-item.quick {
  border-color: #b8d8ce;
  background: #f5fbf8;
}

.evidence-item.review,
.evidence-item.warning {
  border-color: #f0d9a8;
  background: #fffaf0;
}

.evidence-item.failed {
  border-color: #f1c8c8;
  background: #fff7f7;
}

.evidence-item.new-evidence {
  border-color: #9db7df;
  box-shadow: inset 3px 0 0 #3d6fb6;
}

.evidence-category {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.evidence-live-marker {
  border: 1px solid #b7c7df;
  border-radius: 999px;
  background: #eef5ff;
  color: #284c7d;
  font-size: 10px;
  font-weight: 750;
  padding: 2px 6px;
  text-transform: uppercase;
}

.evidence-details {
  margin-top: 4px;
}

.evidence-details summary,
.audit-timeline-details summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
}

.evidence-details .json {
  margin-top: 6px;
  max-height: 220px;
}

.audit-timeline-details {
  border-top: 1px solid var(--border);
  padding-top: 8px;
}

.audit-timeline-details > summary {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 0 10px 8px;
}

.audit-timeline {
  display: grid;
  gap: 6px;
  max-height: min(70vh, 720px);
  overflow: auto;
  padding: 0 10px 10px;
}

.audit-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  padding: 8px 10px;
}

.audit-item.quick {
  border-color: #b8d8ce;
  background: #f5fbf8;
}

.audit-item.review,
.audit-item.warning {
  border-color: #f0d9a8;
  background: #fffaf0;
}

.audit-item.failed {
  border-color: #f1c8c8;
  background: #fff7f7;
}

.audit-main,
.audit-heading,
.audit-side {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.audit-main p {
  margin: 0;
  overflow-wrap: anywhere;
}

.audit-side {
  justify-items: end;
}

.audit-side time {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.audit-side button {
  min-height: 28px;
  padding: 0 8px;
}

.activity-list {
  display: grid;
  gap: 6px;
}

.activity-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 8px 10px;
}

.activity-item.failed {
  border-color: #f1c8c8;
  background: #fff7f7;
}

.activity-item.warning {
  border-color: #f0d9a8;
  background: #fffaf0;
}

.activity-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.activity-title {
  font-weight: 650;
}

.activity-main p {
  margin: 0;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.activity-item time {
  color: var(--muted);
  white-space: nowrap;
}

.debug-details {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.debug-details summary {
  cursor: pointer;
  padding: 10px 12px;
  color: var(--muted);
  background: var(--surface-soft);
  font-weight: 650;
}

.compact-text {
  overflow-wrap: anywhere;
}

.text-details {
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.text-details summary {
  cursor: pointer;
  padding: 8px 10px;
  color: var(--muted);
  background: var(--surface-soft);
  font-weight: 650;
}

.text-block {
  max-height: 260px;
  overflow: auto;
  margin: 0;
  background: #f4f7f9;
  color: var(--ink);
  padding: 10px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.json {
  max-height: 220px;
  overflow: auto;
  margin: 0;
  background: var(--ink);
  color: #dce9f2;
  padding: 10px;
  font-size: 12px;
}

.task-workspace,
.system-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.8fr);
  gap: 18px;
  align-items: start;
}

.system-grid.single-column {
  grid-template-columns: minmax(0, 1fr);
}

.system-workspace {
  display: grid;
  gap: 18px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.pipeline-card {
  padding: 16px;
  display: grid;
  gap: 12px;
  min-height: 178px;
}

.plugin-card {
  align-content: start;
}

.plugin-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 170px;
  overflow: auto;
}

.plugin-list code {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  padding: 4px 8px;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.list {
  display: grid;
  gap: 10px;
}

.schedule-item {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.schedule-run-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 8px 10px;
}

.schedule-run-line code {
  overflow-wrap: anywhere;
}

.event-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.event-card {
  padding: 12px;
  display: grid;
  gap: 8px;
}

.event-card code {
  overflow-wrap: anywhere;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  max-width: min(420px, calc(100vw - 36px));
  min-height: 38px;
  border-radius: 8px;
  background: var(--text);
  color: #fff;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 160ms ease, transform 160ms ease;
  padding: 10px 12px;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1120px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .board-surface,
  .card-detail-panel,
  .audit-panel,
  .task-workspace {
    scroll-margin-top: 112px;
  }

  .detail-jump-nav {
    top: 92px;
  }

  .work-rail {
    position: static;
    max-height: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .board-grid,
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .board-column {
    min-height: 260px;
  }
}

@media (max-width: 760px) {
  .topbar {
    position: static;
    display: grid;
    padding: 14px 12px;
  }

  .auth,
  .form-grid,
  .inline-form,
  .task-workspace,
  .system-grid,
  .card-grid,
  .event-grid,
  .task-heartbeat,
  .audit-stats,
  .work-rail {
    grid-template-columns: 1fr;
  }

  .audit-item {
    grid-template-columns: 1fr;
  }

  .audit-side {
    justify-items: start;
  }

  .mobile-tabs {
    position: sticky;
    top: 0;
    z-index: 25;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    border-bottom: 1px solid var(--border);
    background: rgba(238, 242, 244, 0.98);
    padding: 8px 10px;
    backdrop-filter: blur(8px);
  }

  .mobile-tabs button {
    min-height: 34px;
    padding: 0 8px;
    font-size: 12px;
  }

  .mobile-tabs button.active {
    border-color: var(--blue);
    background: #eef2ff;
    color: var(--blue);
  }

  .dashboard {
    padding: 12px;
  }

  .board-surface,
  .card-detail-panel,
  .audit-panel,
  .task-workspace {
    scroll-margin-top: 62px;
  }

  .detail-jump-nav {
    top: 48px;
  }

  .workspace,
  .system-workspace,
  .task-workspace {
    display: block;
  }

  .mobile-pane {
    display: none;
  }

  .mobile-pane.active-pane {
    display: block;
  }

  .work-rail {
    display: block;
  }

  .board-surface {
    min-height: auto;
    padding: 12px;
  }

  .board-toolbar {
    align-items: stretch;
  }

  .board-grid {
    grid-template-columns: 1fr;
  }

  .board-column {
    min-height: 180px;
  }

  .panel {
    padding: 14px;
  }

  .panel + .panel,
  .board-surface + .panel,
  .mobile-pane.active-pane + .mobile-pane.active-pane {
    margin-top: 12px;
  }
}
