:root {
  color-scheme: light;
  --bg: #fbfaf7;
  --surface: #ffffff;
  --surface-2: #f0f1ee;
  --surface-3: #f7f7f3;
  --text: #171717;
  --muted: #6f726b;
  --line: #e0e2dc;
  --line-strong: #c9ccc4;
  --accent: #111111;
  --accent-strong: #000000;
  --info: #3f5f8f;
  --warning: #9b650f;
  --danger: #a23a31;
  --ready: #237a57;
  --gap: #8d6418;
  --shadow: 0 24px 90px rgba(26, 27, 24, .09);
  --shadow-soft: 0 10px 36px rgba(26, 27, 24, .055);
  --radius: 8px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

button,
textarea,
input {
  font: inherit;
}

button {
  min-height: 36px;
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-weight: 750;
  cursor: pointer;
}

button:hover {
  background: var(--accent-strong);
}

button:disabled {
  cursor: wait;
  opacity: .65;
}

a {
  color: #096c62;
}

.app-shell {
  width: min(1360px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 30px 0 60px;
}

.topbar {
  position: relative;
  display: grid;
  place-items: start center;
  min-height: 280px;
  padding-top: 88px;
  margin-bottom: 10px;
  text-align: center;
}

.top-actions {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.brand-block {
  display: grid;
  justify-items: center;
  width: 100%;
  max-width: 920px;
}

.account-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .78);
  box-shadow: var(--shadow-soft);
}

.account-box span {
  max-width: 220px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0;
}

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

h1 {
  font-size: clamp(44px, 6vw, 76px);
  line-height: .94;
  max-width: 100%;
  font-weight: 760;
  overflow-wrap: normal;
}

.title-break {
  display: inline;
}

h2 {
  font-size: 16px;
}

.subtitle {
  max-width: 680px;
  margin-top: 18px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 16px;
}

.health,
.status-line,
.panel,
.query-panel,
.empty-state,
.stat {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .88);
  border-radius: var(--radius);
}

.health {
  padding: 8px 12px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  background: rgba(255, 255, 255, .78);
  box-shadow: var(--shadow-soft);
}

.health.ok {
  color: var(--accent-strong);
}

.health.warn {
  color: var(--warning);
}

.secondary {
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .9);
  color: var(--text);
  font-size: 13px;
}

.secondary:hover {
  background: #fff;
  border-color: var(--line-strong);
}

.page-tabs {
  display: inline-flex;
  gap: 4px;
  margin: 0 0 16px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .82);
}

.page-tabs button {
  min-height: 38px;
  padding: 0 16px;
  background: transparent;
  color: var(--muted);
}

.page-tabs button.active {
  background: var(--accent);
  color: #fff;
}

.dashboard-active .topbar {
  min-height: 190px;
  padding-top: 58px;
}

.dashboard-active h1 {
  font-size: clamp(34px, 5vw, 56px);
}

.dashboard-page {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.dashboard-toolbar,
.dashboard-filters,
.dashboard-summary,
.dashboard-status,
.opinion-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .9);
}

.dashboard-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
}

.dashboard-toolbar h2 {
  font-size: 20px;
}

.primary-action {
  background: var(--accent);
  color: #fff;
}

.dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.dashboard-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  padding: 12px;
  align-items: end;
}

.dashboard-search {
  grid-column: span 2;
}

.dashboard-filters label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.dashboard-filters input,
.dashboard-filters select {
  width: 100%;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-3);
  color: var(--text);
  font: inherit;
}

.dashboard-filters input[readonly] {
  color: var(--muted);
}

.dashboard-tags-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .9);
}

.dashboard-pool-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .78);
}

.dashboard-pool-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.dashboard-tags-panel > div:first-child {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.dashboard-tags-panel strong {
  font-size: 14px;
}

.dashboard-tags-panel span {
  color: var(--muted);
  font-size: 12px;
}

.tag-create-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.tag-create-row input {
  width: 100%;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-3);
  color: var(--text);
  font: inherit;
}

.dashboard-tag-chip,
.opinion-tag-chip {
  min-height: 20px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  box-shadow: none;
}

.dashboard-tag-chip:hover,
.opinion-tag-chip:hover {
  border-color: color-mix(in srgb, var(--danger) 35%, var(--line));
  color: var(--danger);
  transform: none;
}

.dashboard-summary {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  overflow: hidden;
}

.dashboard-summary div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  padding: 10px 14px;
  border-right: 1px solid var(--line);
}

.dashboard-summary div:last-child {
  border-right: 0;
}

.dashboard-summary span {
  color: var(--muted);
  font-size: 12px;
}

.dashboard-summary strong {
  font-size: 18px;
}

.dashboard-summary .good strong {
  color: var(--ready);
}

.dashboard-summary .bad strong {
  color: var(--danger);
}

.dashboard-status {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 13px;
}

.dashboard-status.error {
  border-color: color-mix(in srgb, var(--danger) 38%, var(--line));
  color: var(--danger);
}

.dashboard-refresh-panel {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .9);
}

.dashboard-refresh-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--text);
  font-size: 12px;
}

.dashboard-refresh-head span {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-weight: 750;
}

.dashboard-refresh-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
}

.dashboard-refresh-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width .2s ease;
}

.dashboard-refresh-list {
  display: grid;
  gap: 5px;
  max-height: 170px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.dashboard-refresh-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, auto);
  gap: 10px;
  align-items: baseline;
  min-width: 0;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
}

.dashboard-refresh-row strong,
.dashboard-refresh-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-refresh-row.changed {
  background: color-mix(in srgb, var(--ready) 10%, #fff);
  color: var(--ready);
}

.dashboard-refresh-row.failed {
  background: color-mix(in srgb, var(--danger) 9%, #fff);
  color: var(--danger);
}

.dashboard-refresh-row.running {
  background: color-mix(in srgb, var(--accent) 7%, #fff);
  color: #096c62;
}

.dashboard-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .9);
}

.dashboard-pager-top {
  justify-content: flex-start;
}

.dashboard-total-posts {
  flex: 0 0 auto;
  color: var(--text);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.dashboard-pager span {
  min-width: 190px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-align: center;
}

.dashboard-calendar {
  display: flex;
  align-items: stretch;
  flex: 1 1 320px;
  gap: 6px;
  max-width: min(100%, 920px);
  min-width: 0;
  overflow-x: auto;
  padding: 2px;
  scrollbar-width: thin;
}

.calendar-day {
  flex: 0 0 auto;
  min-width: 76px;
  min-height: 48px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.calendar-day span {
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.1;
  text-align: left;
}

.calendar-day strong {
  font-size: 15px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.calendar-day.has-hot {
  border-color: color-mix(in srgb, var(--ready) 38%, var(--line));
}

.calendar-day.has-negative {
  border-color: color-mix(in srgb, var(--danger) 38%, var(--line));
}

.calendar-day.has-missing {
  background: color-mix(in srgb, var(--warning) 7%, #fff);
}

.calendar-day.active {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

.calendar-day.active span {
  color: rgba(255, 255, 255, .78);
}

.opinion-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  align-items: start;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}

.opinion-card {
  display: grid;
  grid-template-rows: auto minmax(0, auto) auto;
  gap: 8px;
  min-width: 0;
  min-height: 0;
  max-height: 360px;
  padding: 10px;
  border-left: 4px solid var(--line-strong);
  overflow: hidden;
}

.opinion-card.traffic-hot {
  border-left-color: var(--ready);
  background: color-mix(in srgb, var(--ready) 7%, #fff);
}

.opinion-card.sentiment-bad {
  border-left-color: var(--danger);
  background: color-mix(in srgb, var(--danger) 7%, #fff);
}

.opinion-card.selected {
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent);
}

.opinion-card.refresh-changed {
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--ready) 28%, transparent);
}

.opinion-card.refresh-failed {
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--danger) 24%, transparent);
}

.opinion-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  min-width: 0;
}

.opinion-check {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  min-width: 0;
}

.opinion-check input {
  width: 16px;
  height: 16px;
}

.opinion-check strong {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  max-width: 100%;
  padding: 2px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 11%, #fff);
  color: #0b5f57;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.opinion-check span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 20px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 10px;
  line-height: 1.1;
}

.opinion-line {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.opinion-content-scroll {
  min-width: 0;
  min-height: 0;
  max-height: 170px;
  overflow-y: auto;
  padding: 2px 6px 2px 0;
  scrollbar-width: thin;
}

.opinion-source-link {
  display: block;
  margin-top: 7px;
  color: #096c62;
  font-size: 11px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.opinion-card-footer {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, .76), rgba(255, 255, 255, .96));
}

.opinion-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(42px, 1fr));
  gap: 4px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.opinion-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 20px;
}

.opinion-tag-select {
  min-height: 22px;
  max-width: 104px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.metric-status {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
}

.metric-status.available {
  border-color: color-mix(in srgb, var(--ready) 34%, var(--line));
  color: var(--ready);
}

.metric-status.partial {
  border-color: color-mix(in srgb, var(--warning) 42%, var(--line));
  color: #8a6b00;
}

.metric-status.missing {
  border-color: color-mix(in srgb, var(--danger) 24%, var(--line));
  color: color-mix(in srgb, var(--danger) 72%, var(--muted));
}

.metric-status.zero {
  border-color: color-mix(in srgb, var(--muted) 28%, var(--line));
  color: var(--muted);
  background: color-mix(in srgb, var(--muted) 6%, var(--surface-2));
}

.metric-timestamp {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
}

.metric-timestamp.recent {
  color: var(--ready);
}

.opinion-line span,
.opinion-line strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.opinion-metrics span {
  min-width: 0;
  padding: 2px 5px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  overflow: visible;
  white-space: nowrap;
}

.opinion-metrics .metric-missing {
  color: color-mix(in srgb, var(--muted) 62%, #fff);
  cursor: help;
}

.opinion-line strong {
  color: var(--text);
}

.opinion-card h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.36;
}

.opinion-card p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.42;
  white-space: pre-wrap;
}

.sentiment-pill {
  flex: none;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--surface-2);
}

.language-pill {
  flex: none;
  padding: 2px 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 8%, #fff);
  color: #096c62;
  font-weight: 800;
}

.author-group-pill {
  flex: none;
  padding: 2px 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 9%, #fff);
  color: #096c62;
  font-weight: 800;
}

.sentiment-bad .sentiment-pill {
  background: color-mix(in srgb, var(--danger) 14%, #fff);
  color: var(--danger);
}

.traffic-hot .opinion-metrics span:first-child,
.traffic-hot .opinion-metrics span:nth-child(2) {
  color: var(--ready);
  font-weight: 800;
}

.opinion-card-actions .mini-button {
  min-height: 26px;
  padding: 4px 6px;
  font-size: 10px;
}

.opinion-card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-content: start;
  gap: 5px;
  min-width: 0;
}

.button-feedback {
  border-color: color-mix(in srgb, var(--ready) 36%, var(--line)) !important;
  color: var(--ready) !important;
}

.opinion-card-actions a,
.opinion-card-actions span {
  display: block;
  overflow: hidden;
  color: #096c62;
  font-size: 10px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-empty {
  grid-column: 1 / -1;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .9);
}

.system-page,
.telegram-page,
.wechat-page,
.xactivity-page {
  display: grid;
  gap: 12px;
}

.system-toolbar h2,
.telegram-toolbar h2,
.wechat-toolbar h2,
.xactivity-toolbar h2 {
  font-size: 24px;
}

.system-note,
.system-updated {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.system-summary,
.xactivity-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.xactivity-coverage {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
}

.system-card,
.system-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .9);
}

.system-card {
  display: grid;
  gap: 6px;
  min-height: 104px;
  padding: 14px;
  border-left: 4px solid var(--line-strong);
}

.system-card.ok {
  border-left-color: var(--ready);
}

.system-card.warn {
  border-left-color: var(--warning);
}

.system-card.bad {
  border-left-color: var(--danger);
}

.system-card.disabled {
  opacity: .72;
}

.telegram-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .9);
  box-shadow: var(--shadow-soft);
}

.telegram-summary div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 9px 12px;
  border-right: 1px solid var(--line);
}

.telegram-summary div:last-child {
  border-right: 0;
}

.telegram-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.telegram-summary strong {
  overflow: hidden;
  font-size: 16px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.telegram-chat-shell {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(246, 244, 238, .92)),
    var(--surface);
  box-shadow: var(--shadow-soft);
}

.telegram-chat-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .88);
}

.telegram-chat-head div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.telegram-chat-head strong {
  font-size: 15px;
}

.telegram-chat-head span,
.telegram-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.4;
}

.telegram-status {
  max-width: 620px;
  text-align: right;
}

.telegram-status.error {
  color: var(--danger);
}

.telegram-feed {
  display: grid;
  max-height: min(68vh, 760px);
  overflow: auto;
  gap: 8px;
  padding: 12px;
  overscroll-behavior: contain;
}

.telegram-card {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  min-width: 0;
}

.telegram-avatar {
  display: grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(9, 108, 98, .12);
  border-radius: 50%;
  background: #e9f2ef;
  color: #096c62;
  font-size: 11px;
  font-weight: 950;
}

.telegram-bubble {
  display: grid;
  gap: 7px;
  min-width: 0;
  max-width: min(780px, calc(100% - 38px));
  padding: 9px 11px;
  border: 1px solid rgba(0, 0, 0, .07);
  border-radius: 10px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 4px 14px rgba(26, 31, 29, .045);
}

.telegram-card header,
.telegram-card footer {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}

.telegram-card header div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.telegram-card strong,
.telegram-card span,
.telegram-card small,
.telegram-card p,
.telegram-card a {
  min-width: 0;
}

.telegram-card header strong {
  font-size: 13px;
}

.telegram-card header span,
.telegram-card footer,
.telegram-file span,
.telegram-file small {
  color: var(--muted);
  font-size: 11px;
}

.telegram-card header em {
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(9, 108, 98, .08);
  color: #096c62;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.telegram-text {
  max-height: 86px;
  overflow: auto;
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.telegram-text.muted {
  color: var(--muted);
}

.telegram-links,
.telegram-files {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.telegram-links a,
.telegram-card footer a {
  color: #096c62;
  font-size: 11px;
  font-weight: 800;
}

.telegram-file {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  column-gap: 8px;
  align-items: center;
  min-width: min(100%, 210px);
  max-width: 280px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--text);
  text-decoration: none;
}

.telegram-file img,
.telegram-file-icon {
  grid-row: 1 / span 3;
  width: 34px;
  height: 34px;
  border-radius: 6px;
}

.telegram-file img {
  object-fit: cover;
  background: #fff;
}

.telegram-file-icon {
  display: grid;
  place-items: center;
  background: rgba(9, 108, 98, .08);
  color: #096c62;
  font-size: 9px;
  font-weight: 950;
  text-transform: uppercase;
}

.telegram-file strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wechat-placeholder {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--shadow-soft);
}

.wechat-placeholder strong {
  font-size: 20px;
}

.wechat-placeholder p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.wechat-placeholder div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wechat-placeholder span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.system-card span,
.system-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.system-card strong {
  font-size: 22px;
  line-height: 1.1;
}

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

.xactivity-grid {
  display: grid;
  grid-template-columns: minmax(280px, .85fr) minmax(0, 1.15fr);
  gap: 12px;
}

.system-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  min-width: 0;
}

.system-panel.wide {
  grid-column: span 2;
}

.xactivity-grid .system-panel.wide {
  grid-column: span 2;
}

.xaccount-panel {
  margin-bottom: 12px;
}

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

.xaccount-capabilities {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.xaccount-capability {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid var(--line);
  border-left: 3px solid var(--ready);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, .86);
}

.xaccount-capability.warn {
  border-left-color: var(--warning);
}

.xaccount-capability strong,
.xaccount-capability span,
.xaccount-capability p,
.xaccount-capability small {
  min-width: 0;
  margin: 0;
}

.xaccount-capability strong {
  font-size: 13px;
  line-height: 1.25;
}

.xaccount-capability span,
.xaccount-capability p,
.xaccount-capability small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.system-list {
  display: grid;
  gap: 8px;
}

.system-list.compact {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.system-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-3);
}

.system-row > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.system-row strong,
.system-row span,
.system-row small,
.system-row a {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.system-row strong {
  font-size: 13px;
}

.system-row span,
.system-row small,
.system-row a {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.system-row a {
  color: #096c62;
  text-decoration: none;
  white-space: nowrap;
}

.system-row em {
  min-width: 54px;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
  text-align: center;
}

.system-row.ok em,
.system-platform-item.ok {
  color: var(--ready);
  background: color-mix(in srgb, var(--ready) 9%, #fff);
}

.system-row.warn em,
.system-platform-item.warn {
  color: #8a6b00;
  background: color-mix(in srgb, var(--warning) 12%, #fff);
}

.system-row.bad em,
.system-platform-item.bad {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 8%, #fff);
}

.system-row.disabled,
.system-platform-item.disabled {
  opacity: .68;
}

.system-platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
}

.system-platform-item {
  display: grid;
  gap: 4px;
  min-height: 58px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-3);
}

.system-platform-item strong {
  font-size: 12px;
}

.system-platform-item span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
}

.xactivity-target {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-3);
}

.xactivity-avatar {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #111;
  color: #fff;
  font-weight: 900;
}

.xactivity-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.xactivity-target strong,
.xactivity-target span,
.xactivity-target p {
  display: block;
  margin: 0;
}

.xactivity-target strong {
  font-size: 16px;
}

.xactivity-target span,
.xactivity-target p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.xactivity-events {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.xactivity-events span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.xactivity-log {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 8px;
}

.xactivity-event {
  display: grid;
  gap: 6px;
  min-height: 112px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-3);
}

.xactivity-event header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.xactivity-event h3,
.xactivity-event p {
  margin: 0;
}

.xactivity-event h3 {
  font-size: 13px;
  line-height: 1.3;
}

.xactivity-event p {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.xplatform-tabs {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .82);
  box-shadow: var(--shadow-soft);
}

.xplatform-tabs button {
  min-height: 40px;
  padding: 8px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.xplatform-tabs button.active {
  background: #111;
  color: #fff;
}

.xplatform-tabs button:disabled {
  opacity: .55;
}

.xfeed-shell {
  display: grid;
  gap: 12px;
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
}

.xfeed-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, .55fr);
  gap: 10px;
  align-items: stretch;
}

.xfeed-account,
.xfeed-status {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .9);
  box-shadow: var(--shadow-soft);
}

.xfeed-account {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.xfeed-account-text {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.xfeed-account-text strong,
.xfeed-account-text span,
.xfeed-account-text small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xfeed-account-text strong {
  font-size: 17px;
  line-height: 1.2;
}

.xfeed-account-text span,
.xfeed-account-text small {
  color: var(--muted);
  font-size: 12px;
}

.xfeed-status {
  display: grid;
  gap: 6px;
  align-content: center;
}

.xfeed-status strong {
  font-size: 15px;
}

.xfeed-status span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.xfeed-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  overflow: hidden;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #111;
  color: #fff;
  font-weight: 900;
}

.xfeed-avatar-large {
  width: 58px;
  height: 58px;
}

.xfeed-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.xfeed-verified {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-left: 5px;
  border-radius: 50%;
  background: #1d9bf0;
  color: #fff;
  font-size: 11px;
}

.xfeed-pager {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .86);
  box-shadow: var(--shadow-soft);
}

.xfeed-calendar {
  min-width: 0;
}

.xfeed-pager #xfeed-page-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.xfeed-api-details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .82);
  box-shadow: var(--shadow-soft);
}

.xfeed-api-details summary {
  cursor: pointer;
  padding: 11px 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.xfeed-api-details .xaccount-capabilities {
  padding: 0 12px 12px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.xfeed-list {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--shadow-soft);
}

.xfeed-post {
  min-width: 0;
  border-bottom: 1px solid var(--line);
}

.xfeed-post:last-child {
  border-bottom: 0;
}

.xfeed-post-link {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  padding: 14px 16px;
  color: var(--text);
  text-decoration: none;
  transition: background .16s ease;
}

.xfeed-post-link:hover {
  background: color-mix(in srgb, #1d9bf0 5%, #fff);
}

.xfeed-post-body {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.xfeed-post-header {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
}

.xfeed-post-header strong {
  color: var(--text);
  font-size: 14px;
}

.xfeed-post-header em {
  margin-left: auto;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.xfeed-type-post .xfeed-post-header em {
  color: #096c62;
  background: rgba(9, 108, 98, .08);
}

.xfeed-type-reply .xfeed-post-header em {
  color: #1d5f9f;
  background: rgba(29, 155, 240, .09);
}

.xfeed-type-repost .xfeed-post-header em,
.xfeed-type-quote .xfeed-post-header em {
  color: #8a6b00;
  background: rgba(255, 193, 7, .13);
}

.xfeed-text {
  max-height: 220px;
  overflow: auto;
  padding-right: 4px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.xfeed-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(64px, 1fr));
  gap: 6px;
  align-items: center;
  padding-top: 4px;
  border-top: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
}

.xfeed-metrics span {
  display: inline-flex;
  gap: 5px;
  align-items: baseline;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.xfeed-metrics b {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.xfeed-open {
  color: #096c62;
  font-size: 12px;
  font-weight: 900;
}

.overview-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-bottom: 0;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .78);
  box-shadow: var(--shadow-soft);
}

.stat {
  min-height: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.stat:last-child {
  border-bottom: 0;
}

.stat-label {
  display: inline;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 12px;
}

.stat strong {
  font-size: 13px;
  text-align: right;
}

.stat-action {
  display: inline-block;
  margin-top: 6px;
  color: #0a6f63;
  font-size: 12px;
  font-weight: 750;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
  align-items: start;
}

.workspace.has-batch {
  grid-template-columns: 230px minmax(0, 1fr) 270px;
  gap: 16px;
}

.post-rail {
  display: none;
  gap: 16px;
  order: 1;
  position: sticky;
  top: 18px;
}

.workspace.has-batch .post-rail {
  display: grid;
}

.sidebar,
.main-column {
  display: grid;
  gap: 16px;
}

.main-column {
  order: 2;
}

.sidebar {
  order: 3;
  position: sticky;
  top: 18px;
}

.panel,
.query-panel,
.empty-state {
  padding: 18px;
  min-width: 0;
}

.query-panel {
  padding: 14px;
  box-shadow: var(--shadow);
  border-color: var(--line-strong);
}

.composer-modes {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-3);
}

.composer-modes button {
  min-height: 32px;
  padding: 6px 10px;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  font-size: 13px;
}

.composer-modes button.active {
  background: var(--accent);
  color: #fff;
}

.compact-panel {
  padding: 15px;
  box-shadow: var(--shadow-soft);
}

.advanced-panel summary,
.advanced-exports summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.advanced-panel[open] summary {
  margin-bottom: 12px;
}

.advanced-exports {
  display: grid;
  gap: 6px;
}

.advanced-exports[open] summary {
  margin-bottom: 6px;
}

.advanced-exports a {
  margin-left: 12px;
}

.compact-heading {
  margin-top: 2px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.panel-heading span {
  color: var(--muted);
  font-size: 12px;
}

.batch-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.batch-heading-actions span {
  flex: 1 1 100%;
  text-align: right;
}

.batch-heading-actions .mini-button {
  min-height: 26px;
  padding: 4px 8px;
}

.form-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 4px 4px 10px;
  margin-bottom: 0;
}

form label {
  display: block;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.input-row {
  position: relative;
  display: block;
}

textarea {
  width: 100%;
  min-height: 104px;
  max-height: 230px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 164px 76px 20px;
  background: #fff;
  color: var(--text);
  outline: none;
  font-size: 17px;
  line-height: 1.5;
  transition: min-height .18s ease, height .18s ease, box-shadow .18s ease, border-color .18s ease;
}

textarea.expanded {
  min-height: 178px;
}

textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(17, 17, 17, .055);
}

#submit-button {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 132px;
  min-height: 50px;
  font-size: 16px;
  box-shadow: 0 10px 28px rgba(17, 17, 17, .18);
}

.smart-search-help {
  margin: 10px 4px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.controls {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  align-items: center;
  flex-wrap: wrap;
  padding: 0 4px 2px;
}

.controls .check,
.field-inline {
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-3);
}

.smart-search-results {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.search-result-list {
  display: grid;
  gap: 10px;
}

.search-result-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-3);
}

.search-result-cover {
  display: grid;
  place-items: center;
  width: 92px;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: calc(var(--radius) - 2px);
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.search-result-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-result-body {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.search-result-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}

.search-result-card h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
}

.search-result-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.search-result-card a {
  overflow-wrap: anywhere;
  font-size: 12px;
}

.search-result-author {
  color: var(--text) !important;
  font-weight: 700;
}

.search-result-action {
  min-width: 82px;
}

.screenshot-resolver {
  margin-top: 16px;
  padding: 16px 4px 2px;
  border-top: 1px solid var(--line);
}

.resolver-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.resolver-head p,
.resolver-output p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  cursor: pointer;
}

.mini-button {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 12px;
}

.resolver-drop {
  display: grid;
  grid-template-columns: minmax(220px, 290px) minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: #fff;
  align-items: start;
}

.resolver-drop.dragging {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}

.resolver-drop.busy {
  border-color: color-mix(in srgb, var(--info) 45%, var(--line));
}

.resolver-preview {
  position: sticky;
  top: 12px;
  min-height: 240px;
  max-height: 520px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-3);
  overflow: hidden;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  cursor: pointer;
}

.resolver-preview img {
  width: 100%;
  height: 100%;
  max-height: 520px;
  object-fit: contain;
  display: block;
}

.resolver-output {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.resolver-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 2px;
}

.progress-step {
  min-height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-align: center;
}

.progress-step.done {
  border-color: color-mix(in srgb, var(--ready) 50%, var(--line));
  color: var(--ready);
  background: color-mix(in srgb, var(--ready) 8%, var(--surface));
}

.progress-step.active {
  border-color: color-mix(in srgb, var(--info) 55%, var(--line));
  color: var(--info);
  background: color-mix(in srgb, var(--info) 8%, var(--surface));
}

.progress-step.active span::after {
  content: "";
  width: 8px;
  height: 8px;
  display: inline-block;
  margin-left: 6px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -1px;
  animation: spin .8s linear infinite;
}

.candidate-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.candidate-list button {
  max-width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  overflow-wrap: anywhere;
  text-align: left;
  display: grid;
  gap: 3px;
}

.candidate-list button span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.search-links {
  display: grid;
  gap: 6px;
}

.search-links a {
  display: block;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.candidate-list details {
  margin-top: 4px;
}

.candidate-list summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
}

.candidate-list pre {
  max-height: 160px;
  margin-top: 8px;
}

.post-matches {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.post-section {
  display: grid;
  gap: 10px;
}

.post-section + .post-section {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.post-section-head {
  display: grid;
  gap: 3px;
}

.post-section-head span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.platform-report,
.search-report {
  display: grid;
  gap: 5px;
  padding: 9px 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 7%, var(--surface));
}

.platform-report {
  border-color: color-mix(in srgb, var(--ready) 45%, var(--line));
  background: color-mix(in srgb, var(--ready) 8%, var(--surface));
}

.platform-report span,
.search-report span,
.search-report li {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.search-report ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

.post-card {
  border: 1px solid var(--line);
  border-left: 3px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 14px;
}

.post-card.confirmed {
  border-color: color-mix(in srgb, var(--ready) 45%, var(--line));
  border-left-color: var(--ready);
}

.post-card.likely {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  border-left-color: var(--accent);
}

.post-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 7px;
}

.post-card-head span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
  overflow-wrap: anywhere;
}

.post-resolution {
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
  padding: 8px;
  border-radius: var(--radius);
  background: var(--surface-3);
  border: 1px solid var(--line);
}

.post-resolution.confirmed {
  border-color: color-mix(in srgb, var(--ready) 50%, var(--line));
  background: color-mix(in srgb, var(--ready) 8%, var(--surface));
}

.post-resolution.likely {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}

.post-resolution strong {
  color: var(--text);
}

.post-resolution span,
.post-resolution a {
  font-size: 12px;
  overflow-wrap: anywhere;
}

.post-resolution span {
  color: var(--muted);
}

.post-resolution button {
  justify-self: start;
  min-height: 30px;
  padding: 5px 9px;
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.post-card p {
  margin: 0 0 8px;
  color: var(--text);
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.visible-links,
.direct-candidates,
.post-results {
  display: grid;
  gap: 6px;
  margin: 8px 0;
}

.visible-links strong {
  color: var(--muted);
  font-size: 12px;
}

.visible-links a {
  font-size: 12px;
  overflow-wrap: anywhere;
}

.visible-links summary,
.weak-candidates summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
}

.content-links {
  padding: 7px;
  border-radius: var(--radius);
  background: var(--surface-3);
}

.weak-candidates {
  margin-top: 6px;
}

.original-link {
  padding: 7px;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--ready) 35%, var(--line));
  background: color-mix(in srgb, var(--ready) 7%, var(--surface));
}

.post-search-links {
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

.fallback-search {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.analysis-card {
  margin-top: 10px;
  padding: 10px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-3);
}

.analysis-card > strong {
  display: block;
  margin-bottom: 8px;
}

.analysis-card dl {
  grid-template-columns: 70px 1fr;
  gap: 6px 10px;
}

.analysis-resources {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.analysis-resources a {
  min-height: 54px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
}

.analysis-resources img {
  width: 100%;
  height: 72px;
  object-fit: cover;
  display: block;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--text);
  font-weight: 600;
}

.check input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.field-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--text);
  font-weight: 600;
}

.field-inline span {
  color: var(--muted);
  font-size: 13px;
}

.field-inline select {
  min-width: 76px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 6px 9px;
  background: var(--surface-2);
  color: var(--text);
}

.field-inline select:disabled {
  opacity: 0.55;
}

.hint {
  color: var(--muted);
  font-size: 13px;
  margin-left: auto;
}

.status-line {
  display: none;
  padding: 12px 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, .82);
  box-shadow: var(--shadow-soft);
}

.status-line.active {
  display: block;
}

.status-line.error {
  color: var(--danger);
}

.batch-panel {
  background: rgba(255, 255, 255, .86);
  box-shadow: var(--shadow-soft);
}

.post-rail .batch-panel {
  border-color: color-mix(in srgb, var(--accent) 24%, var(--line));
}

.batch-progress {
  height: 6px;
  margin: -4px 0 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
}

.batch-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width .18s ease;
}

.batch-list {
  display: grid;
  gap: 8px;
}

.post-rail .batch-list {
  max-height: calc(100vh - 136px);
  overflow: auto;
  padding-right: 2px;
}

.batch-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 118px;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 72px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  text-align: left;
}

.batch-item:hover,
.batch-item.selected {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  background: color-mix(in srgb, var(--accent) 5%, var(--surface));
}

.batch-item.running,
.batch-item.saving {
  border-color: color-mix(in srgb, var(--warning) 42%, var(--line));
}

.batch-item.error {
  border-color: color-mix(in srgb, var(--danger) 42%, var(--line));
}

.batch-index {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--text);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
}

.batch-main,
.batch-state {
  min-width: 0;
}

.batch-main strong,
.batch-main small,
.batch-state,
.batch-state small {
  display: block;
  overflow-wrap: anywhere;
}

.batch-main strong {
  line-height: 1.35;
}

.batch-main small,
.batch-state small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.batch-state {
  justify-self: end;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

.post-rail .batch-item {
  grid-template-columns: 44px minmax(0, 1fr);
  min-height: 68px;
  padding: 7px;
  gap: 8px;
}

.post-rail .batch-state {
  grid-column: 1 / -1;
  justify-self: start;
  text-align: left;
  font-size: 10.5px;
}

.batch-thumb {
  display: grid;
  place-items: center;
  width: 54px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface-2);
}

.post-rail .batch-thumb {
  width: 44px;
}

.post-rail .batch-main strong {
  font-size: 12px;
  line-height: 1.28;
}

.post-rail .batch-main small,
.post-rail .batch-state small {
  margin-top: 3px;
  font-size: 10.5px;
  line-height: 1.25;
}

.batch-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.batch-thumb-empty span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--text);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
}

.batch-thumb-empty.running span {
  background: var(--warning);
}

.batch-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 999px;
  background: var(--warning);
  vertical-align: 1px;
  animation: pulse 1s ease-in-out infinite;
}

.empty-state {
  min-height: 220px;
  display: grid;
  align-content: center;
  gap: 10px;
  background: rgba(255, 255, 255, .62);
  border-style: dashed;
}

.empty-state h2 {
  font-size: 20px;
}

.empty-state p {
  max-width: 720px;
  color: var(--muted);
  line-height: 1.6;
}

.platform-list,
.api-status-list,
.history-list {
  display: grid;
  gap: 7px;
  max-height: 390px;
  overflow: auto;
}

.api-status-note {
  margin-top: -2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.api-health-label {
  display: inline-block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.platform-row,
.api-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.platform-row:last-child,
.api-status-row:last-child {
  border-bottom: 0;
}

.platform-row strong,
.platform-row span,
.api-status-row strong,
.api-status-row span,
.api-status-row small {
  display: block;
}

.platform-row span,
.api-status-row span,
.api-status-row small,
.history-item span,
.history-item small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.api-status-row small {
  white-space: pre-line;
  line-height: 1.35;
}

.history-item small {
  display: block;
}

.platform-row em,
.api-status-row em {
  flex: 0 0 auto;
  font-style: normal;
  font-size: 12px;
  font-weight: 750;
}

.platform-row em.ready,
.api-status-row em.ready {
  color: var(--ready);
}

.api-status-row em.warn {
  color: var(--warning);
}

.platform-row em.gap,
.api-status-row em.gap {
  color: var(--gap);
}

.history-item {
  display: block;
  width: 100%;
  min-height: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  text-align: left;
}

.history-item:hover {
  background: var(--surface-2);
  color: var(--accent-strong);
}

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

.result-grid > .panel {
  padding: 14px;
  box-shadow: var(--shadow-soft);
}

.raw-panel,
.resources-panel,
.api-panel {
  grid-column: 1 / -1;
}

.summary-panel,
.diagnostics-panel,
.metrics-panel,
.record-panel,
.result-grid > .panel:not(.summary-panel):not(.diagnostics-panel):not(.metrics-panel):not(.record-panel):not(.resources-panel):not(.api-panel):not(.raw-panel):not(.screenshot-panel):not(.comments-panel) {
  grid-column: 1 / -1;
}

.summary-body {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.summary-body.has-cover {
  grid-template-columns: 128px minmax(0, 1fr);
  align-items: start;
}

#cover-image {
  width: 128px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--surface-2);
}

.summary-list {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.summary-title-block,
.summary-resource-link {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-3);
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.summary-title-block > span,
.summary-resource-link > span,
.summary-detail-grid span,
.summary-metrics span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.summary-title-block strong {
  font-size: 15px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  min-width: 0;
}

.summary-detail-grid,
.summary-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.summary-detail-grid div,
.summary-metrics div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.summary-detail-grid strong,
.summary-metrics strong {
  display: block;
  margin-top: 4px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.summary-metrics {
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
}

.summary-metrics strong {
  white-space: nowrap;
  overflow-wrap: normal;
}

.summary-live-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
  gap: 12px;
  margin-top: 14px;
}

.summary-embed-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.summary-resource-link a,
.summary-title-block a,
.summary-detail-grid a {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.embed-heading {
  display: flex;
  min-height: 26px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.embed-heading strong {
  font-size: 15px;
}

.embed-heading span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.pill {
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
}

.pill.neutral {
  color: var(--muted);
  background: var(--surface-2);
}

dl {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 9px 12px;
  margin: 0;
}

dt {
  color: var(--muted);
}

dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.diagnostics-panel dl {
  grid-template-columns: 96px 1fr;
}

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

.metric {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.metric span,
.tag {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.tag.warning {
  margin-top: 4px;
  color: var(--warning);
  font-weight: 700;
}

.metric strong {
  display: block;
  margin-top: 5px;
  font-size: clamp(18px, 2vw, 24px);
  overflow-wrap: anywhere;
}

.record-panel {
  border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
  background: #fff;
}

.record-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 16px;
  align-items: center;
}

.record-action-row p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

#record-button {
  min-height: 64px;
  font-size: 17px;
  display: grid;
  place-items: center;
  gap: 3px;
}

#record-button span,
#record-button small {
  display: block;
}

#record-button small {
  font-size: 12px;
  line-height: 1.25;
  opacity: .78;
}

.record-feedback {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.record-feedback ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.record-feedback ul.batch-record-list {
  grid-template-columns: 1fr;
}

.record-feedback li {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.record-feedback strong,
.record-feedback span {
  display: block;
}

.record-feedback span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.error-text {
  color: var(--danger);
}

.resource-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.resources-panel > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style-position: inside;
  font-weight: 800;
}

.resources-panel > summary small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.resources-panel[open] > summary {
  margin-bottom: 14px;
}

.resource-tabs button {
  padding: 7px 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
}

.resource-tabs button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.resource-settings {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-3);
}

.resource-settings summary {
  cursor: pointer;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.resource-settings p {
  margin: 8px 0 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.resource-setting-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}

.resource-setting-grid label {
  display: flex;
  gap: 7px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.resources {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
  min-width: 0;
}

.resource-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  min-width: 0;
}

.resource-item img,
.screenshot-box img {
  width: 100%;
  display: block;
}

img[data-zoomable="true"] {
  cursor: zoom-in;
}

.resource-item img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.resource-placeholder {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  color: var(--muted);
  background: var(--surface-3);
  text-transform: uppercase;
  font-weight: 750;
}

.resource-meta {
  padding: 9px;
  display: grid;
  gap: 6px;
  min-width: 0;
}

.resource-facts {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.resource-facts span {
  padding: 3px 6px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.resource-meta a {
  display: block;
  color: var(--text);
  text-decoration: none;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.35;
}

.resource-detail {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.resource-detail summary {
  cursor: pointer;
  font-weight: 800;
}

.resource-detail dl {
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 4px 8px;
  margin: 8px 0 0;
}

.resource-detail dt,
.resource-detail dd {
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 11px;
  line-height: 1.4;
}

.resource-detail dd {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.resource-detail summary {
  cursor: pointer;
}

.resource-detail code {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: var(--muted);
}

.screenshot-box {
  min-height: 220px;
  max-height: 430px;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--surface-3);
  overflow: hidden;
}

.screenshot-embed .screenshot-box img {
  max-height: 430px;
  object-fit: contain;
  background: #fff;
}

.screenshot-caution,
.screenshot-blocked {
  width: 100%;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--warning) 32%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--warning) 7%, #fff);
  color: var(--warning);
  line-height: 1.5;
}

.screenshot-caution {
  margin: 0;
  font-size: 13px;
}

.screenshot-blocked {
  display: grid;
  gap: 10px;
  color: var(--text);
}

.screenshot-blocked p {
  color: var(--muted);
  line-height: 1.55;
}

.screenshot-blocked img {
  max-height: 280px;
  object-fit: contain;
  border-radius: var(--radius);
  background: #fff;
}

.screenshot-blocked details {
  color: var(--muted);
  font-size: 13px;
}

.screenshot-blocked summary {
  cursor: pointer;
  font-weight: 750;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  padding: 20px;
  background: rgba(12, 18, 16, .88);
}

.image-lightbox[hidden] {
  display: none;
}

.image-lightbox img {
  max-width: min(1200px, 96vw);
  max-height: calc(100vh - 120px);
  align-self: center;
  justify-self: center;
  object-fit: contain;
  border-radius: var(--radius);
  background: #0b0f0e;
}

.image-lightbox p {
  justify-self: center;
  max-width: min(1000px, 92vw);
  color: #e9f0ed;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.lightbox-close {
  justify-self: end;
  min-width: 72px;
  background: #ffffff;
  color: #1d241f;
}

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

@keyframes pulse {
  0%,
  100% {
    opacity: .38;
  }

  50% {
    opacity: 1;
  }
}

.comments {
  display: grid;
  gap: 10px;
  max-height: 430px;
  overflow: auto;
}

.comment {
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.comment:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.comment strong {
  display: block;
  margin-bottom: 4px;
}

.comment p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.comment span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.button-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

pre {
  overflow: auto;
  max-height: 520px;
  margin: 0;
  padding: 13px;
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text);
  font-size: 12px;
  line-height: 1.55;
}

.api-panel pre {
  max-height: 180px;
}

.empty {
  color: var(--muted);
}

.export-links {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.export-links a {
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-3);
  text-decoration: none;
}

.login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
}

.login-shell {
  width: min(100vw - 32px, 460px);
}

.login-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.login-card h1 {
  font-size: 34px;
}

.login-card .subtitle {
  margin-bottom: 20px;
}

.google-login {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-3);
  color: var(--text);
  font-weight: 750;
  text-decoration: none;
}

.google-login:hover {
  background: var(--surface-2);
}

.code-login {
  display: grid;
  gap: 9px;
}

.code-login input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text);
}

.code-login input:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.login-alert {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
  color: var(--accent-strong);
  line-height: 1.45;
}

.login-alert.error {
  background: color-mix(in srgb, var(--danger) 8%, var(--surface));
  color: var(--danger);
}

.login-meta {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 1100px) {
  .dashboard-filters,
  .dashboard-tags-panel,
  .system-summary,
  .telegram-summary,
  .xaccount-meta,
  .xfeed-head,
  .system-grid,
  .xactivity-summary,
  .xactivity-grid,
  .workspace,
  .workspace.has-batch {
    grid-template-columns: 1fr;
  }

  .system-panel.wide,
  .xactivity-grid .system-panel.wide {
    grid-column: 1;
  }

  .dashboard-search {
    grid-column: 1;
  }

  .dashboard-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-actions {
    justify-content: flex-start;
  }

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

  .xfeed-shell {
    max-width: none;
  }

  .xfeed-pager {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .xfeed-pager #xfeed-page-label,
  #xfeed-latest-day {
    grid-column: 1 / -1;
  }

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

  .post-rail {
    order: 2;
    position: static;
  }

  .sidebar {
    grid-template-columns: 1fr 1fr;
    order: 3;
    position: static;
  }

  .overview-strip {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
  }

  .summary-panel,
  .diagnostics-panel,
  .screenshot-panel,
  .comments-panel {
    grid-column: 1 / -1;
  }

  .summary-live-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100vw - 20px, 680px);
    padding-top: 18px;
  }

  h1 {
    font-size: 38px;
  }

  .title-break {
    display: block;
  }

  .topbar {
    min-height: 0;
    place-items: start;
    text-align: left;
    padding-top: 118px;
  }

  .brand-block {
    justify-items: start;
  }

  .subtitle {
    margin-top: 12px;
  }

  .top-actions {
    left: 0;
    right: 0;
    justify-content: space-between;
  }

  .xaccount-capabilities {
    grid-template-columns: 1fr;
  }

  .xfeed-account,
  .xfeed-pager {
    grid-template-columns: 1fr;
  }

  .xfeed-account {
    justify-items: start;
  }

  .xfeed-post-link {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }

  .xfeed-avatar {
    width: 36px;
    height: 36px;
  }

  .xfeed-avatar-large {
    width: 54px;
    height: 54px;
  }

  .xfeed-text {
    font-size: 15px;
  }

  .xfeed-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .account-box {
    max-width: min(100%, 260px);
    justify-content: space-between;
  }

  .top-actions,
  .dashboard-summary,
  .telegram-summary,
  .opinion-card,
  .tag-create-row,
  .sidebar,
  .input-row,
  .batch-item,
  .search-result-card,
  .resolver-drop,
  .metric-grid,
  .record-action-row,
  .record-feedback ul,
  .result-grid,
  .resolver-progress {
    grid-template-columns: 1fr;
  }

  .page-tabs,
  .tag-create-row,
  .dashboard-actions {
    width: 100%;
  }

  .page-tabs button,
  .tag-create-row button,
  .dashboard-actions button {
    flex: 1;
  }

  .dashboard-summary div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .telegram-summary div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .dashboard-summary div:last-child {
    border-bottom: 0;
  }

  .telegram-summary div:last-child {
    border-bottom: 0;
  }

  .overview-strip,
  .sidebar {
    display: grid;
  }

  .overview-strip {
    grid-template-columns: 1fr;
  }

  .input-row {
    display: grid;
  }

  .opinion-card {
    grid-template-columns: none;
    max-height: none;
  }

  .opinion-card-head {
    grid-template-columns: 1fr;
  }

  .opinion-card-actions {
    grid-column: auto;
  }

  .composer-modes {
    width: 100%;
    justify-content: stretch;
  }

  .composer-modes button {
    flex: 1;
  }

  .search-result-cover {
    width: 100%;
  }

  #submit-button {
    position: static;
    width: 100%;
    min-height: 52px;
    box-shadow: none;
  }

  textarea {
    min-height: 118px;
    max-height: 220px;
    padding: 15px;
  }

  textarea.expanded {
    min-height: 154px;
  }

  .summary-body.has-cover {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  #cover-image {
    width: 92px;
  }

  .summary-detail-grid,
  .summary-metrics,
  .summary-live-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary-live-grid {
    grid-template-columns: 1fr;
  }

  dl,
  .diagnostics-panel dl {
    grid-template-columns: 1fr;
  }

  .query-panel,
  .panel,
  .empty-state {
    padding: 15px;
  }
}
