.zhucun-live-board,
.zhucun-live-state {
  min-width: 0;
  color: var(--ui-text);
  font-size: 16px;
  line-height: 1.55;
}

.zhucun-live-board-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-card);
  background: var(--ui-surface);
}

.zhucun-live-board-head p,
.zhucun-live-board-head h2,
.zhucun-live-board-head span,
.zhucun-live-card p,
.zhucun-live-card h3,
.zhucun-live-card h4,
.zhucun-live-card dl,
.zhucun-live-card fieldset {
  margin: 0;
}

.zhucun-live-board-head p {
  color: var(--ui-text-secondary);
}

.zhucun-live-board-head h2 {
  overflow-wrap: anywhere;
  font-size: 22px;
  line-height: 1.3;
}

.zhucun-live-trust-summary {
  display: grid;
  gap: 4px;
  min-width: 180px;
  text-align: right;
}

.zhucun-live-trust-summary span,
.zhucun-live-card-head p,
.zhucun-live-status-row span,
.zhucun-live-facts dt,
.zhucun-live-progress label {
  color: var(--ui-text-secondary);
}

.zhucun-live-untrusted,
.zhucun-live-publication-alert,
.zhucun-live-read-error,
.zhucun-live-command-error {
  margin-bottom: 16px;
  padding: 12px 16px;
  border: 2px solid var(--ui-danger);
  border-radius: var(--ui-radius-control);
  background: var(--ui-danger-soft-bg);
  color: var(--ui-danger);
}

.zhucun-live-untrusted p,
.zhucun-live-publication-alert p {
  margin: 4px 0 0;
}

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

.zhucun-live-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-card);
  background: var(--ui-surface);
  overflow-wrap: anywhere;
}

.zhucun-live-card.is-mine {
  border-color: var(--ui-accent);
  box-shadow: var(--ui-focus);
}

.zhucun-live-card.is-personal {
  padding: 16px;
  border-color: var(--ui-line);
}

.zhucun-live-my-roles {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-control);
  background: var(--ui-surface-muted);
  overflow-wrap: anywhere;
}

.zhucun-live-my-roles ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.zhucun-live-card-head,
.zhucun-live-status-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.zhucun-live-card-head h3 {
  font-size: 20px;
}

.zhucun-live-identity,
.zhucun-live-status-row strong {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--ui-badge-info-bg);
  color: var(--ui-action);
  font-weight: 700;
}

.zhucun-live-status-row {
  margin-top: 12px;
  padding-block: 10px;
  border-block: 1px solid var(--ui-line-soft);
}

.zhucun-live-card[data-live-status="ended"] .zhucun-live-status-row strong {
  background: var(--ui-badge-success-bg);
  color: var(--ui-success-text);
}

.zhucun-live-card[data-live-status="abnormal"] .zhucun-live-status-row strong {
  background: var(--ui-badge-danger-bg);
  color: var(--ui-danger);
}

.zhucun-live-facts {
  display: grid;
  gap: 8px;
  margin-top: 12px !important;
}

.zhucun-live-facts > div {
  display: grid;
  grid-template-columns: minmax(96px, .7fr) minmax(0, 1.3fr);
  gap: 12px;
}

.zhucun-live-facts dd {
  margin: 0;
  font-weight: 650;
  text-align: right;
}

.zhucun-live-progress {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.zhucun-live-progress progress {
  width: 100%;
  accent-color: var(--ui-action);
}

.zhucun-live-readiness {
  display: grid;
  gap: 8px;
  margin-top: 16px !important;
  padding: 12px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-control);
  background: var(--ui-surface-muted);
}

.zhucun-live-readiness legend {
  padding-inline: 6px;
  font-weight: 700;
}

.zhucun-live-readiness-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.zhucun-live-readiness-row > span,
.zhucun-live-readiness-row > span > span {
  display: grid;
  min-width: 0;
}

.zhucun-live-readiness-row > span > span {
  color: var(--ui-text-secondary);
}

.zhucun-live-card button,
.zhucun-live-card input[type="checkbox"] {
  min-width: 44px;
  min-height: 44px;
}

.zhucun-live-card input[type="checkbox"] {
  margin: 0;
  accent-color: var(--ui-action);
}

.zhucun-live-card :focus-visible {
  outline: 2px solid var(--ui-action);
  outline-offset: 2px;
  box-shadow: var(--ui-focus);
}

.zhucun-live-actions,
.zhucun-live-emergency {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding: 12px;
  border-radius: var(--ui-radius-control);
}

.zhucun-live-actions {
  border-left: 4px solid var(--ui-action);
  background: var(--ui-badge-info-bg);
}

.zhucun-live-emergency {
  border-left: 4px solid var(--ui-warning);
  background: var(--ui-surface-muted);
}

.zhucun-live-actions > div,
.zhucun-live-emergency > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.zhucun-live-emergency p,
.zhucun-live-exception {
  margin: 0;
  color: var(--ui-warning);
}

.zhucun-live-card-error:empty,
.zhucun-live-announcement:empty {
  display: none;
}

.zhucun-live-card-error:not(:empty) {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--ui-danger-soft-line);
  border-radius: var(--ui-radius-control);
  background: var(--ui-danger-soft-bg);
  color: var(--ui-danger);
}

.zhucun-live-state {
  padding: 20px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-card);
  background: var(--ui-surface);
}

.zhucun-live-state p {
  margin: 6px 0 0;
  color: var(--ui-text-secondary);
}

.zhucun-live-history {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-card);
  background: var(--ui-surface);
}

.zhucun-live-history > header,
.zhucun-live-history-entry > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.zhucun-live-history h3,
.zhucun-live-history p,
.zhucun-live-history-entry dl {
  margin: 0;
}

.zhucun-live-history > header p,
.zhucun-live-history-scope,
.zhucun-live-history-empty,
.zhucun-live-history-entry time,
.zhucun-live-history-entry dt {
  color: var(--ui-text-secondary);
}

.zhucun-live-history button {
  min-height: 44px;
}

.zhucun-live-history-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.zhucun-live-history-entry {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--ui-line-soft);
  border-radius: var(--ui-radius-control);
  background: var(--ui-surface-muted);
}

.zhucun-live-history-entry dl {
  display: grid;
  gap: 6px;
}

.zhucun-live-history-entry dl > div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 8px;
}

.zhucun-live-history-entry dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.zhucun-live-history-error {
  padding: 10px 12px;
  border: 1px solid var(--ui-danger-soft-line);
  border-radius: var(--ui-radius-control);
  background: var(--ui-danger-soft-bg);
  color: var(--ui-danger);
}

@media (max-width: 720px) {
  .zhucun-live-board-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .zhucun-live-board-head h2 { font-size: 20px; }
  .zhucun-live-trust-summary { display: flex; justify-content: space-between; gap: 8px; min-width: 0; text-align: left; font-size: 13px; }
  .zhucun-live-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 390px) {
  .zhucun-live-board-head,
  .zhucun-live-history > header,
  .zhucun-live-history-entry > header {
    align-items: stretch;
    flex-direction: column;
  }

  .zhucun-live-trust-summary {
    min-width: 0;
    text-align: left;
  }

  .zhucun-live-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .zhucun-live-card {
    min-width: 0;
    padding: 12px;
  }

  .zhucun-live-card.is-personal { padding: 12px; }

  .zhucun-live-facts > div {
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 8px;
  }

  .zhucun-live-history-entry dl > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .zhucun-live-actions > div,
  .zhucun-live-emergency > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
}
.zhucun-live-roster { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); }
.zhucun-live-roster h4 { margin: 0 0 8px; color: var(--muted); font-size: 15px; }
.zhucun-live-roster dl { margin: 0; }
.zhucun-live-roster dl > div { display: grid; grid-template-columns: 78px minmax(0, 1fr); align-items: baseline; gap: 10px; padding: 6px 0; }
.zhucun-live-roster dt { color: var(--muted); font-size: 14px; }
.zhucun-live-roster dd { margin: 0; font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
