.sync-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  gap: 18px;
  align-items: end;
  margin-bottom: 18px;
  padding: 18px;
}

.sync-panel h2,
.sync-panel p {
  margin: 0;
}

.sync-panel h2 {
  font-size: 1.14rem;
}

.sync-panel p:last-child {
  color: var(--muted);
  line-height: 1.45;
}

.sync-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}

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

.category-total {
  border: 1px solid var(--line);
  border-left-width: 6px;
  border-radius: 8px;
  background: white;
  padding: 12px;
}

.category-total span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.category-total strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 1.8rem;
  line-height: 1;
}

.lego-total {
  border-left-color: var(--red);
}

.editing-total {
  border-left-color: var(--blue);
}

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

.category-choice {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-weight: 850;
}

.category-choice.active {
  border-color: rgba(227, 56, 56, 0.48);
  background: rgba(227, 56, 56, 0.1);
  box-shadow: inset 0 0 0 1px rgba(227, 56, 56, 0.12);
}

.category-choice[data-category-choice="editing"].active {
  border-color: rgba(40, 104, 201, 0.48);
  background: rgba(40, 104, 201, 0.1);
  box-shadow: inset 0 0 0 1px rgba(40, 104, 201, 0.12);
}

@media (max-width: 880px) {
  .sync-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .sync-actions,
  .category-totals,
  .category-picker {
    grid-template-columns: 1fr;
  }
}
